[Slackbuilds-users] nvidia-driver CUDA glitch

King Beowulf kingbeowulf at gmail.com
Mon Jul 14 01:09:04 UTC 2014


On 07/13/2014 03:39 PM, Mats Bertil Tegner wrote:
> On 2014-07-13 20:18, King Beowulf wrote:
>> I just realized a fix for a glitch with the new nvidia-driver and CUDA
>> initialization.  Since the slackbuild is already in "approved" and its
>> not fatal unless you run CUDA/OpenCL programs, I'll fix this up on the
>> next update.  This issue popped up somewhere in the 331.xx drivers.
>>
>> For those of you, as I do, who run BOINC, or another CUDA program, you
>> may have wondered about "no usable GPUs found" message in the BOINC log.
>>   Turns out, some weird process in the way Nvidia does things now, since
>> the introduction of nvidia-uvm.ko, prevents the creation of a required
>> device node unless you first run your CUDA program as "root."  This then
>> creates the device node and all is then well as a regular user.  You
>> should see:
>>
>> $ ls -l /dev/nvidia-uvm
>> crw-rw-rw- 1 root root 248, 0 Jul 13 01:45 /dev/nvidia-uvm
>>
>> A quick test program, as well as possible fixes, are in the Reference
>> below. The question now is, how best to handle this in the slackbuild?
>>
>> 1. put this in doinst.sh
>>      mknod -m 660 /dev/nvidia-uvm c 249 0
>>      chgrp video /dev/nvidia-uvm
>>
>> 2. udev rule?
>>      KERNEL=="nvidia_uvm", RUN+="/usr/bin/bash -c '/usr/bin/mknod -m 666
>> /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0;
>> /usr/bin/chgrp video /dev/nvidia-uvm'"
>>
>> 3. Compile nvidia-modprobe by default (optional now) so that X userland
>> can make the node, or invoke via doinst.sh if not.
>>
>> I'll post this in LQ as well to get better coverage.
>>
>> References:
>> 1.
>> https://devtalk.nvidia.com/default/topic/699610/334-21-driver-returns-999-on-cuinit-cuda-/
>>
>> 2.
>> http://us.download.nvidia.com/XFree86/Linux-x86/340.24/README/faq.html
> 
> Thanks for the heads-up. I need CUDA/OpenCL support right now. Using the
> .run-file will give me the nvidia-uvm device.
> 
> Regards,
> Mats
> 
You just need to run OPTAPPS=yes ./nvidia-driver.SlackBuild to compile
it. After reboot, run as root "nvidia-modprobe -c 0 -u"  This will
create any missing dev nodes.

This does not survive reboot, so udev rules are teh way to go  but I am
a bit clueless there.

-Ed


More information about the SlackBuilds-users mailing list