fix udev rules again
This commit is contained in:
parent
f9f7a9bcc2
commit
8517b166b0
@ -1 +1,2 @@
|
|||||||
nvidia-modprobe /usr/bin/
|
nvidia-modprobe /usr/bin/
|
||||||
|
extra_files/nvidia-create-device-nodes /usr/bin/
|
@ -5,11 +5,7 @@
|
|||||||
# nvidia-modprobe should not be invoked.
|
# nvidia-modprobe should not be invoked.
|
||||||
ACTION=="add|bind", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", \
|
ACTION=="add|bind", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", \
|
||||||
DRIVER=="nvidia", TEST!="/dev/nvidia-uvm", \
|
DRIVER=="nvidia", TEST!="/dev/nvidia-uvm", \
|
||||||
RUN+="/usr/bin/nvidia-modprobe", \
|
RUN+="/usr/bin/nvidia-create-device-nodes"
|
||||||
RUN+="/usr/bin/bash -c 'for i in $(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \ -f 4); do /usr/bin/nvidia-modprobe -c${i} && /usr/bin/nvidia-modprobe -s -c${i}; done", \
|
|
||||||
RUN+="/usr/bin/nvidia-modprobe -l -m", \
|
|
||||||
RUN+="/usr/bin/nvidia-modprobe -c0 -u", \
|
|
||||||
RUN+="/usr/bin/nvidia-smi"
|
|
||||||
|
|
||||||
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
|
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
|
||||||
ACTION=="add|bind", SUBSYSTEM=="pci", DRIVERS=="nvidia", ATTR{vendor}=="0x10de", \
|
ACTION=="add|bind", SUBSYSTEM=="pci", DRIVERS=="nvidia", ATTR{vendor}=="0x10de", \
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
if ls /dev/ 2>&1 | grep nvidia[0-9] 2>&1 > /dev/null
|
||||||
|
then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
for gpu in $(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \ -f 4)
|
||||||
|
do
|
||||||
|
echo "Creating device node for NVGPU: ${gpu}"
|
||||||
|
/usr/bin/nvidia-modprobe -c${gpu}
|
||||||
|
/usr/bin/nvidia-modprobe -s -c${gpu}
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -e /dev/nvidia-uvm ]]
|
||||||
|
then
|
||||||
|
echo "Creating Unified Memory device nodes"
|
||||||
|
/usr/bin/nvidia-modprobe -c0 -u
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -e /dev/nvidia-nvlink ]]
|
||||||
|
then
|
||||||
|
echo "Creating Nvlink device nodes"
|
||||||
|
/usr/bin/nvidia-modprobe -l
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -e /dev/nvidia-modeset ]]
|
||||||
|
then
|
||||||
|
echo "Creating modeset device nodes"
|
||||||
|
/usr/bin/nvidia-modprobe -m
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -e /dev/nvidiactl ]]
|
||||||
|
then
|
||||||
|
echo "Creating NVIDIA Control device nodes"
|
||||||
|
nvidia-smi
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user