Add systemd preset to power sub-package

el9
Leigh Scott 3 years ago
parent bb63c6fa82
commit 01e05bb9d0

@ -0,0 +1,8 @@
# Enable complete power management. From:
# file:///usr/share/doc/nvidia-driver/html/powermanagement.html
enable nvidia-suspend.service
enable nvidia-hibernate.service
# Resume is triggered by nvidia-sleep.sh:
disable nvidia-resume.service

@ -41,6 +41,7 @@ Source13: 10-nvidia.rules
Source14: nvidia-fallback.service Source14: nvidia-fallback.service
Source15: rhel_nvidia.conf Source15: rhel_nvidia.conf
Source16: nvidia-power-management.conf Source16: nvidia-power-management.conf
Source17: 70-nvidia.preset
ExclusiveArch: x86_64 i686 ExclusiveArch: x86_64 i686
@ -365,7 +366,8 @@ install -p -m 0644 %{SOURCE13} %{buildroot}%{_udevrulesdir}
install -p -m 0644 %{SOURCE14} %{buildroot}%{_unitdir} install -p -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}
# Systemd units and script for suspending/resuming # Systemd units and script for suspending/resuming
mkdir %{buildroot}%{_systemd_util_dir}/system-sleep/ mkdir %{buildroot}%{_systemd_util_dir}/system-{sleep,preset}/
install -p -m 0644 %{SOURCE17} %{buildroot}%{_systemd_util_dir}/system-preset/
install -p -m 0644 systemd/system/nvidia-{hibernate,resume,suspend}.service %{buildroot}%{_unitdir} install -p -m 0644 systemd/system/nvidia-{hibernate,resume,suspend}.service %{buildroot}%{_unitdir}
install -p -m 0755 systemd/system-sleep/nvidia %{buildroot}%{_systemd_util_dir}/system-sleep/ install -p -m 0755 systemd/system-sleep/nvidia %{buildroot}%{_systemd_util_dir}/system-sleep/
install -p -m 0755 systemd/nvidia-sleep.sh %{buildroot}%{_bindir} install -p -m 0755 systemd/nvidia-sleep.sh %{buildroot}%{_bindir}
@ -555,6 +557,7 @@ fi ||:
%files power %files power
%config %{_modprobedir}/nvidia-power-management.conf %config %{_modprobedir}/nvidia-power-management.conf
%{_bindir}/nvidia-sleep.sh %{_bindir}/nvidia-sleep.sh
%{_systemd_util_dir}/system-preset/70-nvidia.preset
%{_systemd_util_dir}/system-sleep/nvidia %{_systemd_util_dir}/system-sleep/nvidia
%{_unitdir}/nvidia-hibernate.service %{_unitdir}/nvidia-hibernate.service
%{_unitdir}/nvidia-resume.service %{_unitdir}/nvidia-resume.service

Loading…
Cancel
Save