diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index f60911ebe685..948f097395fe 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -96,6 +96,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 0980c4948426..dc1120dda916 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 1c7f44c4c172..5232106bf7b6 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,17 @@ 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-hdszsACWNqkCh8G4VBNitDT85gk9gJe1BlQ8LdrYIkg="; + fabricmanagerSha256 = "sha256-umhyehddbQ9+xhhoiKC7SOSVxscA5pcnqvkQOOLIdsM="; + useSettings = false; + usePersistenced = true; + useFabricmanager = true; + }; + # 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/os-specific/linux/nvidia-x11/fabricmanager.nix b/pkgs/os-specific/linux/nvidia-x11/fabricmanager.nix index f032ade0d837..cc11ad9d745e 100644 --- a/pkgs/os-specific/linux/nvidia-x11/fabricmanager.nix +++ b/pkgs/os-specific/linux/nvidia-x11/fabricmanager.nix @@ -5,12 +5,15 @@ nvidia_x11: sha256: lib, fetchurl, patchelf, + zlib, + glibc, }: let sys = lib.concatStringsSep "-" (lib.reverseList (lib.splitString "-" stdenv.system)); bsys = builtins.replaceStrings [ "_" ] [ "-" ] sys; fmver = nvidia_x11.version; + ldd = (lib.getBin glibc) + "/bin/ldd"; in stdenv.mkDerivation rec { @@ -23,14 +26,23 @@ stdenv.mkDerivation rec { inherit sha256; }; + phases = [ + "unpackPhase" + "installPhase" + ]; + installPhase = '' mkdir -p $out/{bin,share/nvidia-fabricmanager} for bin in nv{-fabricmanager,switch-audit};do - ${patchelf}/bin/patchelf \ - --set-interpreter ${stdenv.cc.libc}/lib/ld-${bsys}.so.2 \ - --set-rpath ${lib.makeLibraryPath [ stdenv.cc.libc ]} \ - --shrink-rpath \ - bin/$bin + ${patchelf}/bin/patchelf \ + --set-interpreter ${stdenv.cc.libc}/lib/ld-${bsys}.so.2 \ + --set-rpath ${ + lib.makeLibraryPath [ + stdenv.cc.libc + zlib + ] + } \ + bin/$bin done mv bin/nv{-fabricmanager,switch-audit} $out/bin/. for d in etc systemd share/nvidia;do @@ -39,6 +51,11 @@ stdenv.mkDerivation rec { for d in include lib;do mv $d $out/. done + patchShebangs $out/bin + + for b in $out/bin/*;do + ${ldd} $b | grep -vqz "not found" + done ''; meta = { diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 821784d3b886..7d0e2aadd85b 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