1 |
On Sat, Jan 03, 2009 at 05:32:03PM +0100, Penguin Lover Pat squawked: |
2 |
> I've bought Dell Latitude E4300 and start to install Gentoo on it, but |
3 |
> the volume buttons don't work. Please, could someone give me hint where |
4 |
> I have to start to fix it? |
5 |
|
6 |
The volume keys are not "standard" per se, which is why they often don't |
7 |
work out of the box. I have not figured out a way to have them work in |
8 |
CLI, but you can get them to work in X, using one of the following two |
9 |
ways. |
10 |
|
11 |
1) emerge xbindkeys |
12 |
Read the documentation on xbindkeys to see how to write a |
13 |
configuration file. On my Dell Latitude D600, the keycodes for |
14 |
the volume keys are: |
15 |
Volume up 176 |
16 |
Volume down 174 |
17 |
Mute/unmute 160 |
18 |
So in your ~/.xbindkeysrc, you can write a line like |
19 |
-------<snip>---------- |
20 |
"amixer sset PCM +1" |
21 |
m:0x0 + c:176 |
22 |
-------<unsnip>-------- |
23 |
and change your command and keycode appropriately. Lastly you |
24 |
need to start xbindkeys. I usually have it start in my ~/.xinitrc |
25 |
before the WM. But you can also just add it to the list of |
26 |
programs automatically run by your WM on startup. |
27 |
|
28 |
2) I think this way is probably better, but the last I tried I |
29 |
couldn't get it to play well with e16, which is why I mention the |
30 |
previous method. This method works with at least fvwm, and |
31 |
probably most other WMs. |
32 |
|
33 |
emerge xmodmap (if it is not installed already) |
34 |
add the following lines to ~/.xmodmaprc |
35 |
---------<snip>----------- |
36 |
keycode 174 = XF86AudioLowerVolume |
37 |
keycode 176 = XF86AudioRaiseVolume |
38 |
keycode 160 = XF86AudioMute |
39 |
--------<unsnip>---------- |
40 |
and make sure to start xmodmap when you start your X (again, |
41 |
either by starting xmodmap in ~/.xinitrc or in your WM). |
42 |
|
43 |
I believe some modern WMs will automagically tie the XF86Audio* |
44 |
keys to appropriate mixer commands to raise or lower volume. If |
45 |
not (as in the case of fvwm), you need to edit the keybinding for |
46 |
those keys, and how to do this depends on your Window Manager of |
47 |
choice. |
48 |
|
49 |
Regards, |
50 |
|
51 |
W |
52 |
-- |
53 |
"Physics in the Laundromat" |
54 |
"The Rolling Motion of a Half-full Beer Can" |
55 |
Some of the favorite past-times of Prof. Kirk T. McDonald. |
56 |
See http://puhep1.princeton.edu/~mcdonald/examples/ |
57 |
Sortir en Pantoufles: up 757 days, 17:35 |