Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139778 - Logitech MX300 4th button doesn't work
Summary: Logitech MX300 4th button doesn't work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2006-07-09 07:53 UTC by Roberto Castagnola
Modified: 2006-08-12 02:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Logitech-MX300.patch (mouse.diff,542 bytes, patch)
2006-07-09 07:58 UTC, Roberto Castagnola
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Castagnola 2006-07-09 07:53:11 UTC
I'm using a logitech MX300 mouse (4 buttons + wheel) connected with his usb/ps2 adapter. Since kernel 2.6.15 (gentoo-sources kernel) I need to patch a kernel module to get 4th button working.
Probably it works fine when connetted in usb as nobody else reported this problem.
Next attached is my patch.
Comment 1 Roberto Castagnola 2006-07-09 07:58:06 UTC
Created attachment 91286 [details, diff]
Logitech-MX300.patch

This patch works with gentoo-sources-2.6.17-r* kernel (and maybe with other kernels)
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2006-07-09 11:43:54 UTC
Where has this patch come from?
Comment 3 Roberto Castagnola 2006-07-10 06:03:49 UTC
(In reply to comment #2)
> Where has this patch come from?
> 

I wrote it by myself.
Updating to kernel 2.6.14 (the first with this problem) the 4th button stopped to work, so I used 'evtest' program (linuxtv-dvb-apps package) to check the problem.
This is the output when the patch isn't applied:

localhost ~ # evtest /dev/input/event0
Input driver version is 1.0.0
Input device ID: bus 0x11 vendor 0x2 product 0x2 version 0x6f
Input device name: "PS2++ Logitech MX Mouse"
Supported events:
  Event type 0 (Reset)
    Event code 0 (Reset)
    Event code 1 (Key)
    Event code 2 (Relative)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
    Event code 276 (ExtraBtn)
    Event code 279 (?)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
    Event code 8 (Wheel)
Testing ... (interrupt to exit)

Pressing 4th button nothing appens, so I tried it using a older kernel.
With 2.6.11 kernel the output is:

localhost ~ # evtest /dev/input/event0
Input driver version is 1.0.0
Input device ID: bus 0x11 vendor 0x2 product 0x6 version 0x6f
Input device name: "ImExPS/2 Logitech Explorer Mouse"
Supported events:
  Event type 0 (Reset)
    Event code 0 (Reset)
    Event code 1 (Key)
    Event code 2 (Relative)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
    Event code 275 (SideBtn)
    Event code 276 (ExtraBtn)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
    Event code 8 (Wheel)
Testing ... (interrupt to exit)

and pressing 4th button I get this output:

Event: time 1152526035.287101, type 1 (Key), code 275 (SideBtn), value 1
Event: time 1152526035.287110, type 0 (Reset), code 0 (Reset), value 0
Event: time 1152526035.465554, type 1 (Key), code 275 (SideBtn), value 0
Event: time 1152526035.465562, type 0 (Reset), code 0 (Reset), value 0

I don't understand why 'ExtraBtn' is registered as the Logitech MX300 mouse has only 4 buttons (see http://www.tomshardware.com/2003/01/10/logitech_mx_mice/page6.html to get a picture).
However, I have patched linux/drivers/input/mouse/logips2pp.c file changing 'PS2PP_EXTRA_BTN | PS2PP_TASK_BTN' with 'PS2PP_SIDE_BTN' and the 4th button started to work again.
Comment 4 Tim Yamin (RETIRED) gentoo-dev 2006-08-07 16:53:44 UTC
This recently got pushed upstream:

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=0c19fcd83793be248f8108a52f895c8d0034b182

... so we need to plonk this one for inclusion; thanks for the patch :)
Comment 5 Christian Heim (RETIRED) gentoo-dev 2006-08-08 10:05:15 UTC
Added to the linux-patches subversion repository. Will hit gentoo-sources as soon as I do a bump.
Comment 6 Roberto Castagnola 2006-08-12 00:34:35 UTC
Patch in gentoo-sources-2.6.17-r5
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2006-08-12 02:51:57 UTC
Indeed, closing