GNOME Bugzilla – Bug 758602
High CPU usage when running gedit under Wayland
Last modified: 2021-07-05 13:45:53 UTC
Created attachment 316175 [details] package-versions I'm experiencing high CPU usage by gedit and gnome-shell when gedit is started using Wayland backend. Each process takes up about 30% of a CPU on a quad-core Intel Core i7-4800MQ even though the system is idle. There are no other processes that are taking up any CPU cycles. This only happens when gedit is started w/ Wayland backend GDK_BACKEND=wayland gedit This does not happen under X11 backend started under Wayland session GDK_BACKEND=x11 gedit I'm running Fedora 23 w/ all updates as of 11/23. Attached are
Created attachment 316176 [details] lspci.out
Created attachment 316177 [details] debug.out wayland debug output for gedit
Created attachment 316178 [details] htop.png
Looking at the debug output log, it looks like gedit ends up in a endless loop where it attaches a buffer alongside with damage of what seems to be the whole window content, queues a frame callback, then start over when the frame callback is invoked. The reason why gnome-shell eats CPU I'd assume is that we are re-uploading pixels into GPU memory for almost the whole gedit window each frame, so I don't think the issue is with mutter. Now, whether this is a bug in gedit or gtk+ or somewhere else I don't know, it at least seems to be client side.
any hints for further debugging this, Jonas ?
No. I haven't been able to reproduce it. I tried checking out the version combination of gedit and gtk+, but it didn't help. Sebastian, did you have a file open or something other that differs from a plain gedit session with only a single open empty new file?
I did not have any files open, just started with a blank/new file. Is there anything you would like me to try to help diagnose it? I thought it might be related to drivers (im using mesa's i965) but it seems the client (gedit is generating all the noise, calls to wayland).
Can you still reproduce this issue? Do you have any gedit plugins enabled? If yes (to both), can you please try without these plugins? If you attach gdb to gedit, can you get a backtrace?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.