Put display to sleep via key ? [SOLVED]
Hello !
My display is set to sleep after 30 minutes of inactivity.
When I go to sleep at night I don't want to wait 30 minutes for the monitor to shutdown, is there any way I can use the keyboard (like a hotkey) for :
1. Start my screensaver (when I go for 5-10 minutes afk for example).
2. Make the monitor go to sleep mode.
Re: Put display to sleep via key ?
Sure there is.
If you're not using compiz, go to "System -> Preferences -> Keyboard Shortcuts". Click "Add" and you can add the following entry:
Name: Screensaver
Command: xdg-screensaver activate
Not sure about putting monitor to sleep.
Re: Put display to sleep via key ?
Quote:
Originally Posted by
AndyCee
Sure there is.
If you're not using compiz, go to "System -> Preferences -> Keyboard Shortcuts". Click "Add" and you can add the following entry:
Name: Screensaver
Command: xdg-screensaver activate
Not sure about putting monitor to sleep.
Thanks, that really did the trick
Now I need to find a way to put the monitor on sleep mode.
Re: Put display to sleep via key ?
Hi
xset dpms force suspend
standby, suspend, off, on
Kind regards
Re: Put display to sleep via key ?
Quote:
Originally Posted by
matt_symes
Hi
xset dpms force suspend
standby, suspend, off, on
Kind regards
Can you please explain that in more detail ?
Re: Put display to sleep via key ?
Hi
Open a terminal and type
xset dpms force suspend
This will suspend your display. Press the space bar to wake the machine up
You can add this command as a button.
You also have the pm_suspend command to suspend your entire machine
Kind regards
Re: Put display to sleep via key ?
Ctrl+Alt+L should lock the screen/activate screensaver.
And I always switch to tty8 (Ctrl+Alt+F8) when I go to bed, since my monitor is somewhat broken and takes ~20 minutes of constant button pressing to turn on.
Re: Put display to sleep via key ?
Quote:
Originally Posted by
matt_symes
Hi
Open a terminal and type
xset dpms force suspend
This will suspend your display. Press the space bar to wake the machine up
You can add this command as a button.
You also have the pm_suspend command to suspend your entire machine
Kind regards
It seems to be working but for some reason after 5 seconds of suspend it goes back to the screensaver mode.
Re: Put display to sleep via key ?
Hi
Which one did you use xset or pm_suspend? And did they both do the same thing or were they different? They both work fine on my machine so i think some detective work is required. Type them from the terminal and see if you get the same behaviour.
Do you have anything like wake on LAN or other wake event set in the BIOS or elsewhere?
Kind regards
Re: Put display to sleep via key ?
Quote:
Originally Posted by
matt_symes
Hi
Which one did you use xset or pm_suspend? And did they both do the same thing or were they different? They both work fine on my machine so i think some detective work is required. Type them from the terminal and see if you get the same behaviour.
Do you have anything like wake on LAN or other wake event set in the BIOS or elsewhere?
Kind regards
I used the "xset dpms force suspend" command as I only want to suspend the monitor, it doesn't give me any output on cli.
It just goes to "monitor suspend" and after 5 seconds it goes to "screensaver" mode.
I don't have any wake on LAN or other wake event set in the BIOS or elsewhere (that I know of).