diff options
author | Kiskae <Kiskae@users.noreply.github.com> | 2023-10-19 21:57:35 +0200 |
---|---|---|
committer | Kiskae <Kiskae@users.noreply.github.com> | 2023-10-19 21:57:35 +0200 |
commit | e24d43a18c99138b782fea2d00337e34539e360b (patch) | |
tree | 6bc2125ea574e31938f7e5f7c2f79eaad865ccd7 | |
parent | 5e4c2ada4fcd54b99d56d7bd62f384511a7e2593 (diff) | |
download | nixpkgs-e24d43a18c99138b782fea2d00337e34539e360b.tar nixpkgs-e24d43a18c99138b782fea2d00337e34539e360b.tar.gz nixpkgs-e24d43a18c99138b782fea2d00337e34539e360b.tar.bz2 nixpkgs-e24d43a18c99138b782fea2d00337e34539e360b.tar.lz nixpkgs-e24d43a18c99138b782fea2d00337e34539e360b.tar.xz nixpkgs-e24d43a18c99138b782fea2d00337e34539e360b.tar.zst nixpkgs-e24d43a18c99138b782fea2d00337e34539e360b.zip |
nixos/nvidia: partially revert #181674
nvidia has changed the name of the chardev in the latest beta driver. Match the behavior of `nvidia-modprobe` and hardcode the major number.
-rw-r--r-- | nixos/modules/hardware/video/nvidia.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index a40713ac25c..bffff73323f 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -269,9 +269,9 @@ in { services.udev.extraRules = '' # Create /dev/nvidia-uvm when the nvidia-uvm module is loaded. - KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'" - KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'for i in $$(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \ -f 4); do mknod -m 666 /dev/nvidia$${i} c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) $${i}; done'" - KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'" + KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c 195 255'" + KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'for i in $$(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \ -f 4); do mknod -m 666 /dev/nvidia$${i} c 195 $${i}; done'" + KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c 195 254'" KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'" KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 1'" ''; |