Bug 22722

Summary: regression since 2.6.36: backlight in sony-laptop not working
Product: Drivers Reporter: Maciej Rutecki (maciej.rutecki)
Component: Platform_x86Assignee: Mattia Dongili (malattia)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla, dmitry.torokhov, lenb, maciej.rutecki, malattia, michael, preining, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.37-rc1 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 21782    
Attachments: Fix typo in keycode validation

Description Maciej Rutecki 2010-11-11 08:10:59 UTC
Subject    : regression since 2.6.36: backlight in sony-laptop not working
Submitter  : Norbert Preining <preining@logic.at>
Date       : 2010-11-04 14:29
Message-ID : 20101104142915.GC7650@gamma.logic.tuwien.ac.at
References : http://marc.info/?l=linux-kernel&m=128888097600601&w=2

This entry is being used for tracking a regression from 2.6.36. Please don't
close it until the problem is fixed in the mainline.
Comment 1 Len Brown 2010-11-16 02:26:54 UTC
According to the thread, it looks like
input broke some sort of compatibility w/ user-space.

re-categorizing to drivers/input.

------------------

From:       Mattia Dongili <malattia () linux ! it>

You will need an updated input-kbd to set the scancode map.

> > $ 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
> 
> Ahhhhh
>       root$ input-kbd 8
>       /dev/input/event8
>       protocol version mismatch (expected 65536, got 65537)
> and the same for all event devices??
> 
> I have input-kbd from xserver-xorg-input-kbd in Debian/sid, which is
> at 1:1.4.0-2 version.
> 
> Does that mean that 2.6.37rc is too new for the user space?

Maybe. Anyway if evtest reacts positively to key presses then it's a
userspace issue and not the driver's.
Comment 2 Norbert Preining 2010-11-16 05:18:19 UTC
Yup, I confirm that 2.6.36 still works as expected with the very same user space (up2date debian/sid), while 2.6.37-rc1 does not work.
Comment 3 Dmitry Torokhov 2010-11-16 16:56:10 UTC
We up-revved the protocol number for evdev to reflect support of large scan codes.  If utilities wish to check protocol numbers they should check if the protocol "at least N", not "exactly N".

This is problem with this particular utility and bug should be filed there. BTW, why don't they use udev's facilities to remap keys?
Comment 4 Dmitry Torokhov 2010-11-16 16:58:30 UTC
*** Bug 23022 has been marked as a duplicate of this bug. ***
Comment 5 Michael Doube 2010-11-17 09:07:14 UTC
I read the thread above and Norbert reports that

"acpi_listen does not issue anything when these keys are pressed"

However, for me acpi_listen issues normal output as I posted in the duped bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=23022#c2
(Ubuntu 10.10, Linux 2.6.37-rc1)
Comment 6 Mattia Dongili 2010-11-18 13:35:55 UTC
Created attachment 37442 [details]
Fix typo in keycode validation

This patch fixes the issue for me.
Comment 7 Norbert Preining 2010-11-18 15:08:11 UTC
Hi Mattia,

thanks, that patch also fixed the issue for me, great.

So at the end it was a bug, puuuhhhhh.... ;-)

Best

Norbert
Comment 8 Dmitry Torokhov 2010-11-18 17:07:14 UTC
Oh well ;)
Comment 9 Rafael J. Wysocki 2010-11-18 23:04:42 UTC
Handled-By : Mattia Dongili <malattia@linux.it>
Patch : https://bugzilla.kernel.org/attachment.cgi?id=37442
Comment 10 Michael Doube 2010-11-20 18:13:27 UTC
Fixed here too, thanks.

Tested mainline with patch committed to it.
Comment 11 Rafael J. Wysocki 2010-12-02 21:17:45 UTC
Fixed by commit de391d12500ede13faa7ecadbe900a8de1f76cfa .