From ea41d7c9fe55a769d945b321336d73631fc8ed33 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 07:44:44 +0100 Subject: [PATCH] add modprobe.d file to blacklist nouveau and regenerate initramfs [release 520.56.06-3mamba;Tue Nov 01 2022] --- nvidia.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/nvidia.spec b/nvidia.spec index be680cf..228aed4 100644 --- a/nvidia.spec +++ b/nvidia.spec @@ -3,7 +3,7 @@ Name: nvidia Version: 520.56.06 Epoch: 1 -Release: 2mamba +Release: 3mamba Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel Group: System/Kernel and Hardware Vendor: openmamba @@ -241,6 +241,11 @@ install -D -m 644 nvidia-settings.png \ #_EOF #chmod +x %{buildroot}%{_sysconfdir}/profile.d/nvidia-clutter.sh +install -d -m0755 %{buildroot}%{_modprobedir} +cat > %{buildroot}%{_modprobedir}/nvidia.conf << _EOF +blacklist nouveau +_EOF + # dkms install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version} cp -a kernel/* %{buildroot}%{_prefix}/src/%{name}-%{version}/ @@ -312,6 +317,13 @@ if [ $1 -eq 0 ]; then fi : +%posttrans +KVER=`uname -r` +INITRAMFS=/boot/initramfs-${KVER}.img +[ -e ${INITRAMFS} -a %{_modprobedir}/nvidia.conf -nt ${INITRAMFS} ] || continue +[ -e /usr/sbin/mkinitrd ] && /usr/sbin/mkinitrd ${INITRAMFS} ${KVER} -f -H -q +: + %files -n xorg-drv-video-%{name} %defattr(-,root,root) #%{_sysconfdir}/profile.d/nvidia-clutter.sh @@ -320,6 +332,7 @@ fi %{_prefix}/src/%{name}-%{version}/* /lib/firmware/nvidia/%{version}/gsp.bin %{_bindir}/nvidia-* +%{_modprobedir}/nvidia.conf %{_systemd_util_dir}/system-sleep/nvidia %{_unitdir}/nvidia-hibernate.service %{_unitdir}/nvidia-persistenced.service @@ -356,6 +369,9 @@ fi %doc current/{NVIDIA_Changelog,README.txt} current/html %changelog +* Tue Nov 01 2022 Silvan Calarco 520.56.06-3mamba +- add modprobe.d file to blacklist nouveau and regenerate initramfs + * Sat Oct 29 2022 Silvan Calarco 520.56.06-2mamba - preun: fix removal of previous dkms builds and installations of module