-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add udev rules for node presence and runtime PM
Based on https://github.com/negativo17/nvidia-kmod-common/blob/master/60-nvidia.rules Supposedly helps with HansKristian-Work/vkd3d-proton#711 Thanks to @aufkrawall for pinging
- Loading branch information
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
7c0bbf6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into it!
Unfortunately I still have to run
nvidia-modprobe -u -c=0
to make RDR2 work in Wine. :(7c0bbf6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also still running into this and "nvidia-modprobe -u -c=0" fixes it. 470.74, RTX 2060
7c0bbf6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After looking into this a bit more, the /dev/nvidia-uvm-tools & /dev/nvidia-uvm device nodes are still not created. The udev rules file is installed. This is on an up to date archlinux install.
7c0bbf6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeisom You can try the udev rules used in the Ubuntu PPA.
7c0bbf6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those rules don't help. The udev rules need to create the nvidia-uvm & nvidia-uvm-tools for it to work correctly. I am using the Ghostrunner demo as a test and selecting DX12 as the renderer. It complains the I don't have a DX12 compatible card if I don't have those nodes created. I don't know why the rules aren't being triggered as I don't know enough about udev rules themselves.
7c0bbf6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I tracked down the problem. nvidia-uvm isn't loaded by default. I added a conf file in /etc/module-load.d/ to load it and it works fine. I am not sure what the "proper" fix is though.