Ubuntu – How to enable natural scrolling in xfce4

scrollingtouchpadxfcexubuntu

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?

Best Answer

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