Skip to content

Commit 438969f

Browse files
committed
nixos/nvidia: add nvidia_dc_565 drivers
Also remove dc_520
1 parent 51fabd1 commit 438969f

File tree

5 files changed

+38
-21
lines changed

5 files changed

+38
-21
lines changed

nixos/doc/manual/release-notes/rl-2505.section.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@
9696

9797
- `nodePackages.copy-webpack-plugin` has been removed, as it should be installed in projects that use it instead.
9898

99+
- `linuxPackages.nvidiaPackages.dc_520` has been removed since it is marked broken and there are better newer alternatives.
100+
99101
- `racket_7_9` has been removed, as it is insecure. It is recommended to use Racket 8 instead.
100102

101103
- `ente-auth` now uses the name `enteauth` for its binary. The previous name was `ente_auth`.

nixos/modules/hardware/video/nvidia.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ in
304304
message = "You cannot configure both X11 and Data Center drivers at the same time.";
305305
}
306306
{
307-
assertion = cfg.open != null;
307+
assertion = cfg.open != null || cfg.datacenter.enable;
308308
message = ''
309309
You must configure `hardware.nvidia.open` on NVIDIA driver versions >= 560.
310310
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.

pkgs/os-specific/linux/nvidia-x11/default.nix

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,7 @@ rec {
100100
};
101101

102102
# data center driver compatible with current default cudaPackages
103-
dc = dc_520;
104-
dc_520 = generic rec {
105-
version = "520.61.05";
106-
url = "https://us.download.nvidia.com/tesla/${version}/NVIDIA-Linux-x86_64-${version}.run";
107-
sha256_64bit = "sha256-EPYWZwOur/6iN/otDMrNDpNXr1mzu8cIqQl8lXhQlzU==";
108-
fabricmanagerSha256 = "sha256-o8Kbmkg7qczKQclaGvEyXNzEOWq9ZpQZn9syeffnEiE==";
109-
useSettings = false;
110-
usePersistenced = false;
111-
useFabricmanager = true;
112-
113-
patches = [ rcu_patch ];
114-
115-
broken = kernel.kernelAtLeast "6.5";
116-
};
103+
dc = dc_565;
117104

118105
dc_535 = generic rec {
119106
version = "535.154.05";
@@ -128,6 +115,17 @@ rec {
128115
patches = [ rcu_patch ];
129116
};
130117

118+
dc_565 = generic rec {
119+
version = "565.57.01";
120+
url = "https://us.download.nvidia.com/tesla/${version}/NVIDIA-Linux-x86_64-${version}.run";
121+
sha256_64bit = "sha256-buvpTlheOF6IBPWnQVLfQUiHv4GcwhvZW3Ks0PsYLHo=";
122+
persistencedSha256 = "sha256-hdszsACWNqkCh8G4VBNitDT85gk9gJe1BlQ8LdrYIkg=";
123+
fabricmanagerSha256 = "sha256-umhyehddbQ9+xhhoiKC7SOSVxscA5pcnqvkQOOLIdsM=";
124+
useSettings = false;
125+
usePersistenced = true;
126+
useFabricmanager = true;
127+
};
128+
131129
# Update note:
132130
# If you add a legacy driver here, also update `top-level/linux-kernels.nix`,
133131
# adding to the `nvidia_x11_legacy*` entries.

pkgs/os-specific/linux/nvidia-x11/fabricmanager.nix

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ nvidia_x11: sha256:
55
lib,
66
fetchurl,
77
patchelf,
8+
zlib,
9+
glibc,
810
}:
911

1012
let
1113
sys = lib.concatStringsSep "-" (lib.reverseList (lib.splitString "-" stdenv.system));
1214
bsys = builtins.replaceStrings [ "_" ] [ "-" ] sys;
1315
fmver = nvidia_x11.version;
16+
ldd = (lib.getBin glibc) + "/bin/ldd";
1417
in
1518

1619
stdenv.mkDerivation rec {
@@ -23,14 +26,23 @@ stdenv.mkDerivation rec {
2326
inherit sha256;
2427
};
2528

29+
phases = [
30+
"unpackPhase"
31+
"installPhase"
32+
];
33+
2634
installPhase = ''
2735
mkdir -p $out/{bin,share/nvidia-fabricmanager}
2836
for bin in nv{-fabricmanager,switch-audit};do
29-
${patchelf}/bin/patchelf \
30-
--set-interpreter ${stdenv.cc.libc}/lib/ld-${bsys}.so.2 \
31-
--set-rpath ${lib.makeLibraryPath [ stdenv.cc.libc ]} \
32-
--shrink-rpath \
33-
bin/$bin
37+
${patchelf}/bin/patchelf \
38+
--set-interpreter ${stdenv.cc.libc}/lib/ld-${bsys}.so.2 \
39+
--set-rpath ${
40+
lib.makeLibraryPath [
41+
stdenv.cc.libc
42+
zlib
43+
]
44+
} \
45+
bin/$bin
3446
done
3547
mv bin/nv{-fabricmanager,switch-audit} $out/bin/.
3648
for d in etc systemd share/nvidia;do
@@ -39,6 +51,11 @@ stdenv.mkDerivation rec {
3951
for d in include lib;do
4052
mv $d $out/.
4153
done
54+
patchShebangs $out/bin
55+
56+
for b in $out/bin/*;do
57+
${ldd} $b | grep -vqz "not found"
58+
done
4259
'';
4360

4461
meta = {

pkgs/top-level/linux-kernels.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ in {
430430
nvidia_x11_production = nvidiaPackages.production;
431431
nvidia_x11_vulkan_beta = nvidiaPackages.vulkan_beta;
432432
nvidia_dc = nvidiaPackages.dc;
433-
nvidia_dc_520 = nvidiaPackages.dc_520;
434433
nvidia_dc_535 = nvidiaPackages.dc_535;
434+
nvidia_dc_565 = nvidiaPackages.dc_565;
435435

436436
# this is not a replacement for nvidia_x11*
437437
# only the opensource kernel driver exposed for hydra to build

0 commit comments

Comments
 (0)