Repository navigation
[BUG FIX] Pick the Ollama package by GPU hardware, not by installed binaries - #10472
Eric-Fernald wants to merge 3 commits into
Conversation
… on PATH. `nvidia-utils` is routinely pulled onto AMD/Intel machines as an `opengl-driver`/`vulkan-driver` provider, so AMD owners got `ollama-cuda` plus the ~3 GB CUDA tree. The `ollama-rocm` branch was dead: it looked for `rocminfo`, which a stock Omarchy install never places on disk. Detect by PCI vendor instead: - Reuse `omarchy-hw-nvidia` for the CUDA branch. - Add `omarchy-hw-amd`, reading sysfs the same way, for the ROCm branch. - Otherwise fall back to CPU-only `ollama`. NVIDIA still wins on a mixed machine, matching the old precedence (AMD iGPU + NVIDIA dGPU laptops want CUDA). Tests: new `test/shell.d/hw-amd-test.sh` covers discrete/integrated Radeon, hybrid, NVIDIA-only, Intel-only, an AMD audio function, and no devices. Fixes omacom#10380
It landed as 100644, so the menu's `elif omarchy-hw-amd` hit "Permission denied" and every AMD machine fell through to CPU-only ollama, and the new hw-amd test failed its first case. Its siblings are all 100755. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed and run on a disposable Omarchy worker. The bug is real and this is the right-sized fix for it, with one problem, which I've fixed on your branch. The problem: What was run: I ran the
Second opinion: Codex Medium reviewed the same diff. It agreed that the problem is real and the fix proportionate, though its independence from my review isn't guaranteed. It confirmed that the vendor and class matching is right (the HDMI audio function is excluded and NVIDIA wins on hybrids) and that nothing else still uses the old Waiting on: the maintainer, to decide whether every AMD GPU getting |
|
NVIDIA, which would put ollama-rocm on hybrid laptops with an NVIDIA dGPU and an AMD iGPU. Run the shipped action against PCI fixtures with the real detectors and a stubbed installer to cover CUDA, ROCm, CPU, and the mixed-GPU case.
|
Your new commit (a0f93db) only adds tests, and I read it: it runs the menu's Classification is unsettled. I classified this as a Waiting on: the maintainer, to settle whether this is a bug fix or a feature. Once that's decided, the new head gets the same worker run as 12ca2b8. Nothing is needed from you. |
The Ollama install menu chose
ollama-cudawhenevernvidia-smiwas on PATH.nvidia-utilsis routinely pulled onto AMD/Intel machines as anopengl-driver/vulkan-driverprovider, so AMD owners gotollama-cudaplus the ~3 GB CUDA tree. Theollama-rocmbranch was dead: it looked forrocminfo, which a stock Omarchy install never places on disk.Detect by PCI vendor instead:
omarchy-hw-nvidiafor the CUDA branch.omarchy-hw-amd, reading sysfs the same way, for the ROCm branch.ollama.Package selection by hardware
Detection is by PCI vendor ID and display class in sysfs. NVIDIA is checked first, then AMD, so NVIDIA wins on mixed machines (matching the old precedence).
ollama-cudaollama-cudaollama-cudaollama-rocmollama-rocmollama(CPU)ollama(CPU)Installed packages (
nvidia-utils, ROCm, etc.) have no effect on the choice.Known limitation: ROCm officially supports only some AMD parts, so an APU-only laptop gets
ollama-rocmand Ollama may fall back to CPU at runtime. This is still an improvement over the previous behavior, which never selectedollama-rocmon any AMD machine.Tests: new
test/shell.d/hw-amd-test.shcovers discrete/integrated Radeon, hybrid, NVIDIA-only, Intel-only, an AMD audio function, and no devices.Fixes #10380