2

In Ubuntu 16.04, this worked fine for evdev config for my 3m Ergo Mouse to emulate scroll wheel by holding down the 'middle' button. It no longer works in Ubuntu 18.04.

At /usr/share/X11/xorg.conf.d/42-middle-mouse-scrolling.conf -rw-r--r-- 1 root root 395 Feb 23 2017 42-middle-mouse-scrolling.conf

Section "InputClass"
    Identifier "Middle Mouse Button Scrolling"
    Driver "evdev"
    MatchProduct "Optical Mouse"
    MatchDevicePath "/dev/input/event*"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "2"
    Option "XAxisMapping" "6 7"
    Option "YAxisMapping" "4 5"
EndSection

After adding that I restarted.

In Ubuntu 18.04 this no longer works. So I tried this to find more information:

xinput --list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Forward USB Optical Mouse                 id=10   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=15   [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)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Chicony USB2.0 Camera: Chicony            id=11   [slave  keyboard (3)]
    ↳ HID 05f3:0007                             id=12   [slave  keyboard (3)]
    ↳ HID 05f3:0007                             id=13   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]

And the name of the input is still the same. I tried the above config MatchProduct with the full name 'Forward USB Optical Mouse' as well.

I then tried sudo evtest to see the event:

Event: time 1533888912.632951, -------------- SYN_REPORT ------------
(3)]
    ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
    ⎜   ↳ Forward USB Optical Mouse                 id=10   [slave  pointer  (2)]
    ⎜   ↳ SynPS/2 Synaptics TouchPad                id=15   [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)]
        ↳ Power Button                              id=8    [slave  Event: time 1533888912.729025, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003

And from that also tried changing to Option "EmulateWheelButton" "4".

I'm hoping someone knows the difference between how Ubuntu 16 and Ubuntu 18 work for xorg or can spot something I have done wrong.

1 Answer 1

2

Okay I have managed to sort this now, so for anyone else who comes across this issue.

xinput listed my devices:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ PixArt USB Optical Mouse                  id=13   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=15   [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)]
...

Then from there I could see the props for the input:

Device 'PixArt USB Optical Mouse':
    Device Enabled (142):   1
    Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (279):   0
    libinput Natural Scrolling Enabled Default (280):   0
    libinput Scroll Methods Available (281):    0, 0, 1
    libinput Scroll Method Enabled (282):   0, 0, 1
...

Which revealed that evdev was no longer the driver and now libinput was the driver. At that point I went to https://www.systutorials.com/docs/linux/man/4-libinput/ and set my options at /usr/share/X11/xorg.conf.d/42-middle-mouse-scrolling.conf to the following:

Section "InputClass"
    Identifier "Middle Mouse Button Scrolling"
    MatchProduct "PixArt USB Optical Mouse"
    Option "MiddleEmulation" "on"
    Option "ScrollMethod" "button"
    Option "ScrollButton" "2"
EndSection

After rebooting my 3m ergo mouse scrolling works again.

5
  • 1
    Thanks for this! I had an issue with the solution mentioned elsewhere on stack exchange after some updates. However, your suggestion works. I want to expand on this for anyone else that comes across it. 1. List input devices with xinput 2. Find your 3M mouse id (id=XX) 3. Run xinput list-props ID. Excluding the first digit (1), copy the number listed after Device Enabled. Ex. Device Enabled (155)... you'd copy 55 4. Paste the settings you listed above w/name COPIED_NUM-middle-mouse-scrolling.conf Not sure if it has to be this specific, but I did this and it works! May 18, 2021 at 5:33
  • 1
    The other solution I mentioned that stopped working for me after some updates is this, unix.stackexchange.com/questions/87175/… May 18, 2021 at 5:38
  • Glad it was useful! I've revisited my own post a few times over the years as well :) May 19, 2021 at 7:44
  • In case its helpful for anyone - some models of the 3m ergo mouse are instead "Forward USB Optical Mouse". You can add multiple by putting a | character. Sep 20, 2021 at 7:33
  • Update: for Ubuntu 22 I had to disable Wayland for the above to still work linuxconfig.org/… Mar 6, 2023 at 11:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .