GNOME3 == slow desktop performance?

Hi there,

i have been using nixos for two years now on all my desktop computers/laptops.
My favorite desktop environment turned out to be GNOME3 because the presets fit my needs very well.
GNOME3 seems also relatively slow, but i did not wonder much about it because my laptops are all relatively old and that desktop environment being so feature-rich.

Now i have a new laptop and i am really disappointed with the desktop performance using GNOME3. The laptop is a Dell XPS 13 7390 with pure intel CPU/GPU hardware and 16 gigs of RAM.
After double-checking if i have configured all the performance related things:

The general observation is a laggy UX:

  • start apps like firefox, gnome sys settings, terminal, etc. - all takes multiple seconds
  • when running 3-5 apps that all use < 5% cpu time, switching work spaces is really laggy.
    • Even after i disable the work space switch animation in gnome-tweaks, it sometimes takes seconds.
  • clicking into the firefox address bar and entering a URL often hangs for multiple seconds and never looks fluid
  • firefox loads really slowly, but it’s not my wifi connection. (even in safe mode with all extensions turned off)
  • At the same time RAM is never full, overall CPU utilization is seldomly higher than 20%

I have no idea if it’s the NixOS’s gnome3 setup as i did not try legacy linux distros for years.
But i have switched to XFCE today and boom everything works really quickly.

It looks like i am going to stick to XFCE for now, but i am missing GNOME3’s user comfort a bit. Is this a known phenomenon that gnome3 is so much slower, or might it be something that i missed in my config, or is it just NixOS’s default gnome3 module that might simply be slower than on other distros because no one who is interested in optimizing it is actually using it?

1 Like

I have been running and maintaining GNOME Shell on NixOS for a few years now but the situation was never as bad for me. I run the latest kernel but did not set anything special regarding to acceleration.

I can only reproduce this when the system is under severe load.

Not sure about switching workspaces but the Activities screen with all the windows often take a second or more to display. I attributed this to memory pressure, system needing to pick up all the swapped out apps to RAM before rendering their thumbnail.

That was not a problem here either, unless under load.

There has been some reports that firefox-bin has some extra optimizations that make it 40%+ faster than firefox. Maybe that will help.

It is hard to tell what is responsible without profiling. Would you be willing to enable Sysprof service and trying to fiddle with it https://feaneron.com/2019/05/31/profiling-gnome-shell/

Also few more things that can affect performance: Are you using nixos-unstable or 20.03? Do you have any GNOME Shell extensions enabled?

1 Like

Works fine for me on an older laptop, T460 Thinkpad.

You say RAM and CPU aren’t stressed, but loading applications is slow so maybe make sure you get expected performance out of your hard drive. Did you make any config or file system changes switching to XFCE? The only thing I could think that might cause slowdowns like you’re describing between Gnome and XFCE is Gnome’s Tracker service that indexes your files. If you dumped a lot of data onto your new laptop and Tracker was trying to build the initial index maybe that could contribute.

1 Like

That sounds like a severe IO bottleneck. Am personally running GNOME3 on an x230t (so an almost 8 year old machine) and don’t experience notable slowdown even when using 2 monitors.

@tfc could you perhaps give us a video demonstrating how slow is it? I’m just curios.

Hey there, thank you all for your replies.
I have been experimenting further, with different results. It is somehow complicated because to some extent it is hard to isolate things from each other.

I found out the following things:

  • if i do not use an HDMI cable but a DP cable, i can suddenly select 60Hz instead of 30Hz (but 30Hz is selected by default) refresh rate for the screen and it all feels more fluid. Not sure if this is due to a bug somewhere, or it’s the laptop or the usb-c to HDMI/DP adapters (different vendors) or the monitor (internal monitor is OFF in all these scenarios).
  • I see no difference in these performance problems regardless of the resolution on the external monitor. But when i use NO external monitor, it’s all faster.
  • i removed all the optimizations in my configuration.nix file. Now i simply enable GDM and gnome3. It’s no difference or sometimes kind of “faster” but this might be very subjective. i am now going without all the optimizations in my nixos config.
  • with or without wayland: no difference. (i double-checked that wayland is running/is not running)

With the current setup, the system is very slow shortly after booting and then gets usable without problems.
What remains is that firefox and chrome are sometimes fast, sometimes slow. Sometimes i can view HD videos on youtube without problems, sometimes they flicker a lot. Sometimes firefox loads pages extremely slowly, although i have no internet problems. Sometimes i even have input lag in textinputs.
When looking at CPU/GPU/IO/mem usage, i see no specific patterns that correlate with firefox/chrome slowness. Sometimes when i have stuttering youtube videos or other slownesses, i close all the other processes and then still experience that.

so somehow i get the feeling that it’s not really a gnome problem but a problem with firefox that just doesn’t get better in combination with gnome.

jtojnar:
Also few more things that can affect performance: Are you using nixos-unstable or 20.03? Do you have any GNOME Shell extensions enabled?

20.03. the only gnome shell extensions that i added are a system load monitor for the bar at the top of the screen, but removing it doesn’t change anything.

When I open firefox, there is a noticeable lag. I can’t type anything in the address bar for 3-4s.
This doesn’t happen in kde, pantheon, xfce, xmonad.
I’m using NixOS 20.03. I have this problem since i’ve switched to gnome (on NixOS).
The problem persists with firefox-bin

Firefox is also slow when scrolling the preferences, but only on about:preferences on the general view (so about:preferences#general)

Knowing that, I’ve tried changing every option on about:preferences#general.
Nothing worked. Then on that page I saw that firefox shows if it is running as the default browser.

So I tried changing the default browser, by going to
Settings(gnome)>Details>Default applications.

Now scrolling on about:preferences is perfectly smooth and my address bar doesn’t lag anymore.

I don’t know why this solves the problem. Now, even after setting firefox as default again, everything still works fine.