From d120c5307788c4d984ef6705bde80daa5015a084 Mon Sep 17 00:00:00 2001 From: Kiskae Date: Wed, 22 Feb 2023 18:08:41 +0100 Subject: [PATCH] linuxPackages_6_2.nvidia_x11: disable ibt --- nixos/modules/hardware/video/nvidia.nix | 4 +++- pkgs/os-specific/linux/nvidia-x11/generic.nix | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 2eff322d9601..434931ccae5a 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -461,7 +461,9 @@ in # If requested enable modesetting via kernel parameter. 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 "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1" + # proprietary driver is not compiled with support for X86_KERNEL_IBT + ++ optional (!cfg.open && config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "ibt=off"; services.udev.extraRules = '' diff --git a/pkgs/os-specific/linux/nvidia-x11/generic.nix b/pkgs/os-specific/linux/nvidia-x11/generic.nix index 74addc6c5010..ea9dbcabd0e9 100644 --- a/pkgs/os-specific/linux/nvidia-x11/generic.nix +++ b/pkgs/os-specific/linux/nvidia-x11/generic.nix @@ -127,8 +127,7 @@ let platforms = [ "x86_64-linux" ] ++ optionals (!i686bundled) [ "i686-linux" ]; maintainers = with maintainers; [ jonringer ]; priority = 4; # resolves collision with xorg-server's "lib/xorg/modules/extensions/libglx.so" - # proprietary driver currently does not support X86_KERNEL_IBT, which is scheduled to be added in linux 6.2 - broken = broken || (kernel != null && kernel.kernelAtLeast "6.2"); + inherit broken; }; };