This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Plasmashell takes 100% CPU after hibernation

Tags: None
(comma "," separated)
User avatar
Heiko Tietze
Registered Member
Posts
593
Karma
0
OS
One thread is completely occupied by plasmashell. Known bug, or what can I do to support tracking?

Latest official release (Arch Linux), AFAIR it wasn't a problem before 5.3.
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
You may want to file a bug. A backtrace would be needed too, but I'm afraid you won't be able to provide one by the way Arch makes their packages (no debug information).


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
Heiko Tietze
Registered Member
Posts
593
Karma
0
OS
einar wrote:You may want to file a bug.

Thanks

https://bugs.kde.org/show_bug.cgi?id=347649
luebking
Karma
0
nvidia GPU?
tried "gdb --pid `pidof plasmashell`" to get a backtrace?

(you'll have to "echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope" in order to be allowed to attach to processes unless you're root)
User avatar
Heiko Tietze
Registered Member
Posts
593
Karma
0
OS
Yes, nvidia.
Makes gdb sense without debugging info?
luebking
Karma
0
Probably - it'll still tell you the function names where the threads are currently in

> thread apply all bt
User avatar
Heiko Tietze
Registered Member
Posts
593
Karma
0
OS
top:
Code: Select all
  639 tietze    20   0  337,5m  35,0m   0,0  0,6   0:00.13 S  `- kdeinit5                                                                                                                   
  640 tietze    20   0  481,2m  44,0m   0,0  0,7   0:00.19 S      `- klauncher                                                                                                             
  644 tietze    20   0 1430,9m  72,7m   0,0  1,2   0:00.90 S      `- kded5                                                                                                                 
  709 tietze    20   0  304,9m  41,3m   0,0  0,7   0:00.12 S          `- kscreen_backend                                                                                                   
  742 tietze    20   0  583,4m  52,6m   0,7  0,9   0:01.21 S      `- ksmserver                                                                                                             
  747 tietze    20   0 2939,7m 122,1m   1,3  2,0   0:12.89 S          `- kwin_x11                                                                                                           
  757 tietze    20   0  646,6m  89,8m   0,0  1,5   0:00.79 S      `- krunner                                                                                                               
  761 tietze    20   0 5985,9m 353,7m 100,0  5,9   8:33.58 S      `- plasmashell                                                                                                           
  993 tietze    20   0    9,6m   2,2m   0,0  0,0   0:00.08 S          `- ksysguardd                                                                                                         
  765 tietze    20   0  544,5m  60,1m   0,0  1,0   0:00.19 S      `- polkit-kde-auth                                                                                                       


sudo gdb --pid <plasmashell>

https://paste.kde.org/p5bv82a5m

PS: Right now, plasmashell crashed finally with a bug report. I pasted the output to https://paste.kde.org/pipjxwzsx (not enough info to report).
luebking
Karma
0
You loaded plasmashell into gdb and then quit w/o dumping any information ;-)

However, the backtrace from the crash was "predictable", it aborts in thread #11

#11 0x00007f0a2c50c3c8 IN glXSwapBuffers () from /usr/lib/libGL.so.1
#12 0x00007f0a213811c2 IN ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#13 0x00007f0a31c45396 IN QOpenGLContext::swapBuffers(QSurface*) () from /usr/lib/libQt5Gui.so.5


We've ongoing bugreports against KWin compositing about the nvidia blob doing "funny things™" when resuming from STR and now, since plasmashell sits on top of QML on top of OpenGL, similar things emerge there as well.

Unfortunately, I can atm. just suggest to
a) ensure to not use a framebuffer console: https://wiki.archlinux.org/index.php/GR ... ramebuffer
b)
Code: Select all
export __GL_YIELD="USLEEP"
to prevent the waiting for the swap from turning your system into a hairdryer.
User avatar
Heiko Tietze
Registered Member
Posts
593
Karma
0
OS
luebking wrote:a) ensure to not use a framebuffer console: https://wiki.archlinux.org/index.php/GR ... ramebuffer

No success with "GRUB_TERMINAL_OUTPUT=console" (change is effective after reboot but plasmasheel takes 100% after suspend).

Is this advice still relevant (BTW: May I challenge the idea to spam a hardly readable journal with each and every message from kwin and adding there a reference to a bug with >100 comments? Just from the user perspective...)

It seems you are using the nvidia driver without triple buffering
You must export __GL_YIELD="USLEEP" to prevent large CPU overhead on synced swaps
Preferably, enable the TripleBuffer Option in the xorg.conf Device
For this reason, the tearing prevention has been disabled.
See https://bugs.kde.org/show_bug.cgi?id=322060


Many thanks for your support!
luebking
Karma
0
The comment is still relevant, yes.
(the noop yield causes a busy wait causes the high CPU load in plasmashell as well)

Stashing it in the unreadble journal wasn't exactly a decision ;-)
It's something that "happened" during porting from SC4 to KF5.

kDebug turned into qDebug and now qCDebug, but we've afaik no config GUI for the categorized debug out, so the usually rather "rare" warning is now stashed in the mass output of the -by default- enabled general debug (which is really meant for development)

Also Qt went from ~/.xsession-errors to journald - and that journald is really the by *far* weakest item of the entire systemd stack isn't our fault either ;-)
(Its really unusuable/useless, consider turning it into a jumppad for rsyslog)
User avatar
Heiko Tietze
Registered Member
Posts
593
Karma
0
OS
luebking wrote:The comment is still relevant, yes.

And it solves the problem!

For those who don't want to go through all comments or dig the web:
Code: Select all
sudo bash -c 'exec echo export __GL_YIELD="USLEEP" > /etc/profile.d/Tearing.sh'
sudo chmod +x /etc/profile.d/Tearing.sh
luebking
Karma
0
"Solve" by "no more high cpu load" or by "plasmashell also actually repaints"?
User avatar
Heiko Tietze
Registered Member
Posts
593
Karma
0
OS
I never had issues with repainting. Yes, the high CPU load after suspension is gone.
luebking
Karma
0
Hmmm... I'd have said that if plasmashell hangs (w/ 100% cpu load) and finally aborts in glSwapBuffers, it cannot actually paint anything (that doesn't affect other applications of course - only the desktop and its panels etc.)
Heart1010
Registered Member
Posts
3
Karma
0
Here (on openSUSE Tumbleweed) the cpu plasmoid itself ^-^ caused this high plamashell cpu usage. Deleted that CPU plasmoid for the moment.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]