added nvidia-fallback service which loads nouveau as fallback if nvidia driver is not loaded before display-manager
remove simplefb causing plymouth to block at boot if nvidia driver is not loaded [release 560.35.03-2mamba;Sun Aug 25 2024]
This commit is contained in:
parent
b42122db15
commit
8429ffcc69
17
nvidia-fallback.service
Normal file
17
nvidia-fallback.service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Fallback to nouveau as nvidia did not load
|
||||||
|
After=akmods.service
|
||||||
|
Before=display-manager.service
|
||||||
|
ConditionKernelCommandLine=rd.driver.blacklist=nouveau
|
||||||
|
ConditionPathExists=!/sys/module/nvidia
|
||||||
|
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=-/sbin/modprobe nouveau
|
||||||
|
ExecStartPost=-/bin/plymouth message --text="NVIDIA kernel module missing. Falling back to nouveau"
|
||||||
|
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical.target
|
43
nvidia.spec
43
nvidia.spec
@ -1,9 +1,9 @@
|
|||||||
%define nvidia_current_ver %version
|
%define nvidia_current_ver %version
|
||||||
%define nvidia_current_libver %version
|
%define nvidia_current_libver %version
|
||||||
Name: nvidia
|
Name: nvidia
|
||||||
Version: 555.58.02
|
Version: 560.35.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
|
||||||
@ -13,6 +13,7 @@ URL: https://www.nvidia.com/en-us/drivers/unix/
|
|||||||
Source0: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{nvidia_current_ver}/NVIDIA-Linux-x86_64-%{nvidia_current_ver}.run
|
Source0: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{nvidia_current_ver}/NVIDIA-Linux-x86_64-%{nvidia_current_ver}.run
|
||||||
Source1: nvidia.sysusers
|
Source1: nvidia.sysusers
|
||||||
Source2: nvidia-drm-outputclass.conf
|
Source2: nvidia-drm-outputclass.conf
|
||||||
|
Source3: nvidia-fallback.service
|
||||||
Patch0: nvidia-331.20-x86-conftest.patch
|
Patch0: nvidia-331.20-x86-conftest.patch
|
||||||
Patch1: nvidia-367.35-kernel-4.6.patch
|
Patch1: nvidia-367.35-kernel-4.6.patch
|
||||||
License: no OSI Approved
|
License: no OSI Approved
|
||||||
@ -273,16 +274,19 @@ blacklist nouveau
|
|||||||
options nvidia_drm modeset=1
|
options nvidia_drm modeset=1
|
||||||
_EOF
|
_EOF
|
||||||
|
|
||||||
install -d -m0755 %{buildroot}%{_modulesloaddir}
|
#install -d -m0755 %{buildroot}%{_modulesloaddir}
|
||||||
cat > %{buildroot}%{_modulesloaddir}/nvidia.conf << _EOF
|
#cat > %{buildroot}%{_modulesloaddir}/nvidia.conf << _EOF
|
||||||
simplefb
|
#simplefb
|
||||||
_EOF
|
#_EOF
|
||||||
|
|
||||||
install -d -m0755 %{buildroot}%{_sysconfdir}/dracut.conf.d
|
install -d -m0755 %{buildroot}%{_sysconfdir}/dracut.conf.d
|
||||||
cat > %{buildroot}%{_sysconfdir}/dracut.conf.d/20-nvidia.conf << __EOF
|
cat > %{buildroot}%{_sysconfdir}/dracut.conf.d/20-nvidia.conf << __EOF
|
||||||
add_drivers+=" nvidia nvidia_drm nvidia_modeset "
|
add_drivers+=" nvidia nvidia_drm nvidia_modeset "
|
||||||
__EOF
|
__EOF
|
||||||
|
|
||||||
|
# fallback service which loads nouveau driver if nvidia was not loaded
|
||||||
|
install %{SOURCE3} %{buildroot}%{_unitdir}/nvidia-fallback.service
|
||||||
|
|
||||||
# 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}/
|
||||||
@ -332,15 +336,16 @@ nvidia-uvm \
|
|||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
%post -n xorg-drv-video-%{name}
|
%post -n xorg-drv-video-%{name}
|
||||||
/sbin/ldconfig
|
%systemd_post nvidia-fallback
|
||||||
:
|
:
|
||||||
|
|
||||||
%preun -n xorg-drv-video-%{name}
|
%preun -n xorg-drv-video-%{name}
|
||||||
# erase
|
%systemd_preun nvidia-fallback
|
||||||
dkms remove -q -m nvidia -v %{version} --all
|
dkms remove -q -m nvidia -v %{version} --all
|
||||||
if [ $1 -eq 0 ]; then
|
:
|
||||||
/sbin/ldconfig
|
|
||||||
fi
|
%postun -n xorg-drv-video-%{name}
|
||||||
|
%systemd_postun nvidia-fallback
|
||||||
:
|
:
|
||||||
|
|
||||||
%posttrans -n xorg-drv-video-%{name}
|
%posttrans -n xorg-drv-video-%{name}
|
||||||
@ -369,13 +374,14 @@ INITRAMFS=/boot/initramfs-${KVER}.img
|
|||||||
%{_prefix}/lib/firmware/nvidia/%{version}/*.bin
|
%{_prefix}/lib/firmware/nvidia/%{version}/*.bin
|
||||||
%{_bindir}/nvidia-*
|
%{_bindir}/nvidia-*
|
||||||
%{_modprobedir}/nvidia.conf
|
%{_modprobedir}/nvidia.conf
|
||||||
%{_modulesloaddir}/nvidia.conf
|
#%{_modulesloaddir}/nvidia.conf
|
||||||
%{_systemd_util_dir}/system-sleep/nvidia
|
%{_systemd_util_dir}/system-sleep/nvidia
|
||||||
%{_unitdir}/nvidia-hibernate.service
|
%{_unitdir}/nvidia-hibernate.service
|
||||||
%{_unitdir}/nvidia-persistenced.service
|
%{_unitdir}/nvidia-persistenced.service
|
||||||
%{_unitdir}/nvidia-powerd.service
|
%{_unitdir}/nvidia-powerd.service
|
||||||
%{_unitdir}/nvidia-suspend.service
|
%{_unitdir}/nvidia-suspend.service
|
||||||
%{_unitdir}/nvidia-resume.service
|
%{_unitdir}/nvidia-resume.service
|
||||||
|
%{_unitdir}/nvidia-fallback.service
|
||||||
%{_sysusersdir}/nvidia.conf
|
%{_sysusersdir}/nvidia.conf
|
||||||
%{_datadir}/dbus-1/system.d/nvidia-dbus.conf
|
%{_datadir}/dbus-1/system.d/nvidia-dbus.conf
|
||||||
%{_libdir}/libEGL_nvidia.so.*
|
%{_libdir}/libEGL_nvidia.so.*
|
||||||
@ -413,6 +419,19 @@ INITRAMFS=/boot/initramfs-${KVER}.img
|
|||||||
%doc current/{NVIDIA_Changelog,README.txt} current/html
|
%doc current/{NVIDIA_Changelog,README.txt} current/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Aug 25 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 560.35.03-2mamba
|
||||||
|
- added nvidia-fallback service which loads nouveau as fallback if nvidia driver is not loaded before display-manager
|
||||||
|
- remove simplefb causing plymouth to block at boot if nvidia driver is not loaded
|
||||||
|
|
||||||
|
* Thu Aug 22 2024 Automatic Build System <autodist@openmamba.org> 560.35.03-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Wed Aug 07 2024 Automatic Build System <autodist@openmamba.org> 560.31.02-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Tue Jul 23 2024 Automatic Build System <autodist@openmamba.org> 560.28.03-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
* Tue Jul 02 2024 Automatic Build System <autodist@openmamba.org> 555.58.02-1mamba
|
* Tue Jul 02 2024 Automatic Build System <autodist@openmamba.org> 555.58.02-1mamba
|
||||||
- automatic version update by autodist
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user