How I got my LCD brightness keys to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I recently bought a Sager NP2030c laptop[1], and most ACPI bits seem to be supported by the 2.6.19 kernel. I did have to do a little minor kernel surgery to get the brightness adjustment buttons (Fn+F4 and Fn+F5) working, so I thought I'd share what I did in hopes that it'll help the developers. I apologize in advance if this is already outdated information.

The keys were both resulting in "video device notify" lines in my kernel log, although only one was actually making it to userland through acpid. I threw a few printks into video.c, and discovered that the following video notify codes are being sent:

Fn+F5 (brightness up) 0x86
Fn+F6 (brightness down) 0x87

0x86 corresponds to VIDEO_DEVICE_NOTIFY_DISPLAY_OFF, so I'm kind of glad that's not implemented. 0x87 has no #define. I added a #define for it and added code to make sure that video.c sends an event to userland for 0x87. It seems that the brightness-adjusting code in my video.c isn't implemented, but that's fine with me; I just wrote some very machine-specific scripting to handle the events from acpid and use the /proc interface to adjust my LCD's brightness one notch up or down. Voila! It worked perfectly.

[1] http://www.sagernotebook.com/pages/notebooks/product2.cfm?ProductType=2030&SubType=C
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux