How do I enable automatically nvidia-uvm?

in order to use darktable with OpenCL everytime before starting darktable I have to issue

sudo modprobe nvidia-uvm
sudo mknod -m 666 /dev/nvidia-uvm c 250 0

What is the right way to enable nvidia-uvm by default?

Regards, Oliver

1 Answer

Proper way to do this is described in CUDA documentation:

Script from link above:

#!/bin/bash
/sbin/modprobe nvidia
if [ "$?" -eq 0 ]; then # Count the number of NVIDIA controllers found. NVDEVS=`lspci | grep -i NVIDIA` N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l` NVGA=`echo "$NVDEVS" | grep "VGA compatible controller" | wc -l` N=`expr $N3D + $NVGA - 1` for i in `seq 0 $N`; do mknod -m 666 /dev/nvidia$i c 195 $i done mknod -m 666 /dev/nvidiactl c 195 255
else exit 1
fi
/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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like