Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm running the openbox window manager and using this line in my autostart.sh to control display power management:

xset dpms 0 60 0

This works nicely, causing the display to suspend after 60 seconds of inactivity.

However, when the display reawakens in response to a mouse movement, keypress, etc., the screen is at full brightness. This is wasteful of power and sometimes blinding. If I use the laptop's brightness control keys (Fn + <-/->) to adjust the brightness, the first press will restore the brightness to what it was before the display was suspended.

What I'd like is for the screen to be at the pre-suspend brightness as soon as the display is reawakened, i.e. without having to hit one of the brightness control keys.

I'm running ubuntu 10.10 on an Acer Aspire 5742.

share|improve this question
    
I am also facing the same issue. Did you found out a workaround? –  RanRag Aug 30 '12 at 10:21
    
Not yet... haven't tried implementing MaxMackie's suggestion though, you could give that a shot. –  intuited Aug 31 '12 at 15:42
    
I can try to give it a shot but I have no idea what he mean by xset hook. If you can guide me(documentation) or refer to what he mean't by that it will help. –  RanRag Sep 1 '12 at 15:00
    
A hook in this context is a piece of code, or a command, or a script, that's run in response to some event. You can read through the xset man page to see if there is a way to get it to run a script or other command when the display is reawakened. You might also do some googling to see if they just didn't mention that in the man page for some reason. I'm not running openbox for the moment so I don't have to worry about it right now :) –  intuited Sep 3 '12 at 13:31
add comment

1 Answer

If you're setting the brightness beforehand (in autostart.sh for example), you could simply keep checking the brightness and setting it to whatever value you want in a continuous while true; loop.

This works only if you always a constant value (because if you decide you want it brighter for a bit, it will automatically dim).

Another possible (but not probable) option is if xset has some kind of callback or hook that you can grab a hold of. In that case you can make it call another script when it resumes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.