forked from pool/nvidia-open-driver-G06-signed
- set options for nvidia kernel module via modprobe install script;
no longer adjusting of nvidia's NVreg_DeviceFileGID option in modprobe.d file needed in %post OBS-URL: https://build.opensuse.org/package/show/X11:Drivers:Video:Redesign/nvidia-open-driver-G06-signed?expand=0&rev=10
This commit is contained in:
parent
e62cf724da
commit
c9b041744d
@ -2,13 +2,15 @@
|
|||||||
%dir %{kernel_module_directory}/%2-%1
|
%dir %{kernel_module_directory}/%2-%1
|
||||||
%dir %{kernel_module_directory}/%2-%1/updates
|
%dir %{kernel_module_directory}/%2-%1/updates
|
||||||
%{kernel_module_directory}/%2-%1/updates/nvidia*.ko
|
%{kernel_module_directory}/%2-%1/updates/nvidia*.ko
|
||||||
%dir /usr/lib/nvidia-open-driver-G06-signed
|
|
||||||
/usr/lib/nvidia-open-driver-G06-signed/50-nvidia-%1.conf
|
|
||||||
%if 0%{?suse_version} >= 1550
|
%if 0%{?suse_version} >= 1550
|
||||||
|
%dir /usr/lib/modprobe.d
|
||||||
|
%config /usr/lib/modprobe.d/50-nvidia-%1.conf
|
||||||
%dir /usr/lib/dracut
|
%dir /usr/lib/dracut
|
||||||
%dir /usr/lib/dracut/dracut.conf.d
|
%dir /usr/lib/dracut/dracut.conf.d
|
||||||
/usr/lib/dracut/dracut.conf.d/60-nvidia-%1.conf
|
/usr/lib/dracut/dracut.conf.d/60-nvidia-%1.conf
|
||||||
%else
|
%else
|
||||||
|
%dir %{_sysconfdir}/modprobe.d
|
||||||
|
%config %{_sysconfdir}/modprobe.d/50-nvidia-%1.conf
|
||||||
%dir /etc/dracut.conf.d
|
%dir /etc/dracut.conf.d
|
||||||
/etc/dracut.conf.d/60-nvidia-%1.conf
|
/etc/dracut.conf.d/60-nvidia-%1.conf
|
||||||
%endif
|
%endif
|
||||||
|
@ -27,11 +27,6 @@ for dev in $(ls -d /sys/bus/pci/devices/*); do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# groups are now dynamic
|
|
||||||
VIDEOGID=`getent group video | cut -d: -f3`
|
|
||||||
sed "s/33/$VIDEOGID/" /usr/lib/nvidia-open-driver-G06-signed/50-nvidia-$flavor.conf > \
|
|
||||||
/etc/modprobe.d/50-nvidia-$flavor.conf
|
|
||||||
|
|
||||||
# Workaround needed on TW for simpledrm (boo#1201392)
|
# Workaround needed on TW for simpledrm (boo#1201392)
|
||||||
%if 0%{?suse_version} >= 1550
|
%if 0%{?suse_version} >= 1550
|
||||||
pbl --add-option nosimplefb=1 --config
|
pbl --add-option nosimplefb=1 --config
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# convert to one line via " awk '{ printf "%s ", $0 }' " script.txt'
|
# convert to one line via " awk '{ printf "%s ", $0 }' " script.txt'
|
||||||
|
|
||||||
PATH=$PATH:/bin:/usr/bin;
|
PATH=$PATH:/bin:/usr/bin;
|
||||||
if /sbin/modprobe --ignore-install nvidia; then
|
if /sbin/modprobe --ignore-install nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=$(getent group video | cut -d: -f3) NVreg_DeviceFileMode=0660 NVreg_PreserveVideoMemoryAllocations=1; then
|
||||||
if /sbin/modprobe nvidia_uvm; then
|
if /sbin/modprobe nvidia_uvm; then
|
||||||
if [ ! -c /dev/nvidia-uvm ]; then
|
if [ ! -c /dev/nvidia-uvm ]; then
|
||||||
mknod -m 660 /dev/nvidia-uvm c $(cat /proc/devices | while read major device; do if [ "$device" == "nvidia-uvm" ]; then echo $major; break; fi ; done) 0;
|
mknod -m 660 /dev/nvidia-uvm c $(cat /proc/devices | while read major device; do if [ "$device" == "nvidia-uvm" ]; then echo $major; break; fi ; done) 0;
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 19 15:20:18 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>
|
||||||
|
|
||||||
|
- set options for nvidia kernel module via modprobe install script;
|
||||||
|
no longer adjusting of nvidia's NVreg_DeviceFileGID option in
|
||||||
|
modprobe.d file needed in %post
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jan 19 13:26:44 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>
|
Thu Jan 19 13:26:44 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>
|
||||||
|
|
||||||
|
@ -133,19 +133,22 @@ for flavor in %{flavors_to_build}; do
|
|||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
|
||||||
MODPROBE_SAMPLE_DIR=%{buildroot}/usr/lib/%{name}
|
%if 0%{?suse_version} >= 1550
|
||||||
|
MODPROBE_DIR=%{buildroot}/usr/lib/modprobe.d
|
||||||
|
%else
|
||||||
|
MODPROBE_DIR=%{buildroot}%{_sysconfdir}/modprobe.d
|
||||||
|
%endif
|
||||||
|
|
||||||
mkdir -p $MODPROBE_SAMPLE_DIR
|
mkdir -p $MODPROBE_DIR
|
||||||
for flavor in %flavors_to_build; do
|
for flavor in %flavors_to_build; do
|
||||||
cat > $MODPROBE_SAMPLE_DIR/50-nvidia-$flavor.conf << EOF
|
cat > $MODPROBE_DIR/50-nvidia-$flavor.conf << EOF
|
||||||
blacklist nouveau
|
blacklist nouveau
|
||||||
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_PreserveVideoMemoryAllocations=1
|
|
||||||
options nvidia-drm modeset=1
|
options nvidia-drm modeset=1
|
||||||
### Enable support on *all* Turing/Ampere GPUs: Alpha Quality!
|
### Enable support on *all* Turing/Ampere GPUs: Alpha Quality!
|
||||||
#options nvidia NVreg_OpenRmEnableUnsupportedGpus=1
|
#options nvidia NVreg_OpenRmEnableUnsupportedGpus=1
|
||||||
EOF
|
EOF
|
||||||
echo -n "install nvidia " >> $MODPROBE_SAMPLE_DIR/50-nvidia-$flavor.conf
|
echo -n "install nvidia " >> $MODPROBE_DIR/50-nvidia-$flavor.conf
|
||||||
tail -n +3 %_sourcedir/modprobe.nvidia.install | awk '{ printf "%s ", $0 }' >> $MODPROBE_SAMPLE_DIR/50-nvidia-$flavor.conf
|
tail -n +3 %_sourcedir/modprobe.nvidia.install | awk '{ printf "%s ", $0 }' >> $MODPROBE_DIR/50-nvidia-$flavor.conf
|
||||||
# otherwise nvidia-uvm is missing in initrd and won't get loaded when nvidia
|
# otherwise nvidia-uvm is missing in initrd and won't get loaded when nvidia
|
||||||
# module is loaded in initrd; so better let's load all the nvidia modules
|
# module is loaded in initrd; so better let's load all the nvidia modules
|
||||||
# later ...
|
# later ...
|
||||||
|
Loading…
Reference in New Issue
Block a user