On Sat, Jan 03, 2009 at 05:32:03PM +0100, Penguin Lover Pat squawked:
> I've bought Dell Latitude E4300 and start to install Gentoo on it, but
> the volume buttons don't work. Please, could someone give me hint where
> I have to start to fix it?

The volume keys are not "standard" per se, which is why they often don't
work out of the box. I have not figured out a way to have them work in
CLI, but you can get them to work in X, using one of the following two
ways. 

  1) emerge xbindkeys
     Read the documentation on xbindkeys to see how to write a
     configuration file. On my Dell Latitude D600, the keycodes for
     the volume keys are:
       Volume up   176
       Volume down 174
       Mute/unmute 160
     So in your ~/.xbindkeysrc, you can write a line like
-------<snip>----------
"amixer sset PCM +1"
   m:0x0 + c:176
-------<unsnip>--------
     and change your command and keycode appropriately. Lastly you
     need to start xbindkeys. I usually have it start in my ~/.xinitrc
     before the WM. But you can also just add it to the list of
     programs automatically run by your WM on startup. 

  2) I think this way is probably better, but the last I tried I
     couldn't get it to play well with e16, which is why I mention the
     previous method. This method works with at least fvwm, and
     probably most other WMs. 

     emerge xmodmap (if it is not installed already)
     add the following lines to ~/.xmodmaprc
---------<snip>-----------
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute
--------<unsnip>----------
     and make sure to start xmodmap when you start your X (again,
     either by starting xmodmap in ~/.xinitrc or in your WM). 

     I believe some modern WMs will automagically tie the XF86Audio*
     keys to appropriate mixer commands to raise or lower volume. If
     not (as in the case of fvwm), you need to edit the keybinding for
     those keys, and how to do this depends on your Window Manager of
     choice. 

Regards, 

 W
-- 
"Physics in the Laundromat"
"The Rolling Motion of a Half-full Beer Can"
   Some of the favorite past-times of Prof. Kirk T. McDonald.
   See http://puhep1.princeton.edu/~mcdonald/examples/
Sortir en Pantoufles: up 757 days, 17:35

Reply via email to