From cc313f2e9bd762a9a31b08b3553bbee0f5994570 Mon Sep 17 00:00:00 2001 From: Vasiliy Stelmachenok <92667539+ventureoo@users.noreply.github.com> Date: Sun, 18 Feb 2024 12:44:56 +0300 Subject: [PATCH] Sync udev rules with arch (#216) --- 60-nvidia.rules | 11 +++++------ PKGBUILD | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/60-nvidia.rules b/60-nvidia.rules index 31d5bd2..851b9ed 100644 --- a/60-nvidia.rules +++ b/60-nvidia.rules @@ -1,9 +1,8 @@ -# Make sure device nodes are present even when the DDX is not started for the Wayland/EGLStream case -KERNEL=="nvidia", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'" -KERNEL=="nvidia", RUN+="/usr/bin/bash -c 'for i in $$(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \ -f 4); do /usr/bin/mknod -Z -m 666 /dev/nvidia$${i} c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) $${i}; done'" -KERNEL=="nvidia_modeset", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidia-modeset c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'" -KERNEL=="nvidia_uvm", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidia-uvm c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'" -KERNEL=="nvidia_uvm", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidia-uvm-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 1'" +# Device nodes are created by nvidia-modprobe, which is called by the nvidia DDX. +# In case the DDX is not started, the device nodes are never created, so call +# nvidia-modprobe in the udev rules to cover the Wayland/EGLStream and compute +# case without a started display. +KERNEL=="nvidia", DRIVER=="nvidia", RUN+="/usr/bin/nvidia-modprobe" # Enable runtime PM for NVIDIA VGA/3D controller devices ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", TEST=="power/control", ATTR{power/control}="auto" diff --git a/PKGBUILD b/PKGBUILD index b884fbb..6354c6b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -382,7 +382,7 @@ msg2 "Selected driver integrity check behavior (md5sum or SKIP): $_md5sum" # If md5sums=("$_md5sum" 'cb27b0f4a78af78aa96c5aacae23256c' '3d2894e71d81570bd00bce416d3e547d' - '3d32130235acc5ab514e1021f7f5c439' + 'd868c671fd7a542722a1889f5d38441d' '596f7cbf2db48d4f5b1c38967bb93cea' '9b1543768ea75320fd0d2315de66d1c8' '7a825f41ada7e106c8c0b713a49b3bfa'