You are not logged in.

#1 2017-02-27 15:13:24

/dev/loop
Member
Registered: 2016-07-06
Posts: 10

Turn screen on after resume

Hi,

is it possible that the screen automatically turns on after resume from suspend/hibernate without moving the mouse? I'm using the Xfce as desktop environment and I'd like to see when the computer is started and ready. To be clear, this is not related to any problem where the screen doesn't turn on at all after resuming. I found them a lot during my web search.

Thanks for your help.

Offline

#2 2017-02-27 17:13:42

seth
Member
Registered: 2012-09-03
Posts: 51,553

Re: Turn screen on after resume

add sth. like this to /usr/lib/systemd/system-sleep/dpms.sh

#!/bin/sh
case $1/$2 in
        post/*)
        sudo -u <you> xset -display :0 dpms force on
        ;;
esac

Tricky part is "<you>" and ":0" - the above will work for the simple single user case, but otherwise you'll have to figure which X display is presently on the active VT and who has the authority to access it.

Offline

#3 2017-02-27 19:16:34

/dev/loop
Member
Registered: 2016-07-06
Posts: 10

Re: Turn screen on after resume

I tried your suggestion, but the screen turns on only for an instant and goes off again after a second.

Offline

#4 2017-02-27 21:08:12

seth
Member
Registered: 2012-09-03
Posts: 51,553

Re: Turn screen on after resume

Sounds as if something™ (screenlocker?) either sets the dpms timeouts to "nothing" or intercepts dpms events and forces dpms off immediately.

Prepend

sudo -u <you> xset -display :0 -q > /tmp/dpms.status

and inspect /tmp/dpms.status

Offline

#5 2017-02-28 19:09:39

/dev/loop
Member
Registered: 2016-07-06
Posts: 10

Re: Turn screen on after resume

This gives me the following output. The monitor seems to be on.

Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000000
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    off    02: Scroll Lock: off
    03: Compose:     off    04: Kana:        off    05: Sleep:       off
    06: Suspend:     off    07: Mute:        off    08: Misc:        off
    09: Mail:        off    10: Charging:    off    11: Shift Lock:  off
    12: Group 2:     off    13: Mouse Keys:  off
  auto repeat delay:  500    repeat rate:  20
  auto repeating keys:  00ffffffdffffbbf
                        fadfffefffedffff
                        9fffffffffffffff
                        fff7ffffffffffff
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  0
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/OTF/,built-ins
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 600
  DPMS is Enabled
  Monitor is On

Also tried

xset -display :0 s reset

This turns the back light on for a second. While the back light is on there is only a black screen.

Offline

Board footer

Powered by FluxBB