Brightness change on notebook that follow ACPI specification (par. B.7)

Dan Lukes dan at obluda.cz
Tue Mar 30 03:32:59 UTC 2010


Most notebooks have special keys (mostly Fn+something) to change 
brightness of LCD display.

Some of them (my notebok, for example) follows the ACPI specification 
(paragraph B.7) how to announce the user request for brightness change 
to OS.

I implemented such handling as part of acpi-video module.

It's verified to work on my HP Mini 5101 & FreeBSD 8.0.

No test on other notebook done as I have no other notebook.

No test on other OS version, but verified that patched module can be 
compiled on 6.4-R, 7.2-R, 8.0-R. I assume (not verified) it's compilable 
on all 6.x-8.x. I assume (not verified) it should work on all of these 
versions.

If someone want to test it then the patch is here:
http://www.freebsd.cz/~dan/patch-acpi-video

installation:
cd /usr/src ; patch < patch-acpi-video
then compile the module:
http://www.freebsd.org/doc/handbook/acpi-debug.html#ACPI-DEBUGOUTPUT
then kldload acpi_video
then try keys for brightness change.

I'm interested to know on which notebook and FreeBSD version is verified 
to be (not)working.

If it doesn't work it may be either:
1. bug in my patch
2. your notebook doesn't follow ACPI specification (par. B.7)

If you are skilled user and you want to know more (and you have compiled 
ACPI modules with ACPI_DEBUG) you can set
debug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
then look on console messages what happens when you press the special keys.

							Dan


P.S. Brief info how it works:
Specification claim the ACPI will send notification of the type 
0x85-0x88 (brightness cycle/inc/dec/zero) to the output device handler. 
It's catched by my code (in acpi_video module) so I know what key user 
pressed. With such knowledge and current brightness (obtained from _BCQ 
method evaluation) and list of allowed brightnesses (obtained from _BCL 
method evaluation), I can calculate new brightness. It's set using _BCM 
method. No more fun here ...



More information about the freebsd-acpi mailing list