1

xinput says my mouse is id 11:

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ VirtualBox mouse integration              id=9    [slave  pointer  (2)]
⎜   ↳ ImExPS/2 Generic Explorer Mouse           id=11   [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)]
    ↳ Sleep Button                              id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]

Setting buttons 4 and 5 to 0 works:

$ xinput --set-button-map 11 1 2 3 0 0 6 7 8 9
$ xinput --get-button-map 11
1 2 3 0 0 6 7 8 9 

However, mouse wheel scrolling is not disabled. Any ideas what to do about it? Ubuntu 18.04.3.

ETA: Please note that the answer accepted in How to disable mouse wheel scroll in ubuntu 11.04 or 10.10? does not work, at least in my case.

ETA2: Added as per request:

$ xinput list-props 11
Device 'ImExPS/2 Generic Explorer Mouse':
    Device Enabled (127):   1
    Coordinate Transformation Matrix (129): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (266):   0
    libinput Natural Scrolling Enabled Default (267):   0
    libinput Scroll Methods Available (274):    0, 0, 1
    libinput Scroll Method Enabled (275):   0, 0, 0
    libinput Scroll Method Enabled Default (276):   0, 0, 0
    libinput Button Scrolling Button (277): 2
    libinput Button Scrolling Button Default (278): 2
    libinput Middle Emulation Enabled (279):    0
    libinput Middle Emulation Enabled Default (280):    0
    libinput Accel Speed (281): 0.000000
    libinput Accel Speed Default (282): 0.000000
    libinput Accel Profiles Available (283):    1, 1
    libinput Accel Profile Enabled (284):   1, 0
    libinput Accel Profile Enabled Default (285):   1, 0
    libinput Left Handed Enabled (270): 0
    libinput Left Handed Enabled Default (271): 0
    libinput Send Events Modes Available (249): 1, 0
    libinput Send Events Mode Enabled (250):    0, 0
    libinput Send Events Mode Enabled Default (251):    0, 0
    Device Node (252):  "/dev/input/event4"
    Device Product ID (253):    2, 6
    libinput Drag Lock Buttons (272):   <no items>
    libinput Horizontal Scroll Enabled (273):   1
  • similar question ? askubuntu.com/questions/59128/… – Saxtheowl Oct 3 '19 at 14:20
  • Except that the answer in it does not work. – sigil Oct 3 '19 at 14:21
  • Post output of xinput list-props 11 – Pilot6 Oct 3 '19 at 14:25
  • @Pilot6 Here you are. – sigil Oct 3 '19 at 14:34
  • So libinput is used. It doesn't have those options. Need to switch pack to evdev. – Pilot6 Oct 3 '19 at 14:36
0

Remove libinput by

sudo apt remove 'xserver-xorg-input-libinput.*'

The mouse will be handled by evdev and all former solutions will work.

| improve this answer | |
  • Admittedly, I'm somewhat wary of the possibility to break some other part of the system with it. – sigil Oct 3 '19 at 14:45
  • You won't break anything by this and you can always install it back. – Pilot6 Oct 3 '19 at 14:52
  • Okay, I'll try it tomorrow unless someone suggests a less intrusive solution. Thank you very much for your help. – sigil Oct 3 '19 at 15:02
  • Tried it. Breaks the system completely as expected: mouse cursor stuck, keyboard dead. Of course, I had a VirtualBox snapshot at ready. – sigil Oct 5 '19 at 13:55

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.