nvidia: add hooks for suspend/resume

Closes #52373.
This commit is contained in:
Andrew Benson 2024-09-27 08:32:58 -05:00
parent f899b44d58
commit 4be849e9fe
3 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/bin/nvidia-sleep.sh "resume"

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/bin/nvidia-sleep.sh "suspend"

View File

@ -4,7 +4,7 @@ _desc="NVIDIA drivers for linux"
pkgname=nvidia
version=550.120
revision=2
revision=3
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="custom:NVIDIA Proprietary"
homepage="https://www.nvidia.com/en-us/drivers/unix/"
@ -212,6 +212,10 @@ do_install() {
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
vmkdir etc/zzz.d/suspend
vinstall ${FILESDIR}/nvidia-suspend 0755 etc/zzz.d/suspend
vmkdir etc/zzz.d/resume
vinstall ${FILESDIR}/nvidia-resume 0755 etc/zzz.d/resume
# opencl pkg
vinstall nvidia.icd 644 etc/OpenCL/vendors