After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758602 - High CPU usage when running gedit under Wayland
High CPU usage when running gedit under Wayland
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: wayland
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2015-11-24 14:50 UTC by Sebastian Jastrzebski
Modified: 2021-07-05 13:45 UTC
See Also:
GNOME target: ---
GNOME version: 3.17/3.18


Attachments
package-versions (62.16 KB, text/plain)
2015-11-24 14:50 UTC, Sebastian Jastrzebski
Details
lspci.out (2.59 KB, text/plain)
2015-11-24 14:52 UTC, Sebastian Jastrzebski
Details
debug.out (405.67 KB, text/plain)
2015-11-24 14:52 UTC, Sebastian Jastrzebski
Details
htop.png (488.23 KB, image/png)
2015-11-24 14:58 UTC, Sebastian Jastrzebski
Details

Description Sebastian Jastrzebski 2015-11-24 14:50:57 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
Comment 1 Sebastian Jastrzebski 2015-11-24 14:52:06 UTC
Created attachment 316176 [details]
lspci.out
Comment 2 Sebastian Jastrzebski 2015-11-24 14:52:40 UTC
Created attachment 316177 [details]
debug.out

wayland debug output for gedit
Comment 3 Sebastian Jastrzebski 2015-11-24 14:58:57 UTC
Created attachment 316178 [details]
htop.png
Comment 4 Jonas Ådahl 2015-11-24 15:27:39 UTC
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.
Comment 5 Matthias Clasen 2015-11-30 16:22:52 UTC
any hints for further debugging this, Jonas ?
Comment 6 Jonas Ådahl 2015-12-01 02:12:24 UTC
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?
Comment 7 Sebastian Jastrzebski 2015-12-05 13:14:04 UTC
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).
Comment 8 Christian Stadelmann 2017-10-28 15:09:59 UTC
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?
Comment 9 GNOME Infrastructure Team 2021-07-05 13:45:53 UTC
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.