Machine: Framework Desktop, Ryzen AI Max+ 395, 128 GB, CachyOS + Cosmic
Ollama (llama-server) consumed nearly all 96 GB of iGPU VRAM, leaving nothing for cosmic-comp, Chrome, and VS Code. The kernel logged:
amdgpu: [drm] *ERROR* Not enough memory for command submission!
cosmic-comp segfaulted, Cosmic died, and the framebuffer TTY (black screen,
white monospace text) appeared showing the last cosmic-session log lines — which
happened to contain SSH_AUTH_SOCK in the process environment strings. That
string is not the cause; it is just part of the process launch logs.
Reserve 6 GB of VRAM that Ollama will never touch, leaving headroom for the compositor and other GPU clients.
Edit /etc/systemd/system/ollama.service.d/override.conf and add one line:
Environment="OLLAMA_GPU_OVERHEAD=6442450944"Full file after the change:
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
Environment="OLLAMA_KEEP_ALIVE=-1"
Environment="OLLAMA_IGPU_ENABLE=1"
Environment="OLLAMA_FLASH_ATTENTION=1"
Environment="HIP_VISIBLE_DEVICES=-1"
Environment="OLLAMA_GPU_OVERHEAD=6442450944"6442450944 = 6 GB in bytes (6 × 1024³).
Then reload and restart Ollama:
sudo systemctl daemon-reload && sudo systemctl restart ollamaThis fixes the crash for models that fit within ~90 GB (96 GB carveout minus 6 GB overhead). For qwen3.5:122b (~81 GB weights + ~12 GB KV cache at 8192 context = ~93 GB), Fix 2 is also needed.
Needed for qwen3.5:122b or any model that requires more than ~90 GB.
Current split: 96 GB GPU / 32 GB CPU. Target split: 112 GB GPU / 16 GB CPU.
The OS and running apps comfortably fit in 16 GB CPU RAM. The GPU gets more
headroom. Fix 1 (OLLAMA_GPU_OVERHEAD) must still be set after this change.
- Shut down the machine (full power off, not suspend).
- Press the power button, then tap F2 repeatedly until the BIOS Setup launches.
- Navigate to Advanced, then look for a submenu named one of: AMD CBS, GFX Configuration, UMA, Graphics Memory, or Dedicated VRAM. The exact path is not publicly documented for Insyde 03.05 — navigate Advanced until you find a GPU/UMA-related entry.
- Find UMA Frame Buffer Size (or similar label) and change it to 112 GB or the closest available option.
- Press F10 to save and exit. The machine will reboot.
- After reboot, verify in Linux:
cat /sys/class/drm/card1/device/mem_info_vram_totalExpected: ~120259084288 bytes (~112 GB).
Note: Fix 1 (
OLLAMA_GPU_OVERHEAD=6442450944) must still be applied after the BIOS change to keep a safety margin for the compositor.
| Action | Required for | Requires reboot |
|---|---|---|
Fix 1: OLLAMA_GPU_OVERHEAD=6442450944 |
All models (stops starvation) | No |
| Fix 2: BIOS UMA carveout → 112 GB | Models needing >90 GB (e.g. qwen3.5:122b) | Yes |