You are not logged in.

#1 2014-01-15 19:05:30

sknd
Member
From: Brzeszcze, Poland
Registered: 2011-01-20
Posts: 59

xset dpms force off - works only for few seconds...

i used to turn off my monitor by executing:

xset dpms force off

but I noticed today (havent use this for sometime) that now it works only for few seconds, let's say 10 or something, then monitor turns on again...

does anybody know what my cause this problem?


I use MATE, nvidia drivers, xscreensaver is set to be turned on after 15 minutes


Jaki koniec świata.Ziemia to nie cały świat ,a tylko mały Wąchock we wszechświecie.

Offline

#2 2014-01-15 19:37:34

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: xset dpms force off - works only for few seconds...

What does xset -q show?

Offline

#3 2014-01-15 20:30:25

sknd
Member
From: Brzeszcze, Poland
Registered: 2011-01-20
Posts: 59

Re: xset dpms force off - works only for few seconds...

it shows this:

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:  30
  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/Type1/,built-ins
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On

Jaki koniec świata.Ziemia to nie cały świat ,a tylko mały Wąchock we wszechświecie.

Offline

#4 2014-01-15 20:33:34

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: xset dpms force off - works only for few seconds...

Does the same happen when you put your monitor into standby or suspend?

$ xset dpms force standby

$ xset dpms force suspend

Offline

#5 2014-01-15 21:20:46

sknd
Member
From: Brzeszcze, Poland
Registered: 2011-01-20
Posts: 59

Re: xset dpms force off - works only for few seconds...

yes, exactly the same.

hmm... something strange just happened:
i thought maybe the mouse is the problem, so i turned it off:     xinput --disable 9
and then i did:    xset dpms force off
and the screenn was off for about 2 minutes, and suddenly it turned on, AND THE MOUSE WAS WORKING AGAIN... strange. What may cause it?



EDIT: i managed, using this script:

#!/usr/bin/python
import time
import subprocess
from Xlib import X
from Xlib.display import Display

display = Display(':0')
root = display.screen().root
root.grab_pointer(True, 
        X.ButtonPressMask | X.ButtonReleaseMask | X.PointerMotionMask, 
        X.GrabModeAsync, X.GrabModeAsync, 0, 0, X.CurrentTime)
root.grab_keyboard(True, 
        X.GrabModeAsync, X.GrabModeAsync, X.CurrentTime)

subprocess.call('xset dpms force off'.split())
#p = subprocess.Popen('gnome-screensaver-command -i'.split())
time.sleep(1)

while True:
    #print display.next_event()
    p.terminate()
    break

I found it somewhere on ubuntu forum, I think. I tried it before, but it didn't work. I had to hash the line with gnome-screenesaver - I don't have it. I also had to install python3-xlib

EDIT: No, i didn't solve the problem, today it still occurs, with using this scrpt even...

Last edited by sknd (2014-01-16 18:38:36)


Jaki koniec świata.Ziemia to nie cały świat ,a tylko mały Wąchock we wszechświecie.

Offline

#6 2014-03-17 17:10:11

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,135
Website

Re: xset dpms force off - works only for few seconds...

I have the same problem, for me it happens when the monitor goes to standby, suspend or off.
It might be related to an update of the xorg server, as it was upgraded exactly one day before your first post. A bug in the xserver would also explain how the xinput settings are suddenly lost.
EDIT: Update: Also happens in virtualbox with xorg server 1.15.05 (matelivecd) AND does NOT happen with xserver 1.14.. (archbang iso).
( EDIT2: In virtualbox the actual screen does not turn off, but the window is becoming black. This somewhat confirms that it is a bug in the xserver and not the monitor. )
EDIT3: When i repeat the xset command 4 times, it works as designed.

Last edited by teateawhy (2014-03-17 18:05:07)

Offline

#7 2014-03-19 04:06:49

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: xset dpms force off - works only for few seconds...

I had this issue as well; xset dpms force off does the same thing for me- screen backlight goes out, then comes back on after a few seconds.. Fortunately in my case, I simply wanted the backlight off when I locked the screen. So basically, I solved it this way:

#!/bin/bash
SCREENSAVER=$(xset q | grep timeout | cut -c13-17)
sleep .5
xset s 2 2 &
slock
sleep .1
TESTER=$(xset q | grep timeout | cut -c13-17)
if [ $TESTER -eq 2 ]; then
	xset s $SCREENSAVER $SCREENSAVER
else
	xset s 600 600
fi

The key here is the slock without an ampersand (&). The script stops and waits for slock to terminate; not a security issue since slock owns the keyboard and I dont have SSH on my laptop (im not sure but if the script were to be killed I think it might take slock with it).

The variables and if/then/else stuff are related to a set of pipe menu scripts I wrote for OB so I could shutoff the screensaver for an interval for watching movies.

I hit my keybind, screen locks and goes black, backlight goes out 2 seconds later. Anytime I touch the keyboard the backlight comes back on, and once slock unlocks, xset gets all its values reset.

FWIW, the DPMS settings do nothing on my computer:

Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  600    cycle:  600
Colors:
  default colormap:  0x22    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/Type1/,built-ins
DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Disabled

With the above spitout from xset q, my screen blanks and the backlight goes off at 10 minutes.

Offline

Board footer

Powered by FluxBB