iliis / crossword

Text-based crossword puzzle.
2 stars 1 forks source link

wake screen through remote command #29

Closed magicdominic closed 4 years ago

magicdominic commented 4 years ago

add a new command message to be able to wake up monitor.

explanation vga monitor is a cathode-ray tube (CRT) => screen saver blanking which turns monitor off is a must. Players sometimes don't realize that PC is actually functional and must be used for a very long time if nobody presses any key on the keyboard. this is not fair. => gamemaster should be able to turn on screen so that the use of PC becomes obvious.

iliis commented 4 years ago

Can you try the following commands via SSH and see if they wake up the screen and do not prevent it from going to sleep again:

Option A:

xset -display :0 s reset && xset -display :0 dpms force on

Option B:

xdotool mousemove 100 100; xdotool mousemove 0 0

Option C:

xrandr -d :0 --auto

If none of these work, please report the output of xset q both while the screen is active and while it isn't (and has been inactive for a long time).

magicdominic commented 4 years ago

after long time asleep

xset q 
xset:  unable to open display ""
xrandr -d :0
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      60.00*
   800x600       60.32    56.25
   848x480       60.00
   640x480       59.94
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Option A:

xset -display :0 s reset && xset -display :0 dpms force on turns display on for a few seconds, but display shows desktop and not crossword app. close but not exactly what we need.

Option B:

xdotool mousemove 100 100; xdotool mousemove 0 0 results in:

Error: Can't open display: (null)
Failed creating new xdo instance
Error: Can't open display: (null)
Failed creating new xdo instance

nothing happens to display.

Option C:

xrandr -d :0 --auto

results in no response and no error and nothing happens.

iliis commented 4 years ago

Ah hmm, forgot to specify the display in option B and for xset q: Try both of them again, but call export DISPLAY=:0 first.

magicdominic commented 4 years ago

export DISPLAY=:0

houdini@sheriff-server1:~$ xset q
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:  33
  auto repeating keys:  00fffffffffffbbf
                        fbdffffffffdffff
                        ffffffffffffffff
                        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:  0x22    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,built-ins
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is Off

xdotool mousemove 100 100; xdotool mousemove 0 0

turns screen on for a few seconds but again only shows the desktop.

Solution

xdotool key Up

Works as intended and turns on the monitor and shows the crossword app.

iliis commented 4 years ago

I've added a "wakeup" command, can you verify it works as intended?

magicdominic commented 4 years ago

works. thanks!