fix u shit
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 1m38s

This commit is contained in:
Ward from fusion-voyager-3 2024-09-02 12:32:23 +03:00
parent 039c0b25fb
commit 367bf8c755
5 changed files with 44 additions and 9 deletions

View File

@ -1 +1 @@
3
4

View File

@ -1,4 +1,4 @@
nvidia-graphics-drivers-555 (555.58.02-101pika6) pika; urgency=medium
nvidia-graphics-drivers-555 (555.58.02-101pika7) pika; urgency=medium
* New upstream

View File

@ -1 +1,2 @@
nvidia-modprobe /usr/bin/
nvidia-modprobe /usr/bin/
extra_files/nvidia-create-device-nodes /usr/bin/

View File

@ -5,11 +5,7 @@
# nvidia-modprobe should not be invoked.
ACTION=="add|bind", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", \
DRIVER=="nvidia", TEST!="/dev/nvidia-uvm", \
RUN+="/usr/bin/nvidia-modprobe", \
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"
RUN+="/usr/bin/nvidia-create-device-nodes"
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="add|bind", SUBSYSTEM=="pci", DRIVERS=="nvidia", ATTR{vendor}=="0x10de", \
@ -17,4 +13,5 @@ ACTION=="add|bind", SUBSYSTEM=="pci", DRIVERS=="nvidia", ATTR{vendor}=="0x10de",
# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="remove|unbind", SUBSYSTEM=="pci", DRIVERS=="nvidia", ATTR{vendor}=="0x10de", \
ATTR{class}=="0x03[0-9]*", TEST=="power/control", ATTR{power/control}="on"
ATTR{class}=="0x03[0-9]*", TEST=="power/control", ATTR{power/control}="on"

View File

@ -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