From 1b911d1fe29dcc63efa0afce053c05d4e8f7e0d8 Mon Sep 17 00:00:00 2001 From: Kiskae Date: Thu, 30 Mar 2023 19:46:01 +0200 Subject: [PATCH 1/2] linuxPackages.nvidia_x11_production: 525.89.02 -> 525.105.17 --- pkgs/os-specific/linux/nvidia-x11/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 15a3c9e6c18b..76a78cfbaf37 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -25,11 +25,11 @@ rec { stable = if stdenv.hostPlatform.system == "i686-linux" then legacy_390 else latest; production = generic { - version = "525.89.02"; - sha256_64bit = "sha256-DkEsiMW9mPhCqDmm9kYU8g5MCVDvfP+xKxWKcWM1k+k="; - openSha256 = "sha256-MP9ir0Fuodar239r3PbqVxIHd0vHvpDj8Rw55TeFtZM="; - settingsSha256 = "sha256-7rHaJWm0XHJXsKL8VnU9XT15t/DU8jdsCXQwQT+KaV0="; - persistencedSha256 = "sha256-4AmOL6b3GKCjGs6bRDpQAkEG4n41X395znyQF1x9VEs="; + version = "525.105.17"; + sha256_64bit = "sha256-xjWiGigsm1NIXxnrtkoPS1NqlouU1Nl2KeC8VHpYFCo="; + openSha256 = "sha256-O3XB8tNLmNkzrYoVyJVEE0IcE772lOdr8qn4rQHIupE="; + settingsSha256 = "sha256-KUw31Am9Zfwk5QTs6th8+J3C4oUBacNgb7ZUNeV68W4="; + persistencedSha256 = "sha256-jhBtsf9MXrkU/SsBndR1ESGUHhgUWiSH7R75swk3m40="; }; latest = selectHighestVersion production (generic { From ea126529eb23f39f5a6bf3341103044a151657a0 Mon Sep 17 00:00:00 2001 From: Kiskae Date: Sat, 1 Apr 2023 13:52:36 +0200 Subject: [PATCH 2/2] nixos/nvidia: allow package to override IBT support --- nixos/modules/hardware/video/nvidia.nix | 4 +++- pkgs/os-specific/linux/nvidia-x11/default.nix | 2 ++ pkgs/os-specific/linux/nvidia-x11/generic.nix | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 79a3ab6baaab..6bbbcc58e98a 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -26,6 +26,8 @@ let nvidiaPersistencedEnabled = cfg.nvidiaPersistenced; nvidiaSettings = cfg.nvidiaSettings; busIDType = types.strMatching "([[:print:]]+[\:\@][0-9]{1,3}\:[0-9]{1,2}\:[0-9])?"; + + ibtSupport = cfg.open || (nvidia.ibtSupport or false); in { @@ -462,7 +464,7 @@ in boot.kernelParams = optional (offloadCfg.enable || cfg.modesetting.enable) "nvidia-drm.modeset=1" ++ optional cfg.powerManagement.enable "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ++ optional cfg.open "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1" - ++ optional (!cfg.open && config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && lib.versionOlder nvidia_x11.version "530") "ibt=off"; + ++ optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && !ibtSupport) "ibt=off"; services.udev.extraRules = '' diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 76a78cfbaf37..98d1fceecaf1 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -30,6 +30,8 @@ rec { openSha256 = "sha256-O3XB8tNLmNkzrYoVyJVEE0IcE772lOdr8qn4rQHIupE="; settingsSha256 = "sha256-KUw31Am9Zfwk5QTs6th8+J3C4oUBacNgb7ZUNeV68W4="; persistencedSha256 = "sha256-jhBtsf9MXrkU/SsBndR1ESGUHhgUWiSH7R75swk3m40="; + + ibtSupport = true; }; latest = selectHighestVersion production (generic { diff --git a/pkgs/os-specific/linux/nvidia-x11/generic.nix b/pkgs/os-specific/linux/nvidia-x11/generic.nix index b76e64232b74..f8e896c75b97 100644 --- a/pkgs/os-specific/linux/nvidia-x11/generic.nix +++ b/pkgs/os-specific/linux/nvidia-x11/generic.nix @@ -11,6 +11,7 @@ , useProfiles ? true , preferGtk2 ? false , settings32Bit ? false +, ibtSupport ? false , prePatch ? "" , postPatch ? null @@ -116,6 +117,7 @@ let persistenced = mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256; inherit persistencedVersion settingsVersion; compressFirmware = false; + ibtSupport = ibtSupport || (lib.versionAtLeast version "530"); } // optionalAttrs (!i686bundled) { inherit lib32; };