12

On a default Ubuntu 16.04 (xenial) installation, GTK3 applications (which include most of the default GUI applications) have smooth scrolling activated. How do I disable it?

For example, in Gedit, pressing PageUp/PageDown causes the text to scroll one pixel line at a time until it settles to its final position one page further up/down. The same behavior occurs in the file selection dialog box, in Nautilus, etc. How do I turn off smooth scrolling, i.e. how do I make the PageUp/PageDown keys show the previous/next page immediately?

6
  • I haven't seen the behaviour you're describing with gedit. Could you please try adding gtk-primary-button-warps-slider=false to ~/.config/gtk-3.0/settings.ini and see if the problem goes away? If you don't have such a file, the first line should be [Settings].
    – DK Bose
    Apr 10, 2017 at 13:08
  • @DKBose Makes no difference. Apr 10, 2017 at 13:24
  • Of course it makes no difference. gtk-primary-button-warps-slider isn't directly related to scrolling. It is related to the behavior of scrollbars, which is unrelated to this question.
    – Danijel
    May 17, 2017 at 13:55
  • Also, do you log out and back in for setting to get reread ? Aug 2, 2018 at 14:14
  • @SergiyKolodyazhnyy superuser.com/questions/927160/… is about the scroll bar behavior, what does this have to do with my question? Besides it's for a different version: on Ubuntu 16.04, Gedit uses gtk2, not gtk3. Aug 2, 2018 at 15:07

3 Answers 3

7

Edit the file ~/.config/gtk-3.0/settings.ini to contain the following lines:

[Settings]
gtk-enable-animations=0

If the file doesn't exist, create it. If the file already exists and already has a [Settings] section, add gtk-enable-animations=0 in this section.

Thanks to DK Bose for suggesting .config/gtk-3.0/settings.ini and to pm-b for suggesting the option name enable-animations (I was looking for “scroll”).

You don't need to reboot or to log out, but you do need to restart the application.

7
  • I believe this setting can be queried by running gtk-query-settings gtk-enable-animations. On my system, regardless of what I do or do not put in .config/gtk3.0/settings.ini (tried al the combinations), the gtk-enable-animations setting changes along whenever I change enable-animations using gsettings. Any clue on what could be the cause?
    – pm-b
    Aug 9, 2018 at 9:02
  • @pm-b apt-cache search gtk-query-settings → no results. You are using Ubuntu 16.04, right? Gnome has a tendency to change configuration methods all the time, so what works one version of Ubuntu might not work in another version. Aug 9, 2018 at 9:07
  • Oh wait you're right. I'm on my other computer.
    – pm-b
    Aug 9, 2018 at 10:33
  • 1
    This does not disable smooth scrolling on Ubuntu 18.04.
    – clemisch
    Feb 12, 2020 at 18:31
  • @clemisch Indeed :( Unfortunately this seems to change with every version of Gnome, and to get harder and harder each time. It makes me avoid most Gnome applications. Feb 12, 2020 at 19:04
6
+50

I solved this by disabling animations in the gnome shell. Disabling animations will disable all animations. This setting can be changed in many different ways. For the change to take effect in gedit, don't forget to restart gedit.

Using gsettings (command line)

Open a terminal and run this command:

gsettings set org.gnome.desktop.interface enable-animations false

Using dconf-editor (GUI)

From the start screen, navigate to /org/gnome/desktop/interface/enable-animations

and set it to false.


Using gnome-tweak-tool (GUI)

Open gnome-tweaks. In the appearance tab, set the following option to false: animations

4
  • Unfortunately this doesn't work for me. I'm still getting smooth scrolling in the gnome file opening dialog and in gedit. Aug 6, 2018 at 8:41
  • Just to be sure... I assume you restarted the shell / did a logout-login after the change?
    – pm-b
    Aug 6, 2018 at 11:31
  • No, I didn't log out. I did make sure that there was no running gedit process, then ran gedit. gsettings get org.gnome.desktop.interface enable-animations reports false but this doesn't seem to have any effect on gedit. Aug 6, 2018 at 11:56
  • Thank you thank you thank you
    – hdante
    Dec 30, 2019 at 19:14
4

Unfortunately, Gnome apps have made this MAJOR mess on Ubuntu 18.04. The correct setting depends on the Desktop environment you use. For Gnome 3.x it seems that the way to disable smooth scroll is to run

gsettings set org.gnome.desktop.interface enable-animations false

which disables other animations as well.

If you're running MATE you have to use different key

gsettings set org.mate.interface gtk-enable-animations false
1

You must log in to answer this question.

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