User avatar
ReBoot
Posts: 147
Joined: Mon Sep 17, 2012 2:23 pm
Location: Germany

How to wake a sleeping screen?

Sat Jun 22, 2013 3:17 pm

I'm on latest Debian here (softfloat, hardfloat collides with my C#/Mono business logic) and would like to know how to wake up a sleeping screen.
Debian turns the screen off after a while, I've set it to turn off after 3 minutes using xserver-command=X -s 3 and would like to use Python to control the HW Interface. Reacting to a button works flawlessly already, but how do I wake the screen up? Sending fake keystrokes seems not to work. Or can I send a system command to turn the screen on?

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: How to wake a sleeping screen?

Sat Jun 22, 2013 10:18 pm

http://www.linuxquestions.org/questions ... ost1934815

I don't know if this applies, but it might...
Just ask the screensaver to wake up:

xscreensaver-command -deactivate

From the man page:

-deactivate
This tells xscreensaver to pretend that there has just been
user activity. This means that if the screensaver is active
(the screen is blanked), then this command will cause the
screen to un-blank as if there had been keyboard or mouse
activity. If the screen is locked, then the password dialog
will pop up first, as usual.
Alex Eames RasPi.TV, RasP.iO

unixbigot
Posts: 2
Joined: Wed Jun 08, 2016 9:08 pm

Re: How to wake a sleeping screen?

Wed Jun 08, 2016 9:14 pm

To deactivate the simple built-in X-window screensaver that just blanks the screen use "xset s reset"

You may need to reactivate it with "xset s on s 60"

To activate it immediately "xset s activate"

The above answer about Xscreensaver refers to an add-on screensaver that shows novelty animations, not the built in screensaver.

(I know this question is 3 years old, but it ranks high in google, and I found it while trying to solve the issue myself)

Return to “Python”