Bug 13935

Summary: 2.6.31-rcX breaks Apple MightyMouse (Bluetooth version)
Product: Drivers Reporter: Adrian Ulrich (kernel)
Component: Input DevicesAssignee: drivers_input-devices
Status: CLOSED CODE_FIX    
Severity: normal CC: jikos, kernel.org, odi, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.31 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 13615    

Description Adrian Ulrich 2009-08-08 22:08:33 UTC
I've just discovered that my MightyMouse refuses to work on Linux 2.6.31-rc5 (also tested with rc3)

The mouse works again on 2.6.31-rcX after removing this patch:

 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fa047e4f6fa63a6e9d0ae4d7749538830d14a343
Comment 1 Andrew Morton 2009-08-08 22:24:32 UTC
On Sat, 8 Aug 2009 22:08:34 GMT bugzilla-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=13935
> 
>            Summary: 2.6.31-rcX breaks Apple MightyMouse (Bluetooth
>                     version)
>            Product: Drivers
>            Version: 2.5
>     Kernel Version: 2.6.31
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Input Devices
>         AssignedTo: drivers_input-devices@kernel-bugs.osdl.org
>         ReportedBy: kernel@blinkenlights.ch
>         Regression: Yes
> 
> 
> I've just discovered that my MightyMouse refuses to work on Linux 2.6.31-rc5
> (also tested with rc3)

whoops.

> The mouse works again on 2.6.31-rcX after removing this patch:
> 
> 
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fa047e4f6fa63a6e9d0ae4d7749538830d14a343
> 

Thanks for working that out!


commit fa047e4f6fa63a6e9d0ae4d7749538830d14a343
Author:     Jiri Kosina <jkosina@suse.cz>
AuthorDate: Wed Jun 10 10:25:56 2009 +0200
Commit:     Jiri Kosina <jkosina@suse.cz>
CommitDate: Wed Jun 10 10:25:56 2009 +0200

    HID: fix inverted wheel for bluetooth version of apple mighty mouse
    
    Bluetooth version of Apple Mighty mouse (0x05ac/0x030c) doesn't, according t
    multiple reports on linux-input@, need the same quirk as the USB version of
    this mouse (0x05ac/0x0304) does.
    
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Comment 2 Rafael J. Wysocki 2009-08-09 12:41:39 UTC
First-Bad-Commit : fa047e4f6fa63a6e9d0ae4d7749538830d14a343
Comment 3 Jiri Slaby 2009-08-11 07:46:22 UTC
On 08/09/2009 12:24 AM, Andrew Morton wrote:
> On Sat, 8 Aug 2009 22:08:34 GMT bugzilla-daemon@bugzilla.kernel.org wrote:
> 
>> http://bugzilla.kernel.org/show_bug.cgi?id=13935
>>
>>            Summary: 2.6.31-rcX breaks Apple MightyMouse (Bluetooth
>>                     version)
>>            Product: Drivers
>>            Version: 2.5
>>     Kernel Version: 2.6.31
>>           Platform: All
>>         OS/Version: Linux
>>               Tree: Mainline
>>             Status: NEW
>>           Severity: normal
>>           Priority: P1
>>          Component: Input Devices
>>         AssignedTo: drivers_input-devices@kernel-bugs.osdl.org
>>         ReportedBy: kernel@blinkenlights.ch
>>         Regression: Yes
>>
>>
>> I've just discovered that my MightyMouse refuses to work on Linux 2.6.31-rc5
>> (also tested with rc3)
> 
> whoops.
> 
>> The mouse works again on 2.6.31-rcX after removing this patch:

Without the patch (with the quirk) do wheels and buttons work in a
correct way (I mean are they inverted)?

>>
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fa047e4f6fa63a6e9d0ae4d7749538830d14a343

> commit fa047e4f6fa63a6e9d0ae4d7749538830d14a343
> Author:     Jiri Kosina <jkosina@suse.cz>
> AuthorDate: Wed Jun 10 10:25:56 2009 +0200
> Commit:     Jiri Kosina <jkosina@suse.cz>
> CommitDate: Wed Jun 10 10:25:56 2009 +0200
> 
>     HID: fix inverted wheel for bluetooth version of apple mighty mouse

It does remove entry from the apple driver, but leaves it in the hid
ignore list. Was this somehow intentional, Jiri?
Comment 4 Adrian Ulrich 2009-08-11 08:33:15 UTC
> Without the patch (with the quirk) do wheels and buttons work in a
> correct way (I mean are they inverted)?

