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.

  • I am also facing the same issue. Did you found out a workaround?
    – RanRag
    Aug 30, 2012 at 10:21
  • Not yet... haven't tried implementing MaxMackie's suggestion though, you could give that a shot.
    – intuited
    Aug 31, 2012 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, 2012 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, 2012 at 13:31

2 Answers 2


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.


A little late but this comes up as the top result on google. The following worked for me on Manjaro:

xbacklight -set 10

I wrote 2 scripts to help with brightness increase/decrease which you'll find here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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