Re: regression since 2.6.36: backlight in sony-laptop not working

From: Mattia Dongili
Date: Thu Nov 11 2010 - 23:23:04 EST


On Fri, Nov 12, 2010 at 03:57:32AM +0000, Matthew Garrett wrote:
> On Fri, Nov 12, 2010 at 12:50:27PM +0900, Norbert Preining wrote:
> > THen the problem is simply that the acpi events are not coming through
> > when pressing the respective keys.
>
> Then yes, that's probably related to sony-laptop. If you run evtest
> against the /dev/input/event device that corresponds to sony-laptop,
> what events do you get when you hit the brightness keys?

backlight (actually Fn+F[56]) is one of those keys the needs remapping
these days, i.e. if xev doesn't get any event in X then you may need
something like:

$ diff -u <(sudo input-kbd 5) vaio-kbd
/dev/input/event5
bustype : BUS_ISA
vendor : 0x104d
product : 0x0
version : 0
name : "Sony Vaio Keys"
bits ev : EV_SYN EV_KEY EV_MSC

map: 44 keys, size: 59/64
--- /proc/self/fd/11 2010-11-12 13:10:39.811178332 +0900
+++ vaio-kbd 2010-10-31 19:24:49.000000000 +0900
@@ -4,8 +4,8 @@
0x0006 = 467 # KEY_FN_F2
0x0007 = 468 # KEY_FN_F3
0x0008 = 469 # KEY_FN_F4
-0x0009 = 470 # KEY_FN_F5
-0x000a = 471 # KEY_FN_F6
+0x0009 = 224 # KEY_BRIGHTNESSDOWN
+0x000a = 225 # KEY_BRIGHTNESSUP
0x000b = 472 # KEY_FN_F7
0x000c = 473 # KEY_FN_F8
0x000d = 474 # KEY_FN_F9

See the manpage for input-kbd and /usr/include/linux/input.h for valid
key values.
In short `input-kbd <devNo>` gives you the current map. Redirect the
output to a file, edit it to change the keys you need remapped and run
`input-kbd -f <file> <devNo>`.

For a reference look at this bug report:
http://bugs.freedesktop.org/show_bug.cgi?id=11227

If the above is not the case then there might be another problem in
sony-laptop as Matthew suggests.
--
mattia
:wq!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/