nvidia: fix sleep for elogind users
This commit is contained in:
parent
5ea4636260
commit
804660a4b9
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
pre)
|
||||
logger -t nvidia-sleep "Entering $2 mode (invoked by $SYSTEMD_SLEEP_ACTION)"
|
||||
/usr/bin/nvidia-sleep.sh "hibernate"
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
logger -t nvidia-sleep "Failed to enter $2 mode (exit code $ret)"
|
||||
exit $ret
|
||||
fi
|
||||
sleep 5
|
||||
logger -t nvidia-sleep "Entered $2 mode (invoked by $SYSTEMD_SLEEP_ACTION)"
|
||||
;;
|
||||
post)
|
||||
logger -t nvidia-sleep "Exiting $2 mode (invoked by $SYSTEMD_SLEEP_ACTION)"
|
||||
/usr/bin/nvidia-sleep.sh "resume"
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
logger -t nvidia-sleep "Failed to exit $2 mode (exit code $ret)"
|
||||
exit $ret
|
||||
fi
|
||||
logger -t nvidia-sleep "Exited $2 mode (invoked by $SYSTEMD_SLEEP_ACTION)"
|
||||
;;
|
||||
esac
|
|
@ -4,7 +4,7 @@ _desc="NVIDIA drivers for linux"
|
|||
|
||||
pkgname=nvidia
|
||||
version=550.120
|
||||
revision=1
|
||||
revision=2
|
||||
maintainer="Andrew Benson <abenson+void@gmail.com>"
|
||||
license="custom:NVIDIA Proprietary"
|
||||
homepage="https://www.nvidia.com/en-us/drivers/unix/"
|
||||
|
@ -210,6 +210,8 @@ do_install() {
|
|||
mkdir -p usr/share/dbus-1/system.d
|
||||
vinstall nvidia-dbus.conf 644 usr/share/dbus-1/system.d
|
||||
vbin systemd/nvidia-sleep.sh
|
||||
mkdir -p usr/libexec/elogind/system-sleep
|
||||
vinstall ${FILESDIR}/nvidia-sleep.sh 0755 usr/libexec/elogind/system-sleep nvidia.sh
|
||||
|
||||
# opencl pkg
|
||||
vinstall nvidia.icd 644 etc/OpenCL/vendors
|
||||
|
|
Loading…
Reference in New Issue