From ecf217e492b7903b85c7f35987398e6f762f1930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Wed, 18 Dec 2024 12:14:11 +0100 Subject: [PATCH] nixos/nvidia: add nvidia_dc_565 drivers Also remove dc_520 --- .../manual/release-notes/rl-2505.section.md | 2 ++ nixos/modules/hardware/video/nvidia.nix | 2 +- pkgs/os-specific/linux/nvidia-x11/default.nix | 28 +++++++++---------- pkgs/top-level/linux-kernels.nix | 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 50453b3ab04f73..d9bf4389878919 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -88,6 +88,8 @@ - `nodePackages.copy-webpack-plugin` has been removed, as it should be installed in projects that use it instead. +- `linuxPackages.nvidiaPackages.dc_520` has been removed since it is marked broken and there are better newer alternatives. + - `racket_7_9` has been removed, as it is insecure. It is recommended to use Racket 8 instead. - `ente-auth` now uses the name `enteauth` for its binary. The previous name was `ente_auth`. diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 0980c4948426b4..dc1120dda91693 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -304,7 +304,7 @@ in message = "You cannot configure both X11 and Data Center drivers at the same time."; } { - assertion = cfg.open != null; + assertion = cfg.open != null || cfg.datacenter.enable; message = '' You must configure `hardware.nvidia.open` on NVIDIA driver versions >= 560. It is suggested to use the open source kernel modules on Turing or later GPUs (RTX series, GTX 16xx), and the closed source modules otherwise. diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 7987c6d0745e1e..64c9a017670372 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -100,20 +100,7 @@ rec { }; # data center driver compatible with current default cudaPackages - dc = dc_520; - dc_520 = generic rec { - version = "520.61.05"; - url = "https://us.download.nvidia.com/tesla/${version}/NVIDIA-Linux-x86_64-${version}.run"; - sha256_64bit = "sha256-EPYWZwOur/6iN/otDMrNDpNXr1mzu8cIqQl8lXhQlzU=="; - fabricmanagerSha256 = "sha256-o8Kbmkg7qczKQclaGvEyXNzEOWq9ZpQZn9syeffnEiE=="; - useSettings = false; - usePersistenced = false; - useFabricmanager = true; - - patches = [ rcu_patch ]; - - broken = kernel.kernelAtLeast "6.5"; - }; + dc = dc_565; dc_535 = generic rec { version = "535.154.05"; @@ -128,6 +115,19 @@ rec { patches = [ rcu_patch ]; }; + dc_565 = generic rec { + version = "565.57.01"; + url = "https://us.download.nvidia.com/tesla/${version}/NVIDIA-Linux-x86_64-${version}.run"; + sha256_64bit = "sha256-buvpTlheOF6IBPWnQVLfQUiHv4GcwhvZW3Ks0PsYLHo="; + persistencedSha256 = "sha256-d0Q1Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE="; + fabricmanagerSha256 = "sha256-umhyehddbQ9+xhhoiKC7SOSVxscA5pcnqvkQOOLIdsM="; + useSettings = false; + usePersistenced = true; + useFabricmanager = true; + + #patches = [ rcu_patch ]; + }; + # Update note: # If you add a legacy driver here, also update `top-level/linux-kernels.nix`, # adding to the `nvidia_x11_legacy*` entries. diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 25459aef3509e7..f7d04d9d374cfc 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -430,8 +430,8 @@ in { nvidia_x11_production = nvidiaPackages.production; nvidia_x11_vulkan_beta = nvidiaPackages.vulkan_beta; nvidia_dc = nvidiaPackages.dc; - nvidia_dc_520 = nvidiaPackages.dc_520; nvidia_dc_535 = nvidiaPackages.dc_535; + nvidia_dc_565 = nvidiaPackages.dc_565; # this is not a replacement for nvidia_x11* # only the opensource kernel driver exposed for hydra to build