[Bug 72287] Re: Apple MacBook backlight brightness doesn't work

Ryan Lortie desrt at desrt.ca
Tue Jan 23 10:13:33 UTC 2007


It turns out that on suspend/resume, the backlight control register is
clobbered to all-zeros.

The only way to fix this is to use vbetool to save/restore the BIOS
state.  This is currently broken on the macbook due to the init scripts
being out of order (vbesave runs before acpid, and on macbook this
causes vbesave to fail to detect that we're a laptop).

There is, however, another fix.  The attached program (which is a
hackish modification of part of the patch submitted upstream) will reset
the value of the register.  This seems to be sufficient to get the card
working properly again (ie: no need for a full vbetool state restore).

Link with -lpci.

This code needs to be somewhere -- be it in the kernel, the X server,
HAL or the system resume scripts -- but only run for Macbooks.  I'm
guessing that for now, HAL or "system resume scripts" is the easy
answer.

Also: to do this properly we should probably look at the value of the
backlight at suspend, save this value, then write the same value back on
resume.  The current code just sets to max value on resume.

David is currently romping around in the aussie outback.  I'll try to
nail him down to find out what he thinks :)

** Attachment added: "unclobber the backlight register on resume"
   http://librarian.launchpad.net/5827146/fixbacklight.c

-- 
Apple MacBook backlight brightness doesn't work
https://launchpad.net/bugs/72287




More information about the desktop-bugs mailing list