How to enable natural scrolling in xfce4?

26,491

Solution 1

I searched a lot and also found a bugreport about it, but the solution was easy:

You have to select the Touchpad-device in the selectbox at the top of the mouse-settings.

(It was a bit hard, to find, because I didn't expect that the settings for mouse and touchpad are separately configureable.)


On older xfce versions, where the setting doesn't exist, check the value with

synclient | grep VertScrollDelta

and use the negative value, you find there (for example -58 instead of 58).

The best method that have worked for me to make this reboot-safe is to add your changes into Xsession.d, so it will load automatically for all users when you log into X:

(the file doesn't exists, so you can name it whatever you want. The numbers on the left means the order in which it will be executed in comparison with the other files.)

sudo nano /etc/X11/Xsession.d/80synaptics

Add just the synclient commands in that file:

synclient VertScrollDelta=-58

(should be owned by root, with permissions 644)

chmod 644 /etc/X11/Xsession.d/80synaptics

There is still something odd: the horizontal scrolling is still wrong, This can be fixed with:

echo 'pointer = 1 2 3 4 5 7 6 8 9 10 11 12' >> .Xmodmap
xmodmap .Xmodmap

Solution 2

This is a known bug: LP:1368402

A good and simple solution (workaround) that allows to use natural scrolling in every application (including Chrome and Gnome ones), tested on Xenial 16.04, is the following.

First disable Reverse scroll direction from the XFCE mouse settings: Settings > Mouse and Touchpad > Reverse scroll direction.

Then, run in a terminal:

synclient

It will output a list of key-value pairs like this:

Parameter settings:
    LeftEdge                = 97
    RightEdge               = 2335
    TopEdge                 = 89
    BottomEdge              = 1575
    FingerLow               = 25
    FingerHigh              = 30
    MaxTapTime              = 180
    MaxTapMove              = 129
    MaxDoubleTapTime        = 100
    SingleTapTimeout        = 180
    ClickTime               = 100
    EmulateMidButtonTime    = 0
    EmulateTwoFingerMinZ    = 282
    EmulateTwoFingerMinW    = 7
    VertScrollDelta         = 58
    HorizScrollDelta        = 58
    VertEdgeScroll          = 0
    HorizEdgeScroll         = 0
    CornerCoasting          = 0
    VertTwoFingerScroll     = 1
    HorizTwoFingerScroll    = 1
    MinSpeed                = 1
    MaxSpeed                = 1.75
    AccelFactor             = 0.0678887
    TouchpadOff             = 1
    LockedDrags             = 0
    LockedDragTimeout       = 5000
    RTCornerButton          = 2
    RBCornerButton          = 3
    LTCornerButton          = 0
    LBCornerButton          = 0
    TapButton1              = 1
    TapButton2              = 3
    TapButton3              = 0
    ClickFinger1            = 1
    ClickFinger2            = 3
    ClickFinger3            = 0
    CircularScrolling       = 0
    CircScrollDelta         = 0.1
    CircScrollTrigger       = 0
    CircularPad             = 0
    PalmDetect              = 0
    PalmMinWidth            = 10
    PalmMinZ                = 200
    CoastingSpeed           = 20
    CoastingFriction        = 50
    PressureMotionMinZ      = 30
    PressureMotionMaxZ      = 160
    PressureMotionMinFactor = 1
    PressureMotionMaxFactor = 1
    ResolutionDetect        = 1
    GrabEventDevice         = 0
    TapAndDragGesture       = 1
    AreaLeftEdge            = 0
    AreaRightEdge           = 0
    AreaTopEdge             = 0
    AreaBottomEdge          = 0
    HorizHysteresis         = 14
    VertHysteresis          = 14
    ClickPad                = 1
    RightButtonAreaLeft     = 1216
    RightButtonAreaRight    = 0
    RightButtonAreaTop      = 1364
    RightButtonAreaBottom   = 0
    MiddleButtonAreaLeft    = 0
    MiddleButtonAreaRight   = 0
    MiddleButtonAreaTop     = 0
    MiddleButtonAreaBottom  = 0

Search the key: VertScrollDelta and check its value. If its e.g. 58, set then it to -58 with the following command:

synclient VertScrollDelta=-58

If you want to do the same with the horizontal scroll, search instead for the key: HorizScrollDelta and invert it in the same way:

synclient HorizScrollDelta=-58

[Edit]

As pointed by rubo77, this doesn't last after a reboot. If you want it to become the default, create a script like the following fix_scroll.sh:

#!/usr/bin/bash
synclient VertScrollDelta=-58
synclient HorizScrollDelta=-58

Then add fix_scroll.sh to your startup applications:

Settings > Session and Startup > Application Autostart > Add

Credit goes to: https://forums.linuxmint.com/viewtopic.php?f=90&t=233135&p=1236836&sid=394bf7ad96c3ba102949bac4dd404a1a

Solution 3

With Xfce 4.12 or above, you can go to Mouse settings and select Reverse scroll direction. The setting is under Mouse but it also reverses the scrolling direction for the touchpad.

Share:
26,491

Related videos on Youtube

rubo77
Author by

rubo77

SCHWUPPS-DI-WUPPS

Updated on September 18, 2022

Comments

  • rubo77
    rubo77 almost 2 years

    Is there any setting to enable natural scrolling for my touchpad?

    I can find the setting under XFCE settings for the mouse, but it doesn't work for the touchpad. Is there a way to enable it for the latter?

  • rubo77
    rubo77 over 7 years
    I know, but does it also reverse the horizontal scrolling ?
  • xuhdev
    xuhdev over 7 years
    @rubo77 No, vertical only.
  • fcole90
    fcole90 over 7 years
    Yes, but that doesn't work on every application, especially it doesn't work with Gnome ones
  • Ian D. Rossi
    Ian D. Rossi about 7 years
    Please mark this answer as the proper one, as this is fixing the issue for me.
  • rubo77
    rubo77 over 3 years
    Why don't you just select the Touchpad-device in the selectbox at the top of the mouse-settings?
  • Sreejith K
    Sreejith K over 3 years
    @rubo77 Now its cleared
  • Kulfy
    Kulfy over 3 years
    It seems you're the creator of the mentioned YouTube video. You must disclose that affiliation in the post. If you don't disclose affiliation, it's considered spam. See: What signifies "Good" self promotion?, some tips and advice about self-promotion, and What makes something spam.