Add the udev rules back - d621f9d527 (comments)

This commit is contained in:
Tk-Glitch 2021-10-08 17:08:42 +02:00
parent 85a0f4f496
commit 65fd56bdeb
2 changed files with 28 additions and 0 deletions

24
60-nvidia.rules Normal file
View File

@ -0,0 +1,24 @@
# 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'"
# 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"
# Enable runtime PM for NVIDIA Audio devices
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", TEST=="power/control", ATTR{power/control}="auto"
# Enable runtime PM for NVIDIA USB xHCI Host Controller devices
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", TEST=="power/control", ATTR{power/control}="auto"
# Enable runtime PM for NVIDIA USB Type-C UCSI devices
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", TEST=="power/control", ATTR{power/control}="auto"
# Disable runtime PM for NVIDIA VGA/3D controller devices
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", TEST=="power/control", ATTR{power/control}="on"
# Disable runtime PM for NVIDIA Audio devices
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", TEST=="power/control", ATTR{power/control}="on"
# Disable runtime PM for NVIDIA USB xHCI Host Controller devices
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", TEST=="power/control", ATTR{power/control}="on"
# Disable runtime PM for NVIDIA USB Type-C UCSI devices
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", TEST=="power/control", ATTR{power/control}="on"

View File

@ -252,6 +252,7 @@ fi
source=($_source_name
'10-nvidia-drm-outputclass.conf'
'nvidia-utils-tkg.sysusers'
'60-nvidia.rules'
'nvidia-tkg.hook'
'linux-version.diff' # include linux version
'01-ipmi-vm.diff' # ipmi & vm patch for older than 415.22 releases (2018.12.7) (396.xx)
@ -288,6 +289,7 @@ msg2 "Selected driver integrity check behavior (md5sum or SKIP): $_md5sum" # If
md5sums=("$_md5sum"
'cb27b0f4a78af78aa96c5aacae23256c'
'3d2894e71d81570bd00bce416d3e547d'
'3d32130235acc5ab514e1021f7f5c439'
'f2166eb150cfdc9d2dd8ec380c3e5583'
'7a825f41ada7e106c8c0b713a49b3bfa'
'd961d1dce403c15743eecfe3201e4b6a'
@ -1279,6 +1281,8 @@ nvidia-utils-tkg() {
install -Dm644 "$srcdir"/nvidia-utils-tkg.sysusers "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf
install -Dm644 "$srcdir"/60-nvidia.rules "$pkgdir"/usr/lib/udev/rules.d/60-nvidia.rules
_create_links
}
package_nvidia-utils-tkg() {