GTK3 apps don't understand natural scrolling in Xubuntu

Bug #1368402 reported by Yanpas on 2014-09-11
124
This bug affects 27 people
Affects Status Importance Assigned to Milestone
xfce4-settings
Confirmed
Medium
xfce4-settings (Ubuntu)
Undecided
Unassigned

Bug Description

If I choose in options natural scrolling - all gtk3 apps (evince, nautilus, ubuntu-software-center etc.) won't understand natural scrolling. There is the bad workaround - to setup gnome-settings-daemon and run it. After it natural scrolling works in gkt3 apps, but stops working in all other apps!

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ibus (not installed)
ProcVersionSignature: Ubuntu 3.13.0-36.63-generic 3.13.11.6
Uname: Linux 3.13.0-36-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.14.1-0ubuntu3.4
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Sep 12 00:15:27 2014
InstallationDate: Installed on 2014-08-14 (27 days ago)
InstallationMedia: Xubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140723)
SourcePackage: ibus
UpgradeStatus: No upgrade log present (probably fresh install)

Yanpas (yanpaso) wrote :
Yanpas (yanpaso) wrote :

I don't know which package is guilty

affects: ibus (Ubuntu) → xfce4-settings (Ubuntu)

I suggest that you forward this issue upstream by filing a bug report on the Xfce bug tracker. Thanks in advance.

https://bugzilla.xfce.org/

In , Yanpas (yanpaso) wrote :

If I choose in options natural scrolling - all gtk3 apps (evince, nautilus, ubuntu-software-center etc.) won't understand natural scrolling. There is the bad workaround - to setup gnome-settings-daemon and run it. After it natural scrolling works in gkt3 apps, but stops working in all other apps!

ProblemType: Bug
DistroRelease: Xubuntu 14.04
Package: ibus (not installed)
ProcVersionSignature: Ubuntu 3.13.0-36.63-generic 3.13.11.6
Uname: Linux 3.13.0-36-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.14.1-0ubuntu3.4
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Sep 12 00:15:27 2014
InstallationDate: Installed on 2014-08-14 (27 days ago)
InstallationMedia: Xubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140723)
SourcePackage: ibus
UpgradeStatus: No upgrade log present (probably fresh install)

link to LP: https://bugs.launchpad.net/ubuntu/+source/xfce4-settings/+bug/1368402

Changed in xfce4-settings:
importance: Unknown → Medium
status: Unknown → Confirmed

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4-settings (Ubuntu):
status: New → Confirmed
aaron-bru (aaron-bru) wrote :

Does anyone have a workaround for this?
The archlinux thread seems to conclude that you have to set the scrolling distance to negative. My 'Kensington Kensington USB Mouse' does not have any scrolling distance listed in 'xinput list-props'

I was kind of able to get it working using xorg.conf Option "ZAxisMapping" "5 4" but it messed other stuff up, didn't work well.

Mikkel Juul Erup (mijuer) wrote :

I patched gtk3 to inverse scrolling and created a package. This works in all gtk3 apps, so now I have got natural scrolling everywhere. But the downside is that it's not possible to toggle natural scrolling. It's only possible to get back the default scrolling by reinstalling the official libgtk-3-0.

It would be fairly easy to implement a check for a gsettings flag that could toggle natural scrolling.

Yanpas (yanpaso) wrote :

Could you please upload this package?

Mikkel Juul Erup (mijuer) wrote :

@Yanpas, sure, but use at your own risk :-)

dpkg -i the .deb. Then hold it if you want to prevent apt from overwriting with at new version if it becomes available. I use aptitude.

sudo aptitude hold libgtk-3-0.

amd64 .deb attached as well as my patch.

The patch in the current form is only a workaround, not a suggested official fix, because it doesn't allow for toggling natural scrolling. It just patches gtk to ALWAYS use natural scrolling

Mikkel Juul Erup (mijuer) wrote :

Here is the patch.

Yanpas (yanpaso) wrote :

@mikkel-erup-8 Thank you very much! :)

The attachment "natural_scrolling.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
aaron-bru (aaron-bru) wrote :

Tested and using the patch on 14.04 x64, working great, thank you.
Is a proper fix for this going to need to be in libgtk3? If so, should the package assignment be changed?

Yanpas (yanpaso) wrote :

As author of fix said earlier it's not a fix but worwaround. It doesn't leave any option for user to switch back to unnatural scroillng.

Yanpas (yanpaso) wrote :

In addition after installing these package there some troubles with dependencies. But that's because it is not proposed to repos

Mikkel Juul Erup (mijuer) wrote :

@Yanpas, are you on 14.04 and did you install as suggested? I didn't encounter dependency problems myself so far.
I'll work on a patch that'll use gsettings if enough people want it.

