diff options
| author | Seth Flynn <[email protected]> | 2025-02-10 14:28:12 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-02-10 20:26:23 -0500 |
| commit | cd21ca8e9894f7d8dbe7628952c6345174c3eb15 (patch) | |
| tree | 19980d81a8e63fb217fab6e32c5c1911d423d013 | |
| parent | 73046857ef20f99983aaa95c04e0061615478583 (diff) | |
nixos/nvidia: don't use gsp firmware on proprietary driver
| -rw-r--r-- | modules/nixos/mixins/nvidia.nix | 10 | ||||
| -rw-r--r-- | systems/glados/default.nix | 10 |
2 files changed, 13 insertions, 7 deletions
diff --git a/modules/nixos/mixins/nvidia.nix b/modules/nixos/mixins/nvidia.nix index 97a8f2e..ff81385 100644 --- a/modules/nixos/mixins/nvidia.nix +++ b/modules/nixos/mixins/nvidia.nix @@ -3,6 +3,8 @@ let cfg = config.hardware.nvidia; + isNvidiaEnabled = lib.elem "nvidia" config.services.xserver.videoDrivers; + # Unlike Nixpkgs, I know all of my GPUs should prefer the open modules after 560 useOpenModulesByDefault = lib.versionAtLeast config.hardware.nvidia.package.version "560"; in @@ -21,6 +23,14 @@ in }; } + (lib.mkIf (isNvidiaEnabled && !config.hardware.nvidia.open) { + # Don't use GSP Firmware on proprietary driver + # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/693 + boot.kernelParams = [ + "nvidia.NVreg_EnableGpuFirmware=0" + ]; + }) + (lib.mkIf cfg.nvk.enable { specialisation = { nvk.configuration = { diff --git a/systems/glados/default.nix b/systems/glados/default.nix index 831c90f..0d64af7 100644 --- a/systems/glados/default.nix +++ b/systems/glados/default.nix @@ -19,13 +19,9 @@ }; boot = { - kernelParams = - [ - "amd_pstate=active" - ] - # Don't use GSP Firmware on proprietary driver - # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/693 - ++ lib.optional (!config.hardware.nvidia.open) "nvidia.NVreg_EnableGpuFirmware=0"; + kernelParams = [ + "amd_pstate=active" + ]; lanzaboote = { enable = true; |
