After 1 sec of turning off the screen it turns on again

from the keyboard shortcuts i’ve added a shortcut to turn of the screen but t turns on again after 1 sec, why is that happening? and how to prevent it?

It is possible that the keyboard repeat interval is set too short, causing the system to think that you pressed another key. Another possibility is that you’re using a laptop — sorry, my crystal ball is broken — and that you’re inadvertently touching the touchpad, causing the screen to come on again.

:man_shrugging:

Mouse movement?

1 Like

i’m not toucing the keypad
this is what i get:

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:  600    repeat rate:  25
  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:  600
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/misc,/usr/share/fonts/TTF,built-ins
DPMS (Display Power Management Signaling):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On

i tried to change the interval with different values but nothing worked.
the ball is working well with no problem

I’m guessing you’re using xset dpms force off, if so then the release is triggering the screen to come back on, adding a delay will help.

sleep 1; xset dpms force off

sleep accepts floats too, so values like 0.5 or 0.1 can work, but it depends on how fast you release the key(s). In fact, if you release the key(s) quickly enough you don’t need the delay.

3 Likes

Or, create a script with that content. Something like:

sleep 3
xset dpms force off

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.