3

As of about a week ago, the scroll wheel on mice have stopped working (not just one, all mice). Here's what I've tried to investigate and fix the problem, all to no avail so far:

  • Confirmed the problem persists across three mice. One is Corsair, two are Logitech
  • Confirmed that all three mice work just fine on other operating systems
  • Booted Windows on the same machine and confirmed scroll works, so it's not a hardware problem
  • xinput shows the mouse, including the scroll wheel, and the button map is 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
  • xev does not display any event for when the scroll wheel is moved. However, middle mouse click does work just fine.
  • Restarting the window manager had no effect
  • Switching to a different window manager had no effect
  • Restarting X had no effect
  • Rebooting had no effect
  • I have three USB ports, changing to any of them has no effect. Tried switching to a different mouse, same problem. Tried a third mouse, same problem.
  • Updated all software and upgraded the kernel
  • Searched for answers on Reddit, Super User, Quora, etc. but all the solutions have already been ruled out by the above
  • Asked a question on Reddit r/linuxmint but they were no help

Here's some info on what I'm using:

  • OS: Linux Mint 18.1
  • Kernel: x86-64 Linux 4.10.0-14-generic
  • WM: i3, also tried awesome and cinnamon

The biggest issue I see is that xev doesn't show an event and that the problem is consistent across different mice. Again, this problem just popped up a week ago, it had been working without a care for about a year prior. I can't think of any changes that could have caused this in the last days preceding and I'm growing increasingly frustrated.

Any ideas on cause, a fix, what to investigate next?

Update: As per comment, here's the output of xinput list-props:

Device 'ckb1: Corsair Gaming Sabre PRO RGB Mouse':
Device Enabled (152):   1
Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (276): 0
Device Accel Constant Deceleration (277):   1.000000
Device Accel Adaptive Deceleration (278):   1.000000
Device Accel Velocity Scaling (279):    10.000000
Device Product ID (269):    6940, 6959
Device Node (270):  "/dev/input/event8"
Evdev Axis Inversion (280): 0, 0
Evdev Axes Swap (282):  0
Axis Labels (283):  "Rel X" (162), "Rel Y" (163), "Rel Z" (581), "Rel Rotary X" (582), "Rel Rotary Y" (583), "Rel Rotary Z" (584), "Rel Horiz Wheel" (489), "Rel Dial" (585), "Rel Vert Wheel" (275), "Rel Misc" (586), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0)
Button Labels (284):    "Button Left" (155), "Button Middle" (156), "Button Right" (157), "Button Wheel Up" (158), "Button Wheel Down" (159), "Button Horiz Wheel Left" (160), "Button Horiz Wheel Right" (161), "Button Side" (273), "Button Extra" (274), "Button Forward" (298), "Button Back" (299), "Button Task" (300), "Button 8" (579), "Button 9" (580), "Button Unknown" (272), "Button Unknown" (272), "Button Unknown" (272), "Button Unknown" (272), "Button Unknown" (272), "Button Unknown" (272), "Button Unknown" (272), "Button Unknown" (272), "Button Unknown" (272), "Button Unknown" (272)
Evdev Scrolling Distance (285): -77, -77, 1
Evdev Middle Button Emulation (286):    0
Evdev Middle Button Timeout (287):  50
Evdev Third Button Emulation (288): 0
Evdev Third Button Emulation Timeout (289): 1000
Evdev Third Button Emulation Button (290):  3
Evdev Third Button Emulation Threshold (291):   20
Evdev Wheel Emulation (292):    0
Evdev Wheel Emulation Axes (293):   0, 0, 4, 5
Evdev Wheel Emulation Inertia (294):    10
Evdev Wheel Emulation Timeout (295):    200
Evdev Wheel Emulation Button (296): 4
Evdev Drag Lock Buttons (297):  0

And the output of evtest as I scroll the wheel up and down:

Event: time 1491756163.211018, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1491756163.211018, -------------- SYN_REPORT ------------
Event: time 1491756163.459021, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1491756163.459021, -------------- SYN_REPORT ------------
Event: time 1491756163.684019, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1491756163.684019, -------------- SYN_REPORT ------------
Event: time 1491756164.165007, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1491756164.165007, -------------- SYN_REPORT ------------
Event: time 1491756164.582066, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
Event: time 1491756164.582066, -------------- SYN_REPORT ------------
Event: time 1491756164.712050, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
Event: time 1491756164.712050, -------------- SYN_REPORT ------------
Event: time 1491756164.872037, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
Event: time 1491756164.872037, -------------- SYN_REPORT ------------
Event: time 1491756165.095999, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
Event: time 1491756165.095999, -------------- SYN_REPORT ------------
Event: time 1491756166.027074, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1491756166.027074, -------------- SYN_REPORT ------------
Event: time 1491756166.419054, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1491756166.419054, -------------- SYN_REPORT ------------

