forked from pool/nvidia-open-driver-G06-signed
- package the modprobe.d file as a sample in
/usr/lib/nvidia-open-driver-G06-signed; then adjust GUID of video group for nvidia's NVreg_DeviceFileGID option and write the result to /etc/modprobe.d, i.e. no longer touch a packaged modprobe.d file below /usr OBS-URL: https://build.opensuse.org/package/show/X11:Drivers:Video:Redesign/nvidia-open-driver-G06-signed?expand=0&rev=9
This commit is contained in:
parent
00de8a078a
commit
e62cf724da
@ -2,15 +2,13 @@
|
||||
%dir %{kernel_module_directory}/%2-%1
|
||||
%dir %{kernel_module_directory}/%2-%1/updates
|
||||
%{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
|
||||
%dir /usr/lib/modprobe.d
|
||||
%config /usr/lib/modprobe.d/50-nvidia-%1.conf
|
||||
%dir /usr/lib/dracut
|
||||
%dir /usr/lib/dracut/dracut.conf.d
|
||||
/usr/lib/dracut/dracut.conf.d/60-nvidia-%1.conf
|
||||
%else
|
||||
%dir %{_sysconfdir}/modprobe.d
|
||||
%config %{_sysconfdir}/modprobe.d/50-nvidia-%1.conf
|
||||
%dir /etc/dracut.conf.d
|
||||
/etc/dracut.conf.d/60-nvidia-%1.conf
|
||||
%endif
|
||||
|
@ -27,6 +27,11 @@ for dev in $(ls -d /sys/bus/pci/devices/*); do
|
||||
fi
|
||||
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)
|
||||
%if 0%{?suse_version} >= 1550
|
||||
pbl --add-option nosimplefb=1 --config
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 19 13:26:44 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
- package the modprobe.d file as a sample in
|
||||
/usr/lib/nvidia-open-driver-G06-signed; then adjust GUID of
|
||||
video group for nvidia's NVreg_DeviceFileGID option and write the
|
||||
result to /etc/modprobe.d, i.e. no longer touch a packaged
|
||||
modprobe.d file below /usr
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 19 10:56:45 UTC 2023 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
|
@ -133,30 +133,19 @@ for flavor in %{flavors_to_build}; do
|
||||
popd
|
||||
done
|
||||
|
||||
%if 0%{?suse_version} >= 1550
|
||||
MODPROBE_DIR=%{buildroot}/usr/lib/modprobe.d
|
||||
%else
|
||||
MODPROBE_DIR=%{buildroot}%{_sysconfdir}/modprobe.d
|
||||
%endif
|
||||
MODPROBE_SAMPLE_DIR=%{buildroot}/usr/lib/%{name}
|
||||
|
||||
# groups are now dynamic
|
||||
# let's hope it's not installation, but only distribution release specific
|
||||
# so it's the same for build systems and installed systems later
|
||||
# for some reason it's not allowed to do this in %post
|
||||
# and hopefully this is no longer needed with usage of ACLs anyway
|
||||
VIDEOGID=`getent group video | cut -d: -f3`
|
||||
mkdir -p $MODPROBE_DIR
|
||||
mkdir -p $MODPROBE_SAMPLE_DIR
|
||||
for flavor in %flavors_to_build; do
|
||||
cat > $MODPROBE_DIR/50-nvidia-$flavor.conf << EOF
|
||||
cat > $MODPROBE_SAMPLE_DIR/50-nvidia-$flavor.conf << EOF
|
||||
blacklist nouveau
|
||||
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_PreserveVideoMemoryAllocations=1
|
||||
options nvidia-drm modeset=1
|
||||
### Enable support on *all* Turing/Ampere GPUs: Alpha Quality!
|
||||
#options nvidia NVreg_OpenRmEnableUnsupportedGpus=1
|
||||
EOF
|
||||
sed -i "s/33/$VIDEOGID/" $MODPROBE_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_DIR/50-nvidia-$flavor.conf
|
||||
echo -n "install nvidia " >> $MODPROBE_SAMPLE_DIR/50-nvidia-$flavor.conf
|
||||
tail -n +3 %_sourcedir/modprobe.nvidia.install | awk '{ printf "%s ", $0 }' >> $MODPROBE_SAMPLE_DIR/50-nvidia-$flavor.conf
|
||||
# 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
|
||||
# later ...
|
||||
|
Loading…
x
Reference in New Issue
Block a user