-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to lay present nvidia cards to sleep when suspending/hibernating
The system won't resume after suspend when nvidia drivers are in use. This is, because nvidia cards have to be told to go into suspension or hibernation before putting the computer to sleep. After waking up, the cards have to be reactivated, or the display would not come back online. Modern nvidia driver installments provide a script for this at `/usr/bin/nvidia-sleep.sh`, but the script is not guaranteed to exist. With this patch elogind will do the following, if the path `/proc/driver/nvidia/suspend` exists: * Save the active VT if the active one is not a 'tty' display * Switch to a neutral VT '0' (kernel log) * If the switch succeeded, write either either "suspend" or "hibernate" to `/proc/driver/nvidia/suspend` And when waking up: * If a VT was saved, switch back to it * Write "resume" to `/proc/driver/nvidia/suspend` This basically recreates the functionality of `/usr/bin/nvidia-sleep.sh` within elogind. Closes: #140 Signed-off-by: Sven Eden <sven.eden@prydeworx.com> (cherry picked from commit ebde530) (cherry picked from commit 5bbe13a) (cherry picked from commit 465a6f4) (cherry picked from commit 274aae1)
- Loading branch information
1 parent
497690b
commit fc0661e
Showing
5 changed files
with
130 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters