You are not logged in.

#1 2021-07-24 15:19:00

lostinasia
Member
Registered: 2021-07-24
Posts: 8

Can't get side buttons of Mi Silent Mouse to work

I tried changing from libinput to evdev and actually installed Arch over Manjaro so I could get off Wayland.  Xev doesn't register the buttons, xinput sees them has the wheel tilt buttons I think.  I don't need it to do anything special, just go forward and back like it's supposed to.  It works great on windoze obviously.  Any help would be greatly appreciated.

/etc/X11/xorg.conf.d $ xinput --list-props 15
Device 'Mi Silent Mouse':
        Device Enabled (207):   1
        Coordinate Transformation Matrix (209): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (332):     0
        Device Accel Constant Deceleration (333):       1.000000
        Device Accel Adaptive Deceleration (334):       1.000000
        Device Accel Velocity Scaling (335):    10.000000
        Device Product ID (330):        10007, 20500
        Device Node (329):      "/dev/input/event18"
        Evdev Axis Inversion (336):     0, 0
        Evdev Axes Swap (338):  0
        Axis Labels (339):      "Rel X" (217), "Rel Y" (218), "Rel Vert Wheel" (392), "None" (0)
        Button Labels (340):    "Button Left" (210), "Button Middle" (211), "Button Right" (212), "Button Wheel Up" (213), "Button Wheel Down" (214), "Button Horiz Wheel Left" (215), "Button Horiz Wheel Right" (216)
        Evdev Scrolling Distance (341): 1, 1, 1
        Evdev Middle Button Emulation (342):    0
        Evdev Middle Button Timeout (343):      50
        Evdev Middle Button Button (344):       2
        Evdev Third Button Emulation (345):     0
        Evdev Third Button Emulation Timeout (346):     1000
        Evdev Third Button Emulation Button (347):      3
        Evdev Third Button Emulation Threshold (348):   20
        Evdev Wheel Emulation (349):    0
        Evdev Wheel Emulation Axes (350):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (351):    10
        Evdev Wheel Emulation Timeout (352):    200
        Evdev Wheel Emulation Button (353):     4
        Evdev Drag Lock Buttons (354):  0

Offline

#2 2021-07-24 15:49:07

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: Can't get side buttons of Mi Silent Mouse to work

Do they show up in "evtest" or "libinput debug-events"
Did you filter events in xev? (They might show up as keyboard events)

Offline

#3 2021-07-25 05:52:29

lostinasia
Member
Registered: 2021-07-24
Posts: 8

Re: Can't get side buttons of Mi Silent Mouse to work

I did not run libinput debug-events as I read somewhere evdev is at kernel level and libinput just references it anyway or something like that.  I ran xev without filters and observed the stream of responses as I moved and clicked the mouse.  I ran evtest and the results were the same as xev- everything produces a response except the two side buttons.  I suspect it's because they're being recognized/labeled as horiz wheel left and right(215/216), which I believe is the mouse wheel tilt clicks, which this mouse definitely can't do.  Funny story, I actually tried to tilt click the wheel and got a response for horiz wheel left the first time and I thought holy crap, free feature!  But alas, it never clicked right and I could never get it to repeat the horiz wheel left response I got the first time.  I scrolled back on my terminal to make sure I wasn't tripping and sure enough there was one horiz wheel left response and tons of button 2 clicks which is the wheel middle click.

Last edited by lostinasia (2021-07-25 05:55:10)

Offline

#4 2021-07-25 06:09:40

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: Can't get side buttons of Mi Silent Mouse to work

evdev is at kernel level and libinput just references it anyway

True. If evtest is negative, there no point in testing anything above.

I ran evtest and the results were the same as xev- everything produces a response except the two side buttons.

Thatsbad©

https://askubuntu.com/questions/1302323 … -in-evtest
https://github.com/matega/hid_mimouse - code doesn't look malicioius.

Offline

#5 2021-07-28 14:33:27

lostinasia
Member
Registered: 2021-07-24
Posts: 8

Re: Can't get side buttons of Mi Silent Mouse to work

The thing is xinput sees the side buttons.  It's showing 7 which is left, middle, right, wheel up, wheel down, and the remaining 6 and 7 has to be the sides.  Where can I change how they're assigned?

Offline