The buttons and vertical scroll works perfectly.

I do not know whether the horizontal scrolling works (haven't configured it as i'm using the MM via /dev/input/mice (NOT evdev) but i'll give it a try this evening when i'm at home)


I've seen various 'weird' reports about MightyMouse quirks and i suspect that there might be a bad hardware-revision out in the wild that has various quirks (Such as inverted mouse buttons)
Comment 5 Rafael J. Wysocki 2009-08-11 15:36:50 UTC
On Tuesday 11 August 2009, Jan Scholz wrote:
> Hi,
> 
> I can confirm the reported bug, but for me reverting fa047e4f6fa63a6 is
> not sufficient. I have to remove the device id of the mighty mouse from
> the hid_blacklist list in drivers/hid/hid-core.c as well, see the patch
> below.
> 
> Concerning the need for the quirks: I think there might be some
> dependence on the version of X that is used. If I recall correctly, with
> xorg-server-1.3 the quirk "APPLE_INVERT_HWHEEL" was necessary, but this
> changed when I switched to xorg-server-1.5.3, where now horizontal
> scrolling moves in directions you'd expect from vertical scrolling.
> ...but I wouldn't bet on my memory regarding things with xorg-server-1.3
> since it's been quite some time ago and I never really liked the
> horizontal scrolling anyway.
> 
> Cheers,
> Jan
> 
> "Rafael J. Wysocki" <rjw@sisk.pl> writes:
> 
> > This message has been generated automatically as a part of a report
> > of recent regressions.
> >
> > The following bug entry is on the current list of known regressions
> > from 2.6.30.  Please verify if it still should be listed and let me know
> > (either way).
> >
> >
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=13935
> > Subject             : 2.6.31-rcX breaks Apple MightyMouse (Bluetooth
> version)
> > Submitter   : Adrian Ulrich <kernel@blinkenlights.ch>
> > Date                : 2009-08-08 22:08 (2 days old)
> 
> From b7393ed6dfe00c9e126a2dd34659156548df15cc Mon Sep 17 00:00:00 2001
> From: Jan Scholz <Scholz@fias.uni-frankfurt.de>
> Date: Tue, 11 Aug 2009 14:33:27 +0200
> Subject: [PATCH] HID: commit fa047e4f is incomplete
> 
> Commit fa047e4f6fa63a6e9d0ae4d7749538830d14a343 "HID: fix inverted
> wheel for bluetooth version of apple mighty mouse" is incomplete. If
> we remove Apple MightyMouse (bluetooth version) from the list of
> apple_devices in drivers/hid/hid-apple.c we have to remove it from
> hid_blacklist in drivers/hid/hid-core.c as well.
> 
> Signed-off-by: Jan Scholz <Scholz@fias.uni-frankfurt.de>
> ---
>  drivers/hid/hid-core.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 5eb10c2..047844d 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1319,7 +1319,6 @@ static const struct hid_device_id hid_blacklist[] = {
>       { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) },
>       { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
>  
> -     { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 0x030c) },
>       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT,
>  USB_DEVICE_ID_MS_PRESENTER_8K_BT) },
>       { }
>  };
>
Comment 6 Martey Dodoo 2009-08-12 01:31:04 UTC
I am the reporter of bug 13182. On my bluetooth Mighty Mouse, the mouse is detected and horizontal scrolling works properly with the patch if the device is added to the list of apple_devices - like in <http://www.spinics.net/lists/linux-input/msg04037.html>.

Is removing it from hid_blacklist a better solution? Should I test using that?
Comment 7 Jiri Kosina 2009-08-26 11:20:50 UTC
(In reply to comment #5)
> > I can confirm the reported bug, but for me reverting fa047e4f6fa63a6 is
> > not sufficient. I have to remove the device id of the mighty mouse from
> > the hid_blacklist list in drivers/hid/hid-core.c as well, see the patch
> below.

Thanks for catching this, I have applied the patch.
Comment 8 Ortwin Glück 2009-09-14 14:00:24 UTC
This also solves the problem for me (I had reported the regression in linux-input earlier), and the hor scrolling is now correct too. Before 2.6.31 I had used xmodmap to correct the hor scrolling direction.
Comment 9 Rafael J. Wysocki 2009-10-02 17:13:54 UTC
Fixed by commit 42960a13001aa6df52ca9952ce996f94a744ea65.