You are not logged in.

#1 2011-12-16 16:52:16

bpont
Banned
Registered: 2010-03-24
Posts: 161

SOLVED: Can't blank/lock screen after 30 mins - xset s off not working

I want the monitor screen to blank after 30 minutes of idleness and password lock it.  The password lock works fine, but the screen blanks after 10 minutes.

Here is what I have in my ~/.xinitrc

xset s off &
xset dpms 0 1800 3600 &
xautolock -time 30 -locker slock -notify 30 &

Is there something I overlooked?

Last edited by bpont (2011-12-17 18:02:47)

Offline

#2 2011-12-16 17:11:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: SOLVED: Can't blank/lock screen after 30 mins - xset s off not working

What's the output of 'xset -q'?

Offline

#3 2011-12-16 17:44:52

bpont
Banned
Registered: 2010-03-24
Posts: 161

Re: SOLVED: Can't blank/lock screen after 30 mins - xset s off not working

karol wrote:

What's the output of 'xset -q'?

$ xset -q
Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000002
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    on     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:  660    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:  600    cycle:  600
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/Type1/,/usr/share/fonts/100dpi/,/usr/share/fonts/75dpi/,built-ins
DPMS (Energy Star):
  Standby: 0    Suspend: 1800    Off: 3600
  DPMS is Enabled
  Monitor is On

Edit:

I should also mention that I searched around a bit and found this thread which describes xset s off not working until the user initiated the X session using xinit instead of X.  That thread was dated from July of 2008.  I checked my .bashrc and verified that I had already set it up to start the X session using xinit, not X.  I should also mention that my ~/.xinitrc parameters listed in my original post did work fine up until some time ago (forgot exactly when).  It wasn't a huge priority and I'm just now getting around to trying to solve this issue since I have some extra time. 

Any suggestions?

Last edited by bpont (2011-12-16 23:02:39)

Offline

#4 2011-12-17 16:18:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: SOLVED: Can't blank/lock screen after 30 mins - xset s off not working

Not sure what's wrong with your setup, works for me:

[karol@black ~]$ xset s default
[karol@black ~]$ xset -q | grep -A2 "Screen Saver"
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  600    cycle:  600
[karol@black ~]$ xset s off
[karol@black ~]$ xset -q | grep -A2 "Screen Saver"
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  600

For some reason you're using the default timeout even though you have 'xset s off &' in your .xinitrc.
I don't know what exactly 'xautolock -time 30 -locker slock -notify 30 &' does, try commenting it out and see if it changes anything.

If you're still stuck, post the whole ~/.xinitrc.

Offline

#5 2011-12-17 16:42:45

bpont
Banned
Registered: 2010-03-24
Posts: 161

Re: SOLVED: Can't blank/lock screen after 30 mins - xset s off not working

karol wrote:

Not sure what's wrong with your setup, works for me:

[karol@black ~]$ xset s default
[karol@black ~]$ xset -q | grep -A2 "Screen Saver"
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  600    cycle:  600
[karol@black ~]$ xset s off
[karol@black ~]$ xset -q | grep -A2 "Screen Saver"
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  600

For some reason you're using the default timeout even though you have 'xset s off &' in your .xinitrc.
I don't know what exactly 'xautolock -time 30 -locker slock -notify 30 &' does, try commenting it out and see if it changes anything.

If you're still stuck, post the whole ~/.xinitrc.

I did your above test which gave me the same results as you.  The thing is, whenever I reboot, that setting will be lost.

I think what I'll try next is moving the xset s off command from ~/.xinitrc into ~/.fluxbox/startup

I will leave xautolock -time 30 -locker slock -notify 30 & in ~/.xinitrc for now.  By the way, what that line does is lock my display after 30 minutes using the 'slock' package and notifies me with a 30 second system alarm warning before it does so.  That way I can press my keyboard or move my mouse to avoid locking my display.

Edit: Actually, what I ended up doing was simply changing the ordering of commands in my ~/.xinitrc from:

xset s off &
xset dpms 0 1800 3600 &
xautolock -time 30 -locker slock -notify 30 &

to

xset dpms 0 1800 3600 &
xset s off &
xautolock -time 30 -locker slock -notify 30 &

and that solved the problem by changing the timeout to 0...not really sure why the ordering of commands matters here, but it worked so I'm changing this thread to SOLVED.

Karol, thanks for your help in troubleshooting this with me.

Last edited by bpont (2011-12-17 18:02:08)

Offline

Board footer

Powered by FluxBB