Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#72306 - [nvidia] permissions not correctly set for UVM module stops some Vulkan applications from working

Attached to Project: Arch Linux
Opened by Dietrich Hallentforden (aufkrawall) - Thursday, 30 September 2021, 19:16 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Saturday, 20 November 2021, 11:29 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Red Dead Redemption 2 (Vulkan) or CyberPunk 2077 (Vulkan via vkd3d-proton) don't start in Wine (not Proton) due to this if not some other (apparently more or less random) Vulkan applications have been started before. Steam Proton is not affected, as its runtime sets the required permissions by itself. A workaround is to run "sudo nvidia-modprobe -u -c=0" to make it work also outside of Proton.

Ubuntu ships a binary with a udev rule that automatically sets the correct permissions, see this comment:

nvidia-dkms 470.74-3
linux 5.14.8.arch1-1
nvidia-drm.modeset=1 & Plasma rootless Xorg session started via xinit (just mentioning it in case it matters)
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Saturday, 20 November 2021, 11:29 GMT
Reason for closing:  Fixed
Comment by loqs (loqs) - Friday, 01 October 2021, 03:10 GMT Comment by Sven-Hendrik Haase (Svenstaro) - Friday, 05 November 2021, 06:01 GMT
It would appear we only really need this:

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'"

However, I can't reproduce this issue and my device nodes are apparently always happily being created. Any way I can repro the issue somewhat cleanly?
Comment by Dietrich Hallentforden (aufkrawall) - Sunday, 07 November 2021, 17:19 GMT
I'm not aware of a better way to reproduce than initially reported.

It works with Tk-Glitch's build script since these changes:
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 16 November 2021, 07:06 GMT
I pushed some packages with these changes to [testing]. I'd appreciate some testers. :)
Comment by Dietrich Hallentforden (aufkrawall) - Tuesday, 16 November 2021, 21:54 GMT
Tested with Diablo 2 Resurrected in Lutris and it indeed fixes it.