summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian <[email protected]>2026-04-17 11:49:42 -0500
committerChristian <[email protected]>2026-04-17 11:49:42 -0500
commit0b77660443280e0dbfccf1b55785ea6db5ac2d62 (patch)
treea82e1b36f7da6a3d6971694f6093fef52be26fe3
parentaa8289ae28d17869297b8046ed8efd04a5e1016c (diff)
Trying to get the GPU to cooperate
-rw-r--r--hosts/desktop/configuration.nix10
-rw-r--r--hosts/desktop/hardware-configuration.nix5
2 files changed, 15 insertions, 0 deletions
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix
index 96cc210..810fa8b 100644
--- a/hosts/desktop/configuration.nix
+++ b/hosts/desktop/configuration.nix
@@ -39,6 +39,16 @@ in
package = unstable.ollama;
acceleration = "rocm";
rocmOverrideGfx = "10.3.0";
+ environmentVariables = {
+ # This forces ROCm to see ONLY the RX 6800.
+ # On most Ryzen 7000 systems, '0' is the dGPU and '1' is the iGPU.
+ HIP_VISIBLE_DEVICES = "0";
+ ROCR_VISIBLE_DEVICES = "0";
+
+ # Keep these for RDNA 2 stability with 26B models
+ HSA_OVERRIDE_GFX_VERSION = "10.3.0";
+ HSA_ENABLE_SDMA = "0";
+ };
};
environment.variables.HSA_OVERRIDE_GFX_VERSION = "10.3.0";
diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix
index ba7f356..cc0c460 100644
--- a/hosts/desktop/hardware-configuration.nix
+++ b/hosts/desktop/hardware-configuration.nix
@@ -12,6 +12,11 @@
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
+ boot.kernelParams = [
+ "amdgpu.noretry=0" # Allows the GPU to retry memory access instead of crashing
+ "amdgpu.gpureset=1" # Enables better recovery if a fault occurs
+ "amdgpu.pcie_gen_cap=0x00040000" # Forces PCIe 4.0 if your board is being weird
+ ];
hardware.graphics = {
enable = true;