Bug 1184352 - Extra mouse buttons are not working after installing xorg-x11-drv-libinput
Summary: Extra mouse buttons are not working after installing xorg-x11-drv-libinput
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-libinput
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Hutterer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1185072 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-21 07:47 UTC by Radim Hopp
Modified: 2015-02-08 08:58 UTC (History)
4 users (show)

Fixed In Version: xorg-x11-drv-libinput-0.4.0-2.fc21
Clone Of:
Environment:
Last Closed: 2015-02-08 08:58:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
xorg.0.log (50.59 KB, text/plain)
2015-01-22 07:19 UTC, Radim Hopp
no flags Details
xinput output (10.06 KB, text/plain)
2015-01-22 07:19 UTC, Radim Hopp
no flags Details

Description Radim Hopp 2015-01-21 07:47:18 UTC
Description of problem:
I have Logitech MX Performance mouse which has 4 extra buttons. Before installing xorg-x11-drv-libinput, all those buttons worked (were registered for example by `xev`. I used xbindkeys to bind those buttons to specific actions.
But after installing xorg-x11-drv-libinput (now clickpad on my T440s works like a charm!), those 4 extra mouse buttons stopped working. `xev` is completely silent when I'm pressing those buttons.

After uninstalling xorg-x11-drv-libinput and rebooting machine, buttons are working again.

Version-Release number of selected component (if applicable):
 % rpm -qi xorg-x11-drv-libinput                                                                                !1571
Name        : xorg-x11-drv-libinput
Version     : 0.1.2
Release     : 3.fc21
Architecture: x86_64


How reproducible:
Allways

Steps to Reproduce:
1. Install xorg-x11-drv-libinput
2. Reboot
3. Open `xev` and try to push extra mouse buttons
4. Expected: Output acoording to button pressed
5. Fail: no output in xev.

Actual results:
Buttons are not working

Expected results:
Buttons are working

Additional info:
Feel free to ask for more info.

Comment 1 Hans de Goede 2015-01-21 11:10:07 UTC
Hi,

Thanks for the bug report.

Can you please do:

sudo dnf install evemu
sudo evemu-record

And then in evemu-record type the number of the evdev for your mouse, followed by <enter>, and then directly do ctrl+c. After this please copy and paste the output evemu-record gave describing your device into bugzilla.

Regards,

Hans

Comment 2 Radim Hopp 2015-01-21 11:33:59 UTC
 % sudo evemu-record                                                                                                                                                                                          !1583
Available devices:
/dev/input/event0:      Lid Switch
/dev/input/event1:      Sleep Button
/dev/input/event2:      Power Button
/dev/input/event3:      AT Translated Set 2 keyboard
/dev/input/event4:      SynPS/2 Synaptics TouchPad
/dev/input/event5:      Video Bus
/dev/input/event6:      Lenovo ThinkPad Compact USB Keyboard with TrackPoint
/dev/input/event7:      Logitech Unifying Device. Wireless PID:101a
/dev/input/event8:      ThinkPad Extra Buttons
/dev/input/event9:      HDA Intel HDMI HDMI/DP,pcm=3
/dev/input/event10:     HDA Intel HDMI HDMI/DP,pcm=7
/dev/input/event11:     HDA Intel HDMI HDMI/DP,pcm=8
/dev/input/event12:     HDA Intel PCH Dock Mic
/dev/input/event13:     HDA Intel PCH Mic
/dev/input/event14:     HDA Intel PCH Dock Headphone
/dev/input/event15:     HDA Intel PCH Headphone
/dev/input/event16:     Integrated Camera
/dev/input/event17:     Lenovo ThinkPad Compact USB Keyboard with TrackPoint
/dev/input/event18:     Logitech USB Optical Mouse
/dev/input/event19:     TPPS/2 IBM TrackPoint
Select the device event number [0-19]: 18
# EVEMU 1.2
# Input device name: "Logitech USB Optical Mouse"
# Input device ID: bus 0x03 vendor 0x46d product 0xc018 version 0x111
# Supported events:
#   Event type 0 (EV_SYN)
#     Event code 0 (SYN_REPORT)
#     Event code 1 (SYN_CONFIG)
#     Event code 2 (SYN_MT_REPORT)
#     Event code 3 (SYN_DROPPED)
#     Event code 4 ((null))
#     Event code 5 ((null))
#     Event code 6 ((null))
#     Event code 7 ((null))
#     Event code 8 ((null))
#     Event code 9 ((null))
#     Event code 10 ((null))
#     Event code 11 ((null))
#     Event code 12 ((null))
#     Event code 13 ((null))
#     Event code 14 ((null))
#   Event type 1 (EV_KEY)
#     Event code 272 (BTN_LEFT)
#     Event code 273 (BTN_RIGHT)
#     Event code 274 (BTN_MIDDLE)
#   Event type 2 (EV_REL)
#     Event code 0 (REL_X)
#     Event code 1 (REL_Y)
#     Event code 8 (REL_WHEEL)
#   Event type 4 (EV_MSC)
#     Event code 4 (MSC_SCAN)
# Properties:
N: Logitech USB Optical Mouse
I: 0003 046d c018 0111
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 07 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 02 03 01 00 00 00 00 00 00
B: 03 00 00 00 00 00 00 00 00
B: 04 10 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
################################
#      Waiting for events      #
################################

Comment 3 Hans de Goede 2015-01-21 12:56:23 UTC
Hi,

Thanks. The evemu-record output looks like a standard mouse with no extra buttons, weird. Can you try moving the mouse a bit after selecting number 18, that should show events if you've the right number.

Once you've the right number, try clicking the extra buttons and see if those also generate events, if they do please copy and paste the output for the generated events here.

If they do not generate events, and it is a wireless mouse can you try doing evemu-record on the "Logitech Unifying Device" ? And see if maybe the buttons are being reported through that. If the buttons are reported through the "Logitech Unifying Device" please provide full evemu-record output for that.

Regards,

Hans

Comment 4 Radim Hopp 2015-01-21 14:29:45 UTC
You're right. That standard mouse isn't even generating any events.
When I try it with that Logitech Unyfiyng Device (I think this is logitech's name for it's peripherals USB dongle - http://www.logitech.com/en-us/promotions/6072)

Output for it is:

% sudo evemu-record                                                                                            !1589
[sudo] password for rhopp: 
Available devices:
/dev/input/event0:      Lid Switch
/dev/input/event1:      Sleep Button
/dev/input/event2:      Power Button
/dev/input/event3:      AT Translated Set 2 keyboard
/dev/input/event4:      SynPS/2 Synaptics TouchPad
/dev/input/event5:      Video Bus
/dev/input/event6:      Logitech USB Optical Mouse
/dev/input/event7:      Logitech Unifying Device. Wireless PID:101a
/dev/input/event8:      ThinkPad Extra Buttons
/dev/input/event9:      HDA Intel HDMI HDMI/DP,pcm=3
/dev/input/event10:     HDA Intel HDMI HDMI/DP,pcm=7
/dev/input/event11:     HDA Intel HDMI HDMI/DP,pcm=8
/dev/input/event12:     HDA Intel PCH Dock Mic
/dev/input/event13:     HDA Intel PCH Mic
/dev/input/event14:     HDA Intel PCH Dock Headphone
/dev/input/event15:     HDA Intel PCH Headphone
/dev/input/event16:     Lenovo ThinkPad Compact USB Keyboard with TrackPoint
/dev/input/event17:     Lenovo ThinkPad Compact USB Keyboard with TrackPoint
/dev/input/event18:     Integrated Camera
/dev/input/event19:     TPPS/2 IBM TrackPoint
Select the device event number [0-19]: 7
# EVEMU 1.2
# Input device name: "Logitech Unifying Device. Wireless PID:101a"
# Input device ID: bus 0x03 vendor 0x46d product 0xc52b version 0x111
# Supported events:
#   Event type 0 (EV_SYN)
#     Event code 0 (SYN_REPORT)
#     Event code 1 (SYN_CONFIG)
#     Event code 2 (SYN_MT_REPORT)
#     Event code 3 (SYN_DROPPED)
#     Event code 4 ((null))
#     Event code 5 ((null))
#     Event code 6 ((null))
#     Event code 7 ((null))
#     Event code 8 ((null))
#     Event code 9 ((null))
#     Event code 10 ((null))
#     Event code 11 ((null))
#     Event code 12 ((null))
#     Event code 13 ((null))
#     Event code 14 ((null))
#   Event type 1 (EV_KEY)
#     Event code 272 (BTN_LEFT)
#     Event code 273 (BTN_RIGHT)
#     Event code 274 (BTN_MIDDLE)
#     Event code 275 (BTN_SIDE)
#     Event code 276 (BTN_EXTRA)
#     Event code 277 (BTN_FORWARD)
#     Event code 278 (BTN_BACK)
#     Event code 279 (BTN_TASK)
#     Event code 280 ((null))
#     Event code 281 ((null))
#     Event code 282 ((null))
#     Event code 283 ((null))
#     Event code 284 ((null))
#     Event code 285 ((null))
#     Event code 286 ((null))
#     Event code 287 ((null))
#   Event type 2 (EV_REL)
#     Event code 0 (REL_X)
#     Event code 1 (REL_Y)
#     Event code 6 (REL_HWHEEL)
#     Event code 8 (REL_WHEEL)
#   Event type 4 (EV_MSC)
#     Event code 4 (MSC_SCAN)
# Properties:
N: Logitech Unifying Device. Wireless PID:101a
I: 0003 046d c52b 0111
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 ff ff 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 02 43 01 00 00 00 00 00 00
B: 03 00 00 00 00 00 00 00 00
B: 04 10 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
################################
#      Waiting for events      #
################################
E: 0.000000 0002 0000 -004      # EV_REL / REL_X                -4
E: 0.000000 0002 0001 -003      # EV_REL / REL_Y                -3
E: 0.000000 0000 0000 0000      # ------------ SYN_REPORT (0) ----------
E: 0.007946 0002 0000 -005      # EV_REL / REL_X                -5
E: 0.007946 0002 0001 -003      # EV_REL / REL_Y                -3
E: 0.007946 0000 0000 0000      # ------------ SYN_REPORT (0) ----------
E: 0.016000 0002 0000 -003      # EV_REL / REL_X                -3
E: 0.016000 0002 0001 -003      # EV_REL / REL_Y                -3
E: 0.016000 0000 0000 0000      # ------------ SYN_REPORT (0) ----------
E: 0.023998 0002 0000 -003      # EV_REL / REL_X                -3
E: 0.023998 0002 0001 -003      # EV_REL / REL_Y                -3
E: 0.023998 0000 0000 0000      # ------------ SYN_REPORT (0) ----------
E: 0.031999 0002 0000 -002      # EV_REL / REL_X                -2
E: 0.031999 0002 0001 -003      # EV_REL / REL_Y                -3
E: 0.031999 0000 0000 0000      # ------------ SYN_REPORT (0) ----------
E: 0.039942 0002 0000 -001      # EV_REL / REL_X                -1
E: 0.039942 0002 0001 -003      # EV_REL / REL_Y                -3
E: 0.039942 0000 0000 0000      # ------------ SYN_REPORT (0) ----------
E: 0.047950 0002 0000 -002      # EV_REL / REL_X                -2
E: 0.047950 0002 0001 -003      # EV_REL / REL_Y                -3
...
lot of other X/Y events
...
E: 10.131841 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 12.881891 0004 0004 589828   # EV_MSC / MSC_SCAN             589828
E: 12.881891 0001 0113 0001     # EV_KEY / BTN_SIDE             1
E: 12.881891 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 13.169913 0004 0004 589828   # EV_MSC / MSC_SCAN             589828
E: 13.169913 0001 0113 0000     # EV_KEY / BTN_SIDE             0
E: 13.169913 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 15.073891 0004 0004 589829   # EV_MSC / MSC_SCAN             589829
E: 15.073891 0001 0114 0001     # EV_KEY / BTN_EXTRA            1
E: 15.073891 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 15.225857 0004 0004 589829   # EV_MSC / MSC_SCAN             589829
E: 15.225857 0001 0114 0000     # EV_KEY / BTN_EXTRA            0
E: 15.225857 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 16.389883 0004 0004 589833   # EV_MSC / MSC_SCAN             589833
E: 16.389883 0001 0118 0001     # EV_KEY / (null)               1
E: 16.389883 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 16.573793 0004 0004 589833   # EV_MSC / MSC_SCAN             589833
E: 16.573793 0001 0118 0000     # EV_KEY / (null)               0
E: 16.573793 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 18.885842 0004 0004 589830   # EV_MSC / MSC_SCAN             589830
E: 18.885842 0001 0115 0001     # EV_KEY / BTN_FORWARD          1
E: 18.885842 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 18.965842 0004 0004 589830   # EV_MSC / MSC_SCAN             589830
E: 18.965842 0001 0115 0000     # EV_KEY / BTN_FORWARD          0
E: 18.965842 0000 0000 0000     # ------------ SYN_REPORT (0) ----------


This is for each extra button pressed in order: back button, forward button, zoom button, thumb button

Comment 5 Hans de Goede 2015-01-21 15:03:03 UTC
Hi again,

Thanks the latest recording looks good, looking at what the device emits, I see 2 problems:

1)

E: 16.573793 0004 0004 589833   # EV_MSC / MSC_SCAN             589833
E: 16.573793 0001 0118 0000     # EV_KEY / (null)               0

This is a kernel hid hut mapping problem, I've put looking into this on my to do list

2)

Even the buttons which do generate proper events do not end up in X. Looking at the libinput code, they should get translated into pointer-button events, and then in xf86-input-libinput they get translated by this bit:

static inline unsigned int
btn_linux2xorg(unsigned int b)
{
        unsigned int button;

        switch(b) {
        case 0: button = 0; break;
        case BTN_LEFT: button = 1; break;
        case BTN_MIDDLE: button = 2; break;
        case BTN_RIGHT: button = 3; break; 
        default:
                button = 8 + b - BTN_SIDE;
                break;
        }

        return button;
}

So something like BTN_SIDE should end up getting reported as a button 8 click. 

Hmm, that does not match with:
static void
init_button_labels(Atom *labels, size_t size)
{
        assert(size > 10);

        memset(labels, 0, size * sizeof(Atom));
        labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
        labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
        labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); 
        labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
        labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
        labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
        labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
        labels[7] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_SIDE);
        labels[8] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_EXTRA);
        labels[9] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_BACK); 
        labels[10] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_FORWARD);
}

Where SIDE is stored in location 7 rather then 8. But I don't thnk that a slight mismatch there should cause the buttons to not work all. also BACK and FORWARD are swapped here.

So I see no smoking gun. Peter this seems like one for you...

Regards,

Hans

Comment 6 Peter Hutterer 2015-01-22 07:09:15 UTC
odd, I ran the recording here and I get buttons 8, 9, 13 and 10 in that order (that's in xev).

can you attach your xorg.log and the output of xinput list --long please?

Comment 7 Radim Hopp 2015-01-22 07:19:05 UTC
Created attachment 982611 [details]
xorg.0.log

Comment 8 Radim Hopp 2015-01-22 07:19:59 UTC
Created attachment 982612 [details]
xinput output

Comment 9 Peter Hutterer 2015-01-23 00:01:31 UTC
Right, so the problem is 

⎜   ↳ Logitech Unifying Device. Wireless PID:101a	id=9	[slave  pointer  (2)]
	Reporting 7 classes:
		Class originated from: 9. Type: XIButtonClass
		Buttons supported: 7

I'm not sure yet why this happens though

Comment 10 Peter Hutterer 2015-01-23 01:43:25 UTC
urgh, found it:

[    20.689] (II) Module libinput: vendor="X.Org Foundation"
[    20.689] 	compiled for 1.16.0, module version = 0.1.2

I never built a newer xorg-x11-drv-libinput for f21, not sure why, I had the package installed locally. Whoopsy.

fixed upstream commit d9c212d2665f2b8c25e5a4cdba29a047bd87d7cd

Comment 11 Fedora Update System 2015-01-23 01:58:42 UTC
xorg-x11-drv-libinput-0.4.0-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/xorg-x11-drv-libinput-0.4.0-1.fc21

Comment 12 Hans de Goede 2015-01-23 09:22:36 UTC
(In reply to Peter Hutterer from comment #10)
> urgh, found it:
> 
> [    20.689] (II) Module libinput: vendor="X.Org Foundation"
> [    20.689] 	compiled for 1.16.0, module version = 0.1.2
> 
> I never built a newer xorg-x11-drv-libinput for f21, not sure why, I had the
> package installed locally. Whoopsy.
> 
> fixed upstream commit d9c212d2665f2b8c25e5a4cdba29a047bd87d7cd

Good. Have you seen my comment about the ordering of the labels in init_button_labels not matching with the input.h BTN_FOO defines? See comment 5.

Comment 13 Hans de Goede 2015-01-24 08:29:20 UTC
*** Bug 1185072 has been marked as a duplicate of this bug. ***

Comment 14 Fedora Update System 2015-01-26 02:32:48 UTC
Package xorg-x11-drv-libinput-0.4.0-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xorg-x11-drv-libinput-0.4.0-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1097/xorg-x11-drv-libinput-0.4.0-1.fc21
then log in and leave karma (feedback).

Comment 15 Peter Hutterer 2015-01-26 21:56:24 UTC
(In reply to Hans de Goede from comment #12)
> Good. Have you seen my comment about the ordering of the labels in
> init_button_labels not matching with the input.h BTN_FOO defines? See
> comment 5.

back/forward swap is now fixed upstream. This is just a button label, it has no effects on how the button works. AFAIK no-one uses this for anything but debugging :)
also note that buttons are 1-indexed but the label array is 0-indexed.

Comment 16 Fedora Update System 2015-01-28 11:27:42 UTC
xorg-x11-drv-libinput-0.4.0-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/xorg-x11-drv-libinput-0.4.0-2.fc21

Comment 17 Fedora Update System 2015-02-08 08:58:47 UTC
xorg-x11-drv-libinput-0.4.0-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.