Gnome-shell 100%CPU usage

Hi,

We are experiencing issues with gnome-shell eating up all CPU, making the system completely unusable.

an strace of the process gives:

strace: Process 7665 attached
^Cstrace: Process 7665 detached
% time seconds usecs/call calls errors syscall


35.13 0.034043 16 2113 ioctl
13.08 0.012675 16 768 52 futex
12.76 0.012367 12 1027 poll
7.54 0.007305 3 1972 1547 recvmsg
7.12 0.006899 7 912 close
5.37 0.005202 5 969 760 readlink
2.77 0.002681 8 321 writev
2.01 0.001948 4 456 getpid
1.79 0.001739 8 209 openat
1.52 0.001477 12 114 mmap
1.47 0.001420 4 304 read
1.33 0.001288 11 114 newfstatat
1.16 0.001120 9 114 munmap
1.10 0.001064 2 380 lseek
1.08 0.001051 13 76 rt_sigprocmask
1.01 0.000982 25 38 clone3
0.84 0.000816 10 76 sendmsg
0.78 0.000755 3 228 fstat
0.65 0.000633 11 57 memfd_create
0.53 0.000509 2 171 write
0.41 0.000402 7 57 ftruncate
0.36 0.000352 3 95 fcntl
0.19 0.000186 4 38 getdents64
0.00 0.000004 4 1 restart_syscall


100.00 0.096918 9 10610 2359 total

and in journalctl I end up with multiple errors:

Jun 12 16:20:08 ***************** gnome-shell[7665]: Can’t update stage views actor MetaWindowActorX11 is on because it needs an allocation.
Jun 12 16:20:08 ***************** gnome-shell[7665]: Can’t update stage views actor MetaSurfaceActorX11 is on because it needs an allocation.
Jun 12 16:20:53 ***************** gnome-shell[7665]: Can’t update stage views actor MetaWindowGroup is on because it needs an allocation.
Jun 12 16:20:53 ***************** gnome-shell[7665]: Can’t update stage views actor MetaWindowActorX11 is on because it needs an allocation.
Jun 12 16:20:53 ***************** gnome-shell[7665]: Can’t update stage views actor MetaSurfaceActorX11 is on because it needs an allocation.
Jun 12 16:20:54 ***************** gnome-shell[7665]: Can’t update stage views actor MetaWindowGroup is on because it needs an allocation.
Jun 12 16:20:54 ***************** gnome-shell[7665]: Can’t update stage views actor MetaWindowActorX11 is on because it needs an allocation.
Jun 12 16:20:54 ***************** gnome-shell[7665]: Can’t update stage views actor MetaSurfaceActorX11 is on because it needs an allocation.
Jun 12 16:22:46 ***************** gnome-shell[7665]: Can’t update stage views actor MetaWindowGroup is on because it needs an allocation.
Jun 12 16:22:46 ***************** gnome-shell[7665]: Can’t update stage views actor MetaWindowActorX11 is on because it needs an allocation.
Jun 12 16:22:46 ***************** gnome-shell[7665]: Can’t update stage views actor MetaSurfaceActorX11 is on because it needs an allocation.
Jun 12 16:22:46 ***************** gnome-shell[7665]: Can’t update stage views actor MetaWindowGroup is on because it needs an allocation.
Jun 12 16:22:46 ***************** gnome-shell[7665]: Can’t update stage views actor MetaWindowActorX11 is on because it needs an allocation.
Jun 12 16:22:46 ***************** gnome-shell[7665]: Can’t update stage views actor MetaSurfaceActorX11 is on because it needs an allocation.

Any idea?

Hi,

This does not look like a memory allocation failure to me.

The message:

Can't update stage views actor ... because it needs an allocation

seems to be related to GNOME Shell / Mutter stage-view or actor layout handling, not necessarily system memory exhaustion.

I found similar reports around GNOME Shell extensions:

dash-to-panel:

dash-to-dock:

Fedora Discussion also has a similar case where the root cause appeared to be a conflict between GNOME Shell extensions. In that case, Auto Activities and Dash to Dock were conflicting, and removing Dash to Dock solved the issue:

So I would first try to reproduce the issue with all GNOME Shell extensions disabled:

gnome-extensions list
gnome-extensions disable --all

Then log out and log in again.

If the problem disappears, re-enable the extensions one by one to identify the trigger.

It may also be useful to share the following information:

echo $XDG_SESSION_TYPE
gnome-shell --version
rpm -q gnome-shell mutter
gnome-extensions list
journalctl --user -b | grep -i gnome-shell

I would not rule out memory pressure completely, but based on the log message itself, I would check GNOME Shell extensions, Mutter, X11/XWayland, and the graphics driver first.

OK actually, this is not linked to gnome. Switching to kde led to the same issues. I found out that at random times, I get errors like such appearing, which are linked to the nouveau driver:

[12214.906574] nouveau 0000:65:00.0: gsp: mmu fault queued
[12214.975649] nouveau 0000:65:00.0: gsp: rc engn:00000001 chid:8 gfid:0 level:2 type:31 scope:1 part:233 fault_addr:0000003ff3dd0000 fault_type:00000002
[12214.975669] nouveau 0000:65:00.0: fifo:000000:0008:0008:[Xorg[3024]] errored - disabling channel
[12214.975679] nouveau 0000:65:00.0: Xorg[3024]: channel 8 killed!

This is apparently linked to Nvidia metadata error : I need to install the nvidia-driver. But if there is a solution for this, I will happily take it!

This looks like a GNOME Shell/Mutter issue rather than an AlmaLinux-specific problem.

The “Can’t update stage views actor … needs an allocation” messages are known GNOME/X11-side warnings, but they may not be the root cause of the 100% CPU usage by themselves.

Could you provide the following information?

rpm -q gnome-shell mutter mesa-dri-drivers xorg-x11-server-Xorg kernel
echo $XDG_SESSION_TYPE
gnome-extensions list --enabled
lspci -nn | grep -Ei ‘vga|3d|display’

Also, please check whether the issue still happens with:

  • all GNOME extensions disabled
  • a fresh new user
  • Wayland vs X11
  • after logging out/in or restarting gdm

If it is reproducible, this may need to be reported upstream to GNOME/Mutter with package versions, GPU/driver information, and full journal logs.