From c850401e18c1dc46619d5cd37d2ad0b7d08fdcdb Mon Sep 17 00:00:00 2001 From: LucasFA <23667494+LucasFA@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:32:06 +0100 Subject: [PATCH] nixos/nvidia: remove unnecessary kernel parameter NVreg_OpenRmEnableUnsupportedGpus has had no effect since driver release 545.23.06 of the open kernel modules, where it is documented: >Option: OpenRmEnableUnsupportedGpus >This option to require opt in for use of Open RM on non-Data Center >GPUs is deprecated and no longer required. The kernel module parameter >is left here, though ignored, for backwards compatibility. In the following NVIDIA/open-gpu-kernel-modules commit: [b5bf85a8e3](https://github.com/NVIDIA/open-gpu-kernel-modules/commit/b5bf85a8e3eb2516b9abca4d1becaf1172d62822) Potentially closes #438930 Backwards compatibility: there is a legacy 535 driver affected which would use the flag. Version check added to keep that as it was until now. Other legacy (before 515, no open module) or newer (after 545) unaffected. --- nixos/modules/hardware/video/nvidia.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 9e3707f8e790..7d0a53370008 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -696,7 +696,11 @@ in cfg.powerManagement.enable && cfg.powerManagement.kernelSuspendNotifier ) "nvidia.NVreg_UseKernelSuspendNotifiers=1" ++ lib.optional cfg.powerManagement.enable "nvidia.NVreg_PreserveVideoMemoryAllocations=1" - ++ lib.optional useOpenModules "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1" + ++ lib.optional ( + useOpenModules + && lib.versionAtLeast nvidia_x11.version "515.43.04" + && lib.versionOlder nvidia_x11.version "545.23.06" + ) "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1" ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && !ibtSupport) "ibt=off"; # enable finegrained power management