Laptop Panel brightness control

Richard Hughes hughsient at gmail.com
Fri May 12 08:30:53 PDT 2006


On Fri, 2006-05-12 at 11:01 -0400, David Zeuthen wrote:
> On Tue, 2006-05-09 at 18:58 +0100, Crispin Flowerday wrote:
> > Hi,
> > 
> > While trying to fix http://bugzilla.gnome.org/show_bug.cgi?id=340231 it
> > was discovered that laptops behave differently when the brightness
> > control buttons are used.
> > 
> > Specifically, my IBM x31 controls the brightness itself (so g-p-m just
> > needs to monitor the setting), whereas Richard Hughes's laptop (can't
> > remember what it was just at the moment) just uses the buttons to talk
> > to software which then has to control the brightness (so g-p-m needs to
> > talk to the hardware directly).
> > 
> > So, we really could do with a HAL property to differentiate the 2 cases,
> > how about "laptop_panel.brightness_in_hardware"?
> 
> Ugh, the joys of borken hardware. 
> 
> Yes, a property like laptop_panel.brightness_in_hardware, might be a
> good idea. The docs should say that agents such as gnome-power-manager
> (or whatever) should, if laptop_panel.brightness_in_hardware = TRUE,
> refrain from doing SetBrightness(GetBrightness() + delta). Richard?

I think we *need* a property like this. There's already (sorta of)
support in g-p-m for this hardware, which just updates the ui widget on
button press, rather than doing the brightness change.
This is what I've got at the moment in g-p-m:

/* We only want to change the brightness if the machine does not
   do it on it's own updates, as this can make the panel flash in a
   feedback loop. Required TRUE for IBM Thinkpad x31 and maybe more */
brightness->priv->does_own_updates = FALSE;

So a nice hal key would make this "just work", and we can easily add the
key via an fdi file.

Crispin, can you attach the output of lshal please, and we can work out
what smbios stuff to match against. I can do a patch after this weekend
when the post-exams celebrations have calmed down :-)

Richard.



More information about the hal mailing list