#6 2021-07-28 14:37:51

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: Can't get side buttons of Mi Silent Mouse to work

xinput is posting data that is advertised or augmented from a database.
If you don't get input events from those buttons, you can't use them. No matter what you do w/ xinput.

The linked thread and driver explain that the device sends a bogus HID descriptor and claim to mitigate exactly the outcome you perceive.
Can you use the mouse via usb and does that activate the sede-buttons?

Offline

#7 2021-07-30 13:30:43

lostinasia
Member
Registered: 2021-07-24
Posts: 8

Re: Can't get side buttons of Mi Silent Mouse to work

It's a dual mode wireless/bluetooth mouse.  I'm using it with bluetooth.  I suppose I can try the wireless usb dongle for chits and giggles.

Offline

#8 2021-07-30 13:32:30

lostinasia
Member
Registered: 2021-07-24
Posts: 8

Re: Can't get side buttons of Mi Silent Mouse to work

It's a dual mode wireless/bluetooth mouse.  I'm using it with bluetooth.  I just tried the wireless usb dongle and guess what?  It works.  WTF?  I'd rather use it with Bluetooth and not have to waste a USB slot and have a dongle sticking out all the time.

Offline

#9 2021-07-30 13:36:23

lostinasia
Member
Registered: 2021-07-24
Posts: 8

Re: Can't get side buttons of Mi Silent Mouse to work

Strange... xinput --list has additional items popping up for dongle mode:

/dev/input $ xinput --list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ MSFT0001:01 06CB:7F27 Mouse               id=11   [slave  pointer  (2)]
⎜   ↳ MSFT0001:01 06CB:7F27 Touchpad            id=12   [slave  pointer  (2)]
⎜   ↳ XiaoMi Mi Wireless Mouse Consumer Control id=16   [slave  pointer  (2)]
⎜   ↳ XiaoMi Mi Wireless Mouse                  id=18   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=10   [slave  keyboard (3)]
    ↳ Ideapad extra buttons                     id=13   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]
    ↳ XiaoMi Mi Wireless Mouse Consumer Control id=17   [slave  keyboard (3)]
    ↳ XiaoMi Mi Wireless Mouse System Control   id=19   [slave  keyboard (3)]

Offline

#10 2021-07-30 13:37:43

lostinasia
Member
Registered: 2021-07-24
Posts: 8

Re: Can't get side buttons of Mi Silent Mouse to work

It works with the usb dongle.  Why can't I get it to work with Bluetooth?  Why does id19 show 13 buttons?

Bluetooth:

/dev/input $ xinput --list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ MSFT0001:01 06CB:7F27 Mouse               id=11   [slave  pointer  (2)]
⎜   ↳ MSFT0001:01 06CB:7F27 Touchpad            id=12   [slave  pointer  (2)]
⎜   ↳ XiaoMi Mi Wireless Mouse Consumer Control id=16   [slave  pointer  (2)]
⎜   ↳ XiaoMi Mi Wireless Mouse                  id=19   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=10   [slave  keyboard (3)]
    ↳ Ideapad extra buttons                     id=13   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]
    ↳ XiaoMi Mi Wireless Mouse Consumer Control id=17   [slave  keyboard (3)]
    ↳ XiaoMi Mi Wireless Mouse System Control   id=18   [slave  keyboard (3)]
/dev/input $ xinput get-button-map 16
1 2 3 4 5 6 7
/dev/input $ xinput get-button-map 17
device has no buttons
/dev/input $ xinput get-button-map 19
1 2 3 4 5 6 7 8 9 10 11 12 13
/dev/input $

Last edited by lostinasia (2021-07-30 13:54:18)

Offline

#11 2021-07-30 13:43:47

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: Can't get side buttons of Mi Silent Mouse to work

Please don't bump, edit your post if nobody has replied inbetween.
The stuff I linked earlier explains why that happens and preovides a kernel module to fix the HID descriptor.

Offline

#12 2021-07-30 14:05:24

lostinasia
Member
Registered: 2021-07-24
Posts: 8

Re: Can't get side buttons of Mi Silent Mouse to work

I didn't even notice your links.  I'm an idiot.  I injected the fix to the kernel and it works great now.  Cheers.

Offline

#13 2021-07-30 14:29:03

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: Can't get side buttons of Mi Silent Mouse to work

Great.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB