Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Put display to sleep via key ?

  1. #1
    Join Date
    May 2006
    Location
    Israel
    Beans
    1,965

    Question 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.
    Last edited by MaximB; November 3rd, 2010 at 12:56 PM.

  2. #2
    Join Date
    Mar 2008
    Location
    NSW Australia
    Beans
    232
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    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.

  3. #3
    Join Date
    May 2006
    Location
    Israel
    Beans
    1,965

    Re: Put display to sleep via key ?

    Quote Originally Posted by AndyCee View Post
    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.

  4. #4
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Put display to sleep via key ?

    Hi

    xset dpms force suspend

    standby, suspend, off, on

    Kind regards

  5. #5
    Join Date
    May 2006
    Location
    Israel
    Beans
    1,965

    Re: Put display to sleep via key ?

    Quote Originally Posted by matt_symes View Post
    Hi

    xset dpms force suspend

    standby, suspend, off, on

    Kind regards
    Can you please explain that in more detail ?

  6. #6
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    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

  7. #7
    Join Date
    Apr 2010
    Location
    England
    Beans
    3,286

    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.
    http://xkcd.com/293/
    There are 10 kinds of people in this world: Those who understand ternary, those who don't, and those who confuse it with binary.

  8. #8
    Join Date
    May 2006
    Location
    Israel
    Beans
    1,965

    Re: Put display to sleep via key ?

    Quote Originally Posted by matt_symes View Post
    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.

  9. #9
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    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

  10. #10
    Join Date
    May 2006
    Location
    Israel
    Beans
    1,965

    Re: Put display to sleep via key ?

    Quote Originally Posted by matt_symes View Post
    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).

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •