Comment 40 for bug 189814

Revision history for this message
Andrea Ratto (andrearatto) wrote : Re: [hardy]computer and touchpad is buggy when running on battery

This is my idea:
gnome-power-manager tries to dim the brightness of the screen after some inactivity and then reset it upon input.
gnome-power-manager calls HAL to do the job. HAL has multiple methods of handling brightness of LCD panels. On dell machines, since hardy it uses a libsmbios.
Libsmbios has only rudimentary support for setting the brightness thought. For example it does not work if a BIOS password it set and apparently on some dell models.
However, instead of just printing an error when it fails, it makes the computer lock for a few seconds, due to the direct interaction with the bios on a very low level.

There is a very easy way to try if it work on your computer using the command /usr/sbin/dellLcdBrightness from libsmbios-bin package.
Here's a command that rapidly switch brightness 10 times:
for x in `seq 1 10`; do sudo dellLcdBrightness -a -v 1;sleep 0.1; sudo dellLcdBrightness -a -v 5; done
#Warning it may hang your machine

Without a BIOS password it works fine on my laptop (D630)

Another way could be with the brightness applet of the gnome-panel.

A possible elegant solution:
Correct HAL's detection of this capability, so that it only reports it when brightness can be set with no errors. Maybe also add some way for HAL to read the bios password from config files if the user wishes so. Oh and fix libsmbios to avoid stalling on error, that is ugly.
Less elegant:
turn off HAL's usage of libsmbios in some config file and have users who want it to manually set it.

possible temporary workaround:
blacklist the dcdbas kernel module
disable dimming in gnome-power
I don't know how to disable it from HAL, but that would be the best workaround.

NOTE: if HAL is allowed to use libsmbios a local user could exploit it to induce a denial of service or crash.

I hope this info proves useful.