Yanpas (yanpaso) wrote :

@mijuer I'm on trusty-proposed, not trusty and not trusty-updates. So there is newer version in my repos. Even if I install it I get dependencies errors in synaptics and other stuff

*** Bug 11702 has been marked as a duplicate of this bug. ***

Thanks Thaddaeus for pointing me to this bug, i should have put more energy in searching for bugs in here - sorry.

By studying the provided information in this bug report and the referenced links and sublinks, i found a "simple" workaround that works for me (for now):

1. Get sure natural scrolling is setup in Gnome (was already the case here).
2. Setup normal (non-natural) scrolling in XFCE
3. Run '/usr/lib/gnome-settings-daemon/gnome-settings-daemon' after each XFCE session start. It just needs to start up and can be killed right afterwards, either way it complains about another settings daemon running!

Another way could be fiddling around with xinput (i assume gnome-settings-daemon is doing exactly that in the background), but i was too lazy to adapt that to my case...

(In reply to boennhoff from comment #2)
> Another way could be fiddling around with xinput (i assume
> gnome-settings-daemon is doing exactly that in the background), but i was
> too lazy to adapt that to my case...

I would not assume that, reverse scrolling is done at the device level, it makes no sense to me that gtk3 apps behave any differently than the others (and actually, xfce4-settings does the same as xinput).

So it needs a bit more investigation.

It works fine with libinput/xf86-input-libinput

My bet is that since GTK3 applications use smooth scrolling (http://who-t.blogspot.de/2011/09/whats-new-in-xi-21-smooth-scrolling.html), they listen to different scroll events than the (correctly-inverted) GTK2-based ones.

Like Olivier Fourdan said, libinput/xf86-input-libinput corrects the scrolling BUT left and right clicks are now and then reversed.

*** Bug 11941 has been marked as a duplicate of this bug. ***

Any updates on a simple workaround for this bug? because it's very frustrating.

ronso0 (ronso0) wrote :

@Mikkel Juul Erup: I use libgtk-3-0_3.10.8-0ubuntu1.6_amd64.deb instead of ...0ubuntu1.2 and would like to compile it correctly.
My resulting .deb is huuuge compared to official libgtk-3-0. Would you mind sharing your configure arguments?

Yanpas (yanpaso) wrote :

I haven't built this package, but there is build log on launchpad on the page of every package, somewhere in this log you may find build keys

fcole90 (fcole90) wrote :

I have found a workaround that seems to solve the issue in Xenial 16.04.
Credit goes to: https://forums.linuxmint.com/viewtopic.php?f=90&t=233135&p=1236836&sid=394bf7ad96c3ba102949bac4dd404a1a

In short, run in a terminal:
$ synclient

It will output a list of key-value pairs, search the key: 'VertScrollDelta' and check its value.
If its e.g. 56, set then it to -56 with the following command:

$ synclient VertScrollDelta=-56

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

ianp5a (ianp) wrote :

I have a new Xubuntu 17.04 install on a new 64bit NUC PC and the problem of different scroll direction in different apps still persists.

synclient only works if you have synaptics installed apparently.

I have searched and tried other workarounds too without success. The mixed scrolling directions are a really bad experience. Kubuntu does not have this problem.

Eric Polin (eric-polin) wrote :

Just in case, I personally address the issue by reversing the direction at the low level:

synclient | grep ScrollDelta
Session and Startup > Application Autostart > Add
 synclient VertScrollDelta=-<formerValue> HorizScrollDelta=-<formerValue>

May cause other problems if you have advanced needs, e.g. w/ a graphics tablet, but it is a perfect solution for me.

J.Ar (j.ar) wrote :

My personal solution in 'Xubuntu 17.10' (works fine in all GTK2/3 software)

>> 1 >> Looking for the Device-ID with...

:~$ xinput list

 ⎡ Virtual core pointer id=2 [master pointer (3)]
 ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
 ⎜ ↳ Logitech MX Anywhere 2 id=8 [slave pointer (2)]
 ⎜ ↳ Logitech Unifying Device. Wireless PID:404d id=9 [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)]
     ↳ Power Button id=7 [slave keyboard (3)]
     ↳ Logitech MX Anywhere 2 id=10 [slave keyboard (3)]
     ↳ Logitech Unifying Device. Wireless PID:404d id=11 [slave keyboard (3)]

>> 2 >> enable natural scrolling with...(change the ## to your Device-ID)

:~$ xinput --set-int-prop ## "libinput Natural Scrolling Enabled" 8 1

So in my case: xinput --set-int-prop 8 "libinput Natural Scrolling Enabled" 8 1

summary: - GTK3 apps doesn't understand natural scrolling in Xubuntu
+ GTK3 apps don't understand natural scrolling in Xubuntu
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.