Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).


  Search this Thread
Old 09-06-2008, 01:28 AM   #1
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Rep: Reputation: 40
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,
Old 09-06-2008, 06:16 PM   #2
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 69
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.
Old 09-06-2008, 09:07 PM   #3
Senior Member
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2 Solus
Posts: 2,264

Rep: Reputation: 51
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.
Old 09-07-2008, 12:51 PM   #4
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 333

Original Poster
Rep: Reputation: 40
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!



keyboard, keycodes, laptop

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows key lacking scan code DavidMcCann Linux - General 8 02-16-2011 08:04 PM
Bash & Xdialog - how to code to recognize ENTER key on keyboard.? craftybytes Linux - Software 6 04-03-2008 02:00 AM
Keyboard-shortcut mystery Ander Linux - Software 2 01-15-2005 02:45 PM
keyboard key: where is my | ??? erickFis Linux - Hardware 1 02-10-2004 04:29 PM
Key code? wyvis Linux - General 1 01-14-2003 02:30 PM > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration