CPU Spike / UI Pauses on Mouse Input in Gnome Desktop

Unfortunately I am not aware of a fix for this – but I do have a super easy workaround that should help 99.9% of you out there that have landed on this page.

You may have tried to troubleshoot this (like me) by watching top and seeing what is going on, only to notice right after every UI freeze, the gnome-shell process would shoot to 100% and then immediately drop back down.

gnome-shell, very sus…

Simple Workaround

If you are using the Gnome Desktop – regardless of distribution and regardless of version – and are experiencing the UI briefly locking up for 100-200ms EVERY TIME you interact with it via the mouse (CLICK, MOVE, DRAG, etc.) and you don’t want to restart – here’s the workaround:

Alt+F2, type ‘r’, hit Enter
  1. Press ALT+F2 (to bring up the Run dialog)
  2. Type “r” (shortcut for ‘restart ‘)
  3. Hit Enter

What’s great about this workaround is that it doesn’t close or interrupt any of your open programs – it simply restarts the gnome-shell process which will re-initialize the state of the running applications upon restart.

What’s the FIX for the bug though?

I have no idea – I’ve personally experienced this all the way back to Gnome 3 days and I’d always just restart the machine. This time was different because I had a number of long-running processes in terminal windows that I didn’t want to interrupt so I dug for a solution.

I’ve found bugs filed in the Gnome tracker and forums discussed for the last 6 years or so with attempts to fix it, but it seems to come back.

It doesn’t even behave like a memory leak because the behavior is so uniform, doesn’t continue to degrade and a restart of the process always fixes it for potentially long periods of time (weeks/months).

Is there a way to reproduce it?

The way I’ve found easiest to reproduce this is inside of a long-running Gnome session, attempt a big upgrade of Gnome out from under itself via the Terminal app.

On Fedora (which frequently sees updates available) I’ll just fire off a sudo dnf update from the command line and if a big Gnome update is available, I’ll accept it and it seems more times than not, I’ll have this gnome-shell pausing behavior right after until I restart (or use this workaround).

Leave a Comment