Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 615558

Summary: x11-drivers/nvidia-drivers - udev rule should create /dev/nvidia-uvm
Product: Gentoo Linux Reporter: Plero H <plero_hero>
Component: Current packagesAssignee: Jeroen Roovers (RETIRED) <jer>
Status: RESOLVED DUPLICATE    
Severity: normal CC: hardened
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Plero H 2017-04-14 16:05:41 UTC
nvidia-drivers do not create uvm device, even when uvm flag is set.
So we must execute the script of http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#runfile-verifications every time we want to use cuda.

Instead we could create a udev rule to create the device when uvm module is loaded.
This udev rule could create the device itself or run the proposed script by nvidia.

My proposed udev rule:

ACTION=="add", SUBSYSTEM=="module", DEVPATH=="/module/nvidia_uvm", PROGRAM="/bin/grep nvidia-uvm /proc/devices", ENV{dev_num}="%c{1}", RUN+="/bin/mknod -m 666 /dev/nvidia-uvm c $env{dev_num} 0"

Please include that udev rule when uvm flag is set and if possible propose this udev rule upstream.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2017-04-25 07:50:20 UTC
Works for me and you didn't include any information about your system so I guess you need to read the bug reporting guidelines before you continue.
Comment 2 Plero H 2017-05-14 21:09:41 UTC
Can you please elaborate more?
Does your system creates a uvm device?
I removed 'sometimes' from the title, it's misleading.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2017-09-27 12:52:43 UTC
(In reply to Plero H from comment #0)
> My proposed udev rule:
> 
> ACTION=="add", SUBSYSTEM=="module", DEVPATH=="/module/nvidia_uvm",
> PROGRAM="/bin/grep nvidia-uvm /proc/devices", ENV{dev_num}="%c{1}",
> RUN+="/bin/mknod -m 666 /dev/nvidia-uvm c $env{dev_num} 0"

Are you sure that should be read/write for all users?
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2018-01-27 12:37:20 UTC

*** This bug has been marked as a duplicate of bug 506696 ***