LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   HP Pavillion keyboard key code mystery (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/hp-pavillion-keyboard-key-code-mystery-667897/)

mlp68 09-06-2008 12:28 AM

HP Pavillion keyboard key code mystery
 
I have a HP DV2940SE with Gentoo (tried Kubuntu, had endless problems with suspend/resume, Gentoo works better in that respect). Now there are a few media keys which do what they say (also the remote control does what the buttons say), EXCEPT for the "brightness down" and "up" keys, which are FN+F7 and FN+F8. In Ubuntu they work, but to my surprise, in Gentoo they don't even generate a keycode (never mind how it might get interpreted and how keymaps are set up). In U they generate key codes 102 and 212, respectively. In Gentoo it's as if the key didn't get pressed at all. I checked both systems with xev. As far as I can tell, the same keyboard driver is used ("atkbd"). This works in Ubuntu even when booted from the live CD.

Does anyone know what the trick is? What determines if a key (+modifier) sends a code in the first place?

The next question would be, how is the brightness controlled then? My KPowersave applet says that the hardware does not support changing the brightness. That's the 2nd trick I'd like to understand. I tried to dissect how it's done in Ubuntu but I can't figure it out.

Thanks for any insights,
mlp

Uncle_Theodore 09-06-2008 05:16 PM

I would suggest you try to insert the module called video.ko. Like this:

modprobe video

I've just checked on my Slackware laptop: with this module the brightness keys (Fn+F6 and Fn+F7 in my case) generate keycodes and change the screen brightness, without it the keys generate no keycode at all (and don't change anything). It's an acpi module, I assume it should be in your kernel.

masonm 09-06-2008 08:07 PM

All of those keys work for me on my HP Pavillion both in Slack and Debian. Both do have the video module loaded so Uncle Theodore may well be on the spot there.

Either that or you're just not holding your tongue the right way when you press the buttons.

mlp68 09-07-2008 11:51 AM

Great! Yes, that's it.

I didn't have the video.ko module built -- it has dependencies which are set indirectly by enabling other kernel features. I figured out how to enable it, built it... works.

Thanks, guys!

mlp


All times are GMT -5. The time now is 08:40 PM.