Add nvidia-fallback service

el9
Nicolas Chauvet 7 years ago
parent 5a58f32968
commit fd724e6ba3

@ -0,0 +1,4 @@
# RPM Fusion nvidia udev rules
SUBSYSTEM=="pci", ATTRS{vendor}=="0x12d2", ATTRS{class}=="0x030000", TAG+="systemd", ENV{SYSTEMD_WANTS}="nvidia-fallback.service"
SUBSYSTEM=="pci", ATTRS{vendor}=="0x10de", ATTRS{class}=="0x030[02]00", TAG+="systemd", ENV{SYSTEMD_WANTS}="nvidia-fallback.service"

@ -0,0 +1,16 @@
[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
[Install]
WantedBy=graphical.target

@ -53,6 +53,8 @@ Source13: parse-readme.py
Source14: 60-nvidia-uvm.rules
Source15: nvidia-uvm.conf
Source16: 99-nvidia-dracut.conf
Source20: 10-nvidia.rules
Source21: nvidia-fallback.service
ExclusiveArch: i686 x86_64 armv7hl
@ -392,6 +394,12 @@ fn=%{buildroot}%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
%{SOURCE13} README.txt "NVIDIA TESLA GPUS" | xargs appstream-util add-provide ${fn} modalias
%endif
# Install nvidia-fallback
%if 0%{?rhel} >= 6 || 0%{?fedora}
install -p -m 0644 %{SOURCE20} %{buildroot}%{_udevrulesdir}
install -p -m 0644 %{SOURCE21} %{buildroot}%{_unitdir}
%endif
%pre
if [ "$1" -eq "1" ]; then
@ -483,6 +491,10 @@ fi ||:
%ghost %{_sysconfdir}/X11/xorg.conf.d/99-nvidia.conf
%ghost %{_sysconfdir}/X11/xorg.conf.d/nvidia.conf
%{_datadir}/X11/xorg.conf.d/nvidia.conf
%if 0%{?rhel} > 6 || 0%{?fedora}
%{_udevrulesdir}/10-nvidia.rules
%{_unitdir}/nvidia-fallback.service
%endif
%if 0%{?fedora} >= 25
%{_datadir}/appdata/xorg-x11-drv-nvidia.metainfo.xml
%{_dracut_conf_d}/99-nvidia-dracut.conf

Loading…
Cancel
Save