13

As you can maybe see, this is my first post. So, I have already been trying and researching a lot, but I still can't solve this problem.


I really enjoy natural scrolling, but not only on my touchpad, but also on my mouse - but this did not work so far. My current setup is Ubuntu 18.04.2 on a late 2012 (first hidpi) MacBook with i3 wm and I use a performance MX logitech mouse. This is a pretty new setup I installed yesterday.

I did invert my touchpad scrolling with synaptics and tried to modify my mouse keys with xmodkeys, but it did not work.

xmodmap -e 'pointer = 1 2 3 5 4 6 7 8 9 10 11 12'

The strange this is, that my mouse buttons are actually inverted (4 and 5) when I test it with xev, but this does not affect the scrolling behaviour. I could also remap other mouse keys, but the scrolling seems not changeable.

xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Performance MX                   id=10   [slave  pointer  (2)]
⎜   ↳ bcm5974                                   id=13   [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)]
    ↳ FaceTime HD Camera (Built-in):            id=11   [slave  keyboard (3)]
    ↳ Apple Inc. Apple Internal Keyboard / Trackpad id=12   [slave  keyboard (3)]

xinput list-props 10
Device 'Logitech Performance MX':
    Device Enabled (143):   1
    Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (278):   0
    libinput Natural Scrolling Enabled Default (279):   0
    libinput Scroll Methods Available (280):    0, 0, 1
    libinput Scroll Method Enabled (281):   0, 0, 0
    libinput Scroll Method Enabled Default (282):   0, 0, 0
    libinput Button Scrolling Button (283): 2
    libinput Button Scrolling Button Default (284): 2
    libinput Middle Emulation Enabled (285):    0
    libinput Middle Emulation Enabled Default (286):    0
    libinput Accel Speed (287): 0.000000
    libinput Accel Speed Default (288): 0.000000
    libinput Accel Profiles Available (289):    1, 1
    libinput Accel Profile Enabled (290):   1, 0
    libinput Accel Profile Enabled Default (291):   1, 0
    libinput Left Handed Enabled (292): 0
    libinput Left Handed Enabled Default (293): 0
    libinput Send Events Modes Available (263): 1, 0
    libinput Send Events Mode Enabled (264):    0, 0
    libinput Send Events Mode Enabled Default (265):    0, 0
    Device Node (266):  "/dev/input/event5"
    Device Product ID (267):    1133, 4122
    libinput Drag Lock Buttons (294):   <no items>
    libinput Horizontal Scroll Enabled (295):   1

I hope for any support, since I really want to have my natural scrolling back :> Peace!

7
  • What is the Ubuntu version?
    – Pilot6
    Mar 2, 2019 at 15:09
  • Ubuntu 18.04.2 LTS amd64
    – tbrodbeck
    Mar 2, 2019 at 15:10
  • Please edit your question and post output of xinput command.
    – Pilot6
    Mar 2, 2019 at 15:12
  • It is weird that synaptics is used for the touchpad. libinput is default. Probably you switched to synaptics and broke it.
    – Pilot6
    Mar 2, 2019 at 15:13
  • Now please add output of xinput list-props 10. You can format text by selecting it and pressing {} button on top.
    – Pilot6
    Mar 2, 2019 at 15:14

2 Answers 2

26

Edit /usr/share/X11/xorg.conf.d/40-libinput.conf

Add there Option "NaturalScrolling" "True" like this:

For your mouse:

# Match on all types of devices but joysticks
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "NaturalScrolling" "True"
EndSection

For your touchpad:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "NaturalScrolling" "True"
EndSection

Then log off and on to apply.

6
  • I did add that to /usr/share/X11/xorg.conf.d/40-libinput.conf and I did sudo apt remove xserver-xorg-input-synaptics. And I did log off. So far it is still exactly the same as befor (touchpad inverted but not mouse)
    – tbrodbeck
    Mar 2, 2019 at 15:33
  • Did you add to both sections? I've edited my post.
    – Pilot6
    Mar 2, 2019 at 15:35
  • Does xinput set-prop 13 278 1 fix it immediately?
    – Pilot6
    Mar 2, 2019 at 15:36
  • 1
    AHHH :) Feels like I am back home. Thanks a lot! (now I included both sections)
    – tbrodbeck
    Mar 2, 2019 at 15:39
  • 1
    Btw: I switched back to synaptic because I like the feel of the scrolling better, but the section for the mouse is still working
    – tbrodbeck
    Mar 2, 2019 at 15:49
6

Run xinput:

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ DELL0945:00 27C6:01F0 Mouse               id=11   [slave  pointer  (2)]
⎜   ↳ DELL0945:00 27C6:01F0 Touchpad            id=12   [slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                        id=17   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Video Bus                                 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)]
    ↳ Integrated_Webcam_HD: Integrate           id=10   [slave  keyboard (3)]
    ↳ Intel HID events                          id=13   [slave  keyboard (3)]
    ↳ Intel HID 5 button array                  id=14   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=15   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=16   [slave  keyboard (3)]

Find your touchpad device and list its properties:

$ xinput list-props "DELL0945:00 27C6:01F0 Touchpad"
Device 'DELL0945:00 27C6:01F0 Touchpad':
    Device Enabled (214):   1
    Coordinate Transformation Matrix (216): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Tapping Enabled (372): 1
    libinput Tapping Enabled Default (373): 0
    libinput Tapping Drag Enabled (374):    1
    libinput Tapping Drag Enabled Default (375):    1
    libinput Tapping Drag Lock Enabled (376):   0
    libinput Tapping Drag Lock Enabled Default (377):   0
    libinput Tapping Button Mapping Enabled (378):  1, 0
    libinput Tapping Button Mapping Default (379):  1, 0
    libinput Natural Scrolling Enabled (351):   0
    libinput Natural Scrolling Enabled Default (352):   0
    libinput Disable While Typing Enabled (380):    1
    libinput Disable While Typing Enabled Default (381):    1
    libinput Scroll Methods Available (353):    1, 1, 0
    libinput Scroll Method Enabled (354):   1, 0, 0
    libinput Scroll Method Enabled Default (355):   1, 0, 0
    libinput Click Methods Available (382): 1, 1
    libinput Click Method Enabled (383):    1, 0
    libinput Click Method Enabled Default (384):    1, 0
    libinput Middle Emulation Enabled (385):    0
    libinput Middle Emulation Enabled Default (386):    0
    libinput Accel Speed (360): 0.000000
    libinput Accel Speed Default (361): 0.000000
    libinput Accel Profiles Available (362):    1, 1
    libinput Accel Profile Enabled (363):   1, 0
    libinput Accel Profile Enabled Default (364):   1, 0
    libinput Left Handed Enabled (365): 0
    libinput Left Handed Enabled Default (366): 0
    libinput Send Events Modes Available (336): 1, 1
    libinput Send Events Mode Enabled (337):    0, 0
    libinput Send Events Mode Enabled Default (338):    0, 0
    Device Node (339):  "/dev/input/event5"
    Device Product ID (340):    10182, 496
    libinput Drag Lock Buttons (367):   <no items>
    libinput Horizontal Scroll Enabled (368):   1
    libinput Scrolling Pixel Distance (369):    15
    libinput Scrolling Pixel Distance Default (370):    15
    libinput High Resolution Wheel Scroll Enabled (371):    1

Set the natural scrolling enabled property to 1:

$ xinput set-prop "DELL0945:00 27C6:01F0 Touchpad" "libinput Natural Scrolling Enabled" 1
0

You must log in to answer this question.

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