nvidia-graphics-drivers-* should recommend nvidia-modprobe

Bug #1361207 reported by Michael Schaller
126
This bug affects 36 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-331 (Ubuntu)
Won't Fix
Undecided
Unassigned
nvidia-graphics-drivers-331-updates (Ubuntu)
Confirmed
Undecided
Unassigned
nvidia-graphics-drivers-340 (Ubuntu)
Confirmed
Undecided
Unassigned
nvidia-graphics-drivers-340-updates (Ubuntu)
Confirmed
Undecided
Alberto Milone
nvidia-graphics-drivers-346 (Ubuntu)
Confirmed
Undecided
Alberto Milone
nvidia-graphics-drivers-346-updates (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

nvidia-modprobe allows non-root users to load NVIDIA kernel modules and it creates the respective device entries. This is important for CUDA users as they would otherwise have to run a workaround script to load the kernel modules and create the device entries. This is documented here:
http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf -> 4.8 Verification

Because of this newer nvidia-graphics-drivers packages (331 and newer) should at least recommend nvidia-modprobe. Furthermore the nvidia-modprobe is not available from xorg-edgers. Utopic includes an nvidia-modprobe package though.

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

So, just to be clear, is this why i can't get CUDA to work with the 343.22 drivers from xorg-edgers PPA?

Revision history for this message
Michael Schaller (misch-9) wrote :

The issue I'm referring to here is present since 331.67. The default NVIDIA driver in Trusty is 331.38.
This issue is characterized by CUDA applications failing during initialization with an error similar to this one:
CUDA Runtime API error 30: unknown error

For newer NVIDIA driver you need to install the nvidia-###-uvm package (### == major NVIDIA driver version).
After that you need to ensure after every reboot that the nvidia-uvm kernel module is loaded and /dev/nvidia-uvm is present.
If you have nvidia-modprobe installed then it takes care of these two conditions if you launch a CUDA application.
A CUDA application would also react similar to nvidia-modprobe if you would run it with root rights.
As a last resort you can run the script I've mentioned in the bug description to load the nvidia-uvm kernel module and create the /dev/nvidia-uvm character device after a reboot.

Of all solutions nvidia-modprobe is the most convenient one as everything works out of the box if needed but it might be considered a security concern as it is a setuid binary. You can install the nvidia-modprobe package from Utopic if you want to give it a try.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-331 (Ubuntu):
status: New → Confirmed
Revision history for this message
YAFU (yafu) wrote :

I don't know is this is the same problem, but this is happening in Ubuntu 14.10 Utopic beta, nVidia 331.89:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331-updates/+bug/1375841

I hope this will be solved before 14.10 be released.

Revision history for this message
YAFU (yafu) wrote :

Well, I installed the "nvidia-modprobe" package and that seems to solve the problem.
$ lsmod | grep nvi
nvidia_uvm 34855 0
nvidia 10728519 41 nvidia_uvm
drm 310919 3 nvidia

Definitely when the nvidia drive is installed then "nvidia-modprobe" should be automatically installed as a dependency.

Graham Inggs (ginggs)
Changed in nvidia-graphics-drivers-331-updates (Ubuntu):
status: New → Confirmed
Revision history for this message
Graham Inggs (ginggs) wrote :

nvidia-modprobe is now available in trusty-backports

Revision history for this message
Romaine Rose-Cameron (r0ma1ne) wrote :

I'm using Linux MInt 17.1 which uses Trusty and 'nvidia-modprobe' isnt a package i can install, it doesnt come with nvidia-331 or nvidia-340 (343 and 346 dont support my card so i havent bothered to test) as i'm sure it did along with a few other programs that havent been availible in the last few days like nvidia-smi and nvidia-xconfig, even that dodgy persistenced thing. I'll make another, more detailed bug rebort on that as it's pretty much off topic. I'm just letting you know i cant get nvidia-modprobe using any of the methods suggested.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: New → Confirmed
Revision history for this message
Graham Inggs (ginggs) wrote :

@r0ma1ne: Check the Mint documentation on how to enable the backports repository.
I do not know if they keep in sync with the Ubuntu backports though. If they don't, you should be able to download and install the .deb from here:
https://launchpad.net/ubuntu/+source/nvidia-modprobe/

Revision history for this message
YAFU (yafu) wrote :

Putting the package in backports is just a workaround. nvidia-modprobe should be automatically installed when you install the nvidia driver. Does it happening currently with new versions of Ubuntu?
Otherwise, this is still a big problem for users:
http://blenderartists.org/forum/showthread.php?355719-No-Cuda-option

@r0ma1ne, you read that thread in latest posts (user have mint 17)

Revision history for this message
Graham Inggs (ginggs) wrote :

@yafu:
> Does it happening currently with new versions of Ubuntu?

No it doesn't. That is why this bug is still open.

Revision history for this message
Graham Inggs (ginggs) wrote :

MIR (main inclusion request) filed: LP: #1421209

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-340-updates (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-346 (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-346-updates (Ubuntu):
status: New → Confirmed
Revision history for this message
Márcio Jorge PimentaParola (parola-marcio) wrote :

i hope that is resololved, but the help from you are good...
thanks

Changed in nvidia-graphics-drivers-340-updates (Ubuntu):
assignee: nobody → Márcio Jorge PimentaParola (parola-marcio)
Revision history for this message
YAFU (yafu) wrote :

@Are you Ubuntu package maintainer? Why you are assigned to this issue?

Revision history for this message
YAFU (yafu) wrote :

Sorry, my previous post was for Márcio Jorge PimentaParola

Revision history for this message
Alberto Milone (albertomilone) wrote :

I'm the maintainer. Reassigning the bug back to me

Changed in nvidia-graphics-drivers-340-updates (Ubuntu):
assignee: Márcio Jorge PimentaParola (parola-marcio) → Alberto Milone (albertomilone)
Changed in nvidia-graphics-drivers-346 (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
VF (fviktor) wrote :

I faced this problem on Ubuntu 15.04. The missing device nodes / kernel module can manifest in all kind of failures and error messages, depending on which application you try to use. Due to the misleading error messages it took hours to finally track down the issue and find this ticket with the correct explanation and solution. Installing the nvidia-modprobe package solved the problem instantly. Having this package recommended with the nvidia driver and/or a dependency of the nvidia-cuda-toolkit package could have saved this wasted effort.

Revision history for this message
libuntu (libuntu) wrote :

the bug is solved installing nvidia-modprobe!

Graham Inggs (ginggs)
summary: - [xorg-edgers] nvidia-graphics-drivers-331 and newer should recommend
- nvidia-modprobe
+ nvidia-graphics-drivers-* should recommend nvidia-modprobe
Revision history for this message
Olli Niemi (olliniem) wrote :

Ubuntu 15.10 status: Installing only nvidia-352 and nvidia-cuda-toolkit packages forces Blender 2.76 to be started as root for the CUDA option to be visible in Blender menus (no errors reported in Blender). Installing also nvidia-modprobe fixes this problem: Blender can be started as normal user.

Starting Blender as root naturally saves the project files as root:root as well, possibly also other files, including user preferences. The nvidia-modprobe package installation seems more like a requirement in this use case.

Revision history for this message
Alberto Milone (albertomilone) wrote :

Just an update: while we are not going to use nvidia-modprobe, we are going to use a different tool I am working on, that will rely on udev and will accomplish the same as nvidia-modprobe.

Revision history for this message
ragtag (ragtag-ragtag) wrote :

With the nvidia-352 driver in 14.04, there no longer seems to be an uvm package, and the nvidia-modprobe package is at version 340.21.

In the past I've added "nvidia-uvm" to /etc/modules, and the following from here [ http://developer.download.nvidia.com/compute/cuda/6_5/rel/docs/CUDA_Getting_Started_Linux.pdf ] to /etc/rc.local to get CUDA working in Blender:

/sbin/modprobe nvidia-uvm
if [ "$?" -eq 0 ]; then
 # Find out the major device number used by the nvidia-uvm driver
 D=`grep nvidia-uvm /proc/devices | awk '{print $1}'`
 mknod -m 666 /dev/nvidia-uvm c $D 0
else
 exit 1
fi

With nvidia-modprobe installed, "lsmod | grep nvi" does list nvidia-uvm, but there is not /dev/nvidia-uvm device created. Running the above script snippet creates /dev/nvidia-uvm, but CUDA is still not working in Blender.

It would be great if CUDA worked out of the box, either when you install the nvidia-352 driver, or at least when you install libcuda1-352.

Revision history for this message
ragtag (ragtag-ragtag) wrote :

It seems I was using a faulty test to see if CUDA was working. Apparently the version of Blender that comes with 14.04, is not compiled with CUDA support. Running the latest version of Blender from blender.org got working CUDA support without doing anything beyond installing nvidia-modprob, nvidia-352 and libcuda1-352.

I second the original ticket, that nvidia-modprobe should probably be added to the dependencies, but it seems like you're working on a different solution there, so this probably wont be a problem in the near future.

Revision history for this message
Michael Schaller (misch-9) wrote :

Alberto, can you give an update on the udev approach to fix this issue?
Furthermore if there is a specific bug we could follow please link it here.

Revision history for this message
Alberto Milone (albertomilone) wrote :

@Michael: the idea is to have all the modules loaded and all the devices available on boot, even when starting a non graphical environment. This way we do not need nvidia-modprobe at all.

Revision history for this message
Michael Schaller (misch-9) wrote :

@Alberto: I know the plan and I fully agree with it. I was asking for a status update and if there is a bug or something else that we could follow/monitor instead of asking you for an update. ;-)

Revision history for this message
Alberto Milone (albertomilone) wrote :

@Michael: no, there is no bug report for it yet. I am finally working on it, so I expect to deliver a fix for 16.04 soon.

Revision history for this message
Michael Schaller (misch-9) wrote :

@Alberto: Thanks. Will this also be backported to the long-term supported 340 and 352 driver series?

Revision history for this message
Alberto Milone (albertomilone) wrote :

Yes, a backport is certainly possible. I'll create a new bug report for it.

Revision history for this message
Alberto Milone (albertomilone) wrote :

here is the new bug report LP: #1540896

Revision history for this message
Michael Schaller (misch-9) wrote :

Awesome. Thanks, Alberto.

ganga (dotadrova)
Changed in nvidia-graphics-drivers-331 (Ubuntu):
status: Confirmed → Fix Released
Graham Inggs (ginggs)
Changed in nvidia-graphics-drivers-331 (Ubuntu):
status: Fix Released → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.