install libnvidia-gtk3.so* to fix nvidia-settings

modprobe.d/nvidia.conf: set nvidia_drm.modeset=1
dracut.conf.d/20-nvidia.conf: ensure kernel modules are added to initramfs [release 470.161.03-2mamba;Sat Mar 25 2023]
This commit is contained in:
Silvan Calarco 2024-01-06 07:47:40 +01:00
parent 97d2edab20
commit 43cf2813e5

View File

@ -3,7 +3,7 @@
Name: nvidia_470 Name: nvidia_470
Version: 470.161.03 Version: 470.161.03
Epoch: 1 Epoch: 1
Release: 1mamba Release: 2mamba
Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel
Group: System/Kernel and Hardware Group: System/Kernel and Hardware
Vendor: openmamba Vendor: openmamba
@ -20,9 +20,15 @@ License: no OSI Approved
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libX11-devel BuildRequires: libX11-devel
BuildRequires: libXext-devel BuildRequires: libXext-devel
BuildRequires: libat-spi2-core-devel
BuildRequires: libcairo-devel
BuildRequires: libegl-wayland-devel BuildRequires: libegl-wayland-devel
BuildRequires: libgcc BuildRequires: libgcc
BuildRequires: libgdk-pixbuf-devel
BuildRequires: libglib-devel
BuildRequires: libglvnd-devel BuildRequires: libglvnd-devel
BuildRequires: libgtk3-devel
BuildRequires: libpango-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
ExclusiveArch: x86_64 ExclusiveArch: x86_64
@ -205,6 +211,12 @@ install -D -m644 nvidia-settings.1.gz %{buildroot}%{_mandir}/man1/nvidia-setting
install -D -m644 nvidia-settings.desktop %{buildroot}%{_datadir}/applications/nvidia-settings.desktop install -D -m644 nvidia-settings.desktop %{buildroot}%{_datadir}/applications/nvidia-settings.desktop
install -D -m644 nvidia-settings.png %{buildroot}%{_datadir}/pixmaps/nvidia-settings.png install -D -m644 nvidia-settings.png %{buildroot}%{_datadir}/pixmaps/nvidia-settings.png
sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i %{buildroot}%{_datadir}/applications/nvidia-settings.desktop sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i %{buildroot}%{_datadir}/applications/nvidia-settings.desktop
install -D -m755 libnvidia-gtk3.so.%{version} %{buildroot}%{_libdir}/libnvidia-gtk3.so.%{version}
install -D -m 644 nvidia-settings.desktop \
%{buildroot}%{_datadir}/applications/nvidia-settings.desktop
install -D -m 644 nvidia-settings.png \
%{buildroot}%{_datadir}/pixmaps/nvidia-settings.png
# nvidia-bug-report # nvidia-bug-report
install -D -m755 nvidia-bug-report.sh %{buildroot}%{_bindir}/nvidia-bug-report.sh install -D -m755 nvidia-bug-report.sh %{buildroot}%{_bindir}/nvidia-bug-report.sh
@ -245,11 +257,6 @@ install -D -m644 %{SOURCE2} %{buildroot}%{_datadir}/X11/xorg.conf.d/10-nvidia-dr
install -Dm644 %{SOURCE1} %{buildroot}%{_sysusersdir}/nvidia.conf install -Dm644 %{SOURCE1} %{buildroot}%{_sysusersdir}/nvidia.conf
install -D -m 644 nvidia-settings.desktop \
%{buildroot}%{_datadir}/applications/nvidia-settings.desktop
install -D -m 644 nvidia-settings.png \
%{buildroot}%{_datadir}/pixmaps/nvidia-settings.png
## Clutter workaround (http://blog.sukimashita.com/2015/04/13/gnome-3-16-and-nvidia-binary-driver-crash-with-totem-gnome-maps-cheese-and-others/) ## Clutter workaround (http://blog.sukimashita.com/2015/04/13/gnome-3-16-and-nvidia-binary-driver-crash-with-totem-gnome-maps-cheese-and-others/)
#mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ #mkdir -p %{buildroot}%{_sysconfdir}/profile.d/
#cat > %{buildroot}%{_sysconfdir}/profile.d/nvidia-clutter.sh << _EOF #cat > %{buildroot}%{_sysconfdir}/profile.d/nvidia-clutter.sh << _EOF
@ -260,8 +267,14 @@ install -D -m 644 nvidia-settings.png \
install -d -m0755 %{buildroot}%{_modprobedir} install -d -m0755 %{buildroot}%{_modprobedir}
cat > %{buildroot}%{_modprobedir}/nvidia.conf << _EOF cat > %{buildroot}%{_modprobedir}/nvidia.conf << _EOF
blacklist nouveau blacklist nouveau
options nvidia_drm modeset=1
_EOF _EOF
install -d -m0755 %{buildroot}%{_sysconfdir}/dracut.conf.d
cat > %{buildroot}%{_sysconfdir}/dracut.conf.d/20-nvidia.conf << __EOF
add_drivers+=" nvidia nvidia_drm nvidia_modeset nvidia_uvm "
__EOF
# dkms # dkms
install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version} install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version}
cp -a kernel/* %{buildroot}%{_prefix}/src/%{name}-%{version}/ cp -a kernel/* %{buildroot}%{_prefix}/src/%{name}-%{version}/
@ -308,17 +321,7 @@ cd current/kernel
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n xorg-drv-video-%{name} %post -n xorg-drv-video-%{name}
# new install
if [ $1 -ge 1 ]; then
# clean any legacy alternatives symlink
find /lib/modules/*/kernel/drivers/video/ -name nvidia.ko -type l -exec rm -f {} \;
dkms add -q -m %{name} -v %{version}
dkms install -q -m %{name} -v %{version}
fi
/sbin/ldconfig /sbin/ldconfig
/sbin/depmod -a -F /boot/System.map-%{kernel_ver}%{?KERNEL_TARGET} \
%{kernel_ver}%{?KERNEL_TARGET} &>/dev/null
: :
%preun -n xorg-drv-video-%{name} %preun -n xorg-drv-video-%{name}
@ -330,6 +333,17 @@ fi
: :
%posttrans -n xorg-drv-video-%{name} %posttrans -n xorg-drv-video-%{name}
# new install
if [ $1 -ge 1 ]; then
# clean any legacy alternatives symlink
find /lib/modules/*/kernel/drivers/video/ -name nvidia.ko -type l -exec rm -f {} \;
dkms add -q -m %{name} -v %{version}
dkms install -q -m %{name} -v %{version}
fi
/sbin/depmod -a -F /boot/System.map-%{kernel_ver}%{?KERNEL_TARGET} \
%{kernel_ver}%{?KERNEL_TARGET} &>/dev/null
KVER=`uname -r` KVER=`uname -r`
INITRAMFS=/boot/initramfs-${KVER}.img INITRAMFS=/boot/initramfs-${KVER}.img
[ -e ${INITRAMFS} -a %{_modprobedir}/nvidia.conf -nt ${INITRAMFS} ] || continue [ -e ${INITRAMFS} -a %{_modprobedir}/nvidia.conf -nt ${INITRAMFS} ] || continue
@ -338,7 +352,7 @@ INITRAMFS=/boot/initramfs-${KVER}.img
%files -n xorg-drv-video-%{name} %files -n xorg-drv-video-%{name}
%defattr(-,root,root) %defattr(-,root,root)
#%{_sysconfdir}/profile.d/nvidia-clutter.sh %{_sysconfdir}/dracut.conf.d/20-nvidia.conf
%{_sysconfdir}/OpenCL/vendors/nvidia.icd %{_sysconfdir}/OpenCL/vendors/nvidia.icd
%dir %{_prefix}/src/%{name}-%{version} %dir %{_prefix}/src/%{name}-%{version}
%{_prefix}/src/%{name}-%{version}/* %{_prefix}/src/%{name}-%{version}/*
@ -387,6 +401,11 @@ INITRAMFS=/boot/initramfs-${KVER}.img
%doc current/{NVIDIA_Changelog,README.txt} current/html %doc current/{NVIDIA_Changelog,README.txt} current/html
%changelog %changelog
* Sat Mar 25 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 470.161.03-2mamba
- install libnvidia-gtk3.so* to fix nvidia-settings
- modprobe.d/nvidia.conf: set nvidia_drm.modeset=1
- dracut.conf.d/20-nvidia.conf: ensure kernel modules are added to initramfs
* Tue Mar 07 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 470.161.03-1mamba * Tue Mar 07 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 470.161.03-1mamba
- update to 470.161.03 - update to 470.161.03