Update 2: Relevant section of /var/log/Xorg.0.log. To be clear, here the mouse being used is Corsair, but I've also had the same issue with Logitech and Microsoft mice.

 (II) config/udev: Adding input device ckb1: Corsair Gaming Sabre PRO RGB Mouse (/dev/input/event6)
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: Applying InputClass "evdev keyboard catchall"
 (II) Using input driver 'evdev' for 'ckb1: Corsair Gaming Sabre PRO RGB Mouse'
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: always reports core events
 (**) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Device: "/dev/input/event6"
 (--) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Vendor 0x1b1c Product 0x1b2f
 (--) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Found 20 mouse buttons
 (--) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Found keys
 (II) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Forcing relative x/y axes to exist.
 (II) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Configuring as mouse
 (II) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Configuring as keyboard
 (**) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: YAxisMapping: buttons 4 and 5
 (**) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
 (**) Option "config_info" "udev:/sys/devices/virtual/input/input15/event6"
 (II) XINPUT: Adding extended input device "ckb1: Corsair Gaming Sabre PRO RGB Mouse" (type: KEYBOARD, id 14)
 (**) Option "xkb_rules" "evdev"
 (**) Option "xkb_model" "pc105"
 (**) Option "xkb_layout" "us"
 (II) config/udev: Adding input device ckb1: Corsair Gaming Sabre PRO RGB Mouse (/dev/input/event8)
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: Applying InputClass "evdev pointer catchall"
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: Applying InputClass "evdev keyboard catchall"
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: Applying InputClass "Natural Scrolling"
 (II) Using input driver 'evdev' for 'ckb1: Corsair Gaming Sabre PRO RGB Mouse'
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: always reports core events
 (**) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Device: "/dev/input/event8"
 (--) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Vendor 0x1b1c Product 0x1b2f
 (--) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Found 20 mouse buttons
 (--) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Found scroll wheel(s)
 (--) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Found relative axes
 (--) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Found x and y relative axes
 (--) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Found keys
 (II) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Configuring as mouse
 (II) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Configuring as keyboard
 (II) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: Adding scrollwheel support
 (**) Option "VertScrollDelta" "-77"
 (**) Option "HorizScrollDelta" "-77"
 (**) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: YAxisMapping: buttons 4 and 5
 (**) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
 (**) Option "config_info" "udev:/sys/devices/virtual/input/input16/event8"
 (II) XINPUT: Adding extended input device "ckb1: Corsair Gaming Sabre PRO RGB Mouse" (type: KEYBOARD, id 15)
 (**) Option "xkb_rules" "evdev"
 (**) Option "xkb_model" "pc105"
 (**) Option "xkb_layout" "us"
 (EE) BUG: triggered 'if (axnum >= dev->valuator->numAxes)'
 (EE) BUG: ../../Xi/exevents.c:2103 in InitValuatorAxisStruct()
 (EE) 
 (EE) Backtrace:
 (EE) 0: /usr/lib/xorg/Xorg (xorg_backtrace+0x4e) [0x560d79deaade]
 (EE) 1: /usr/lib/xorg/Xorg (InitValuatorAxisStruct+0x67) [0x560d79d7b677]
 (EE) 2: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f48d221e000+0x4b15) [0x7f48d2222b15]
 (EE) 3: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f48d221e000+0x58de) [0x7f48d22238de]
 (EE) 4: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f48d221e000+0x6d23) [0x7f48d2224d23]
 (EE) 5: /usr/lib/xorg/Xorg (ActivateDevice+0x4a) [0x560d79c80c4a]
 (EE) 6: /usr/lib/xorg/Xorg (0x560d79c38000+0xa2b19) [0x560d79cdab19]
 (EE) 7: /usr/lib/xorg/Xorg (0x560d79c38000+0xb4f0b) [0x560d79cecf0b]
 (EE) 8: /usr/lib/xorg/Xorg (0x560d79c38000+0xb54f3) [0x560d79ced4f3]
 (EE) 9: /usr/lib/xorg/Xorg (config_init+0x9) [0x560d79cebea9]
 (EE) 10: /usr/lib/xorg/Xorg (InitInput+0xbb) [0x560d79ccefdb]
 (EE) 11: /usr/lib/xorg/Xorg (0x560d79c38000+0x57d91) [0x560d79c8fd91]
 (EE) 12: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf0) [0x7f48d8c8d830]
 (EE) 13: /usr/lib/xorg/Xorg (_start+0x29) [0x560d79c7a049]
 (EE) 
 (II) evdev: ckb1: Corsair Gaming Sabre PRO RGB Mouse: initialized for relative axes.
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: (accel) keeping acceleration scheme 1
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: (accel) acceleration profile 0
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: (accel) acceleration factor: 2.000
 (**) ckb1: Corsair Gaming Sabre PRO RGB Mouse: (accel) acceleration threshold: 4
 (II) config/udev: Adding input device ckb1: Corsair Gaming Sabre PRO RGB Mouse (/dev/input/mouse0)
 (II) No input driver specified, ignoring this device.
 (II) This device may have been added with another device file.

The output of xinput --test when I scroll is:

motion a[8]=-1 motion a[8]=-2 motion a[8]=-3 motion a[8]=-2 motion a[8]=-1 motion a[8]=0 motion a[8]=1 motion a[8]=2 motion a[8]=3 motion a[8]=4 motion a[8]=3 motion a[8]=2 motion a[8]=1 motion a[8]=0

  • Please edit question with output of xinput list-props 123, where 123 is the id of your mouse as seen in xinput. Also, run evtest /dev/input/eventX as root on the path that shows up in list-props, and see what happens when you use the scroll wheel. – dirkt Apr 9 '17 at 8:59
  • Ok, evtest results are correct, so the problem is in the evdev driver. There's a lot of axes for the mouse (does it have that many wheels or other gizmos?) Possibly this confuses evdev. Please look into /var/log/Xorg.0.log for lines with evdev referring to that mouse + surrounding lines, and update question with the relevant part. Also, which axis is the scroll wheel on when running xinput --test 123 (again, your id instead of 123). Does maybe one of the other axes map to button 4 and 5? Did you update X or the evdev driver one week ago? – dirkt Apr 9 '17 at 17:49
  • I've updated my post (sorry for the delay). I did not update X or evdev around that time, unless it was through apt. Is there a way to check that? Also, I notice that the output in Xorg.0.log says my mouse has 20 buttons, and as you point out there are a lot of axes. What my mouse physically has: left and right click, mouse wheel which can click, forward and back buttons, and a DPI selector. – thornjad Apr 23 '17 at 16:12
1

Many honest thanks to everyone here and on Reddit, especially @dirkt, for all the help. In the end, I went with the nuclear option: I wiped my root partition and reinstalled Linux. My scrollwheel works flawlessly now, and it fixed a few other problems I was having.

I don't recommend this for most users who run into a problem like this, though it does work. Go through some work trying to fix it before nuking everything (and of course, back up all your data first).

I'm now on Linux Mint 18.2 using the default 4.8 kernel. I can update my question with more information if anyone is curious about what the same command outputs are now.

0

Partial answer:

As you can see, the scroll wheel events show up fine. But the X evdev driver gets confused, because it gets the information that the input device corresponding to it has lots of axis, lots of buttons, and even keys (which is why you see Configuring as keyboard in the logs). This is the reason it doesn't translate the wheel events to button 4 and 5 presses, as it normally would do, and therefore applications don't recognize the wheel events, either.

So the question is why the device claims to have this many inputs. I suspect that when you run evtest, it will list a lot of supported events of type 1 and 2. For comparison, here is what I get for my mouse:

$ sudo evtest
...
Supported events:
  Event type 0 (EV_SYN)
  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)

You'll probably get all axis from 0 to 8, and maybe all keys, as well.

If this is the case, it points to a problem with the kernel drivers. Please update to the newest kernel, and try again.

All your mice are probably HID devices (a standardized USB input protocol). If updating the kernel doesn't work, the next step would be to check the HID descriptor (see comments here for direction how to do it) to see if it is correct, but that starts to get very technical.

  • Thanks for the help. You're right that evtest gives a lot of supported events. However, I had thought that the kernel might be the problem since when this issue popped up, I was using 4.4.0-66. I went up to 4.10.0-14 and nothing changed. Could it be worth it to go to 4.10.14? – thornjad Apr 23 '17 at 18:55
  • I won't hurt trying, because so far we don't know what exactly causes it, and if a kernel update solves it, that's the easy way. Debugging this will be hairy, I've no idea what could cause this behaviour. Upgrading udev, systemd and anything related is also worth trying. – dirkt Apr 24 '17 at 5:42
  • I upgraded to 4.10.14, as well as udev and systemd. It had no effect. I ended up solving it by reinstalling the entire OS :/ – thornjad Jul 25 '17 at 13:59

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.