Bug 428999 - Plasmashell is freezing when laptop is connected to an external monitor
Summary: Plasmashell is freezing when laptop is connected to an external monitor
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-multiscreen (show other bugs)
Version: 5.15.4
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-12 06:00 UTC by mrigs
Modified: 2023-04-21 14:49 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: Plasma 6.0


Attachments
Plasmashell backtrace while hanging (31.96 KB, text/plain)
2021-08-27 05:14 UTC, Christoph Schulz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mrigs 2020-11-12 06:00:20 UTC
SUMMARY Plasmashell is freezing when laptop is hooked on to an external monitor


STEPS TO REPRODUCE
1. Connect laptop (on Linux 5.7.19-desktop-3.mga7 GNU/Linux, plasmashell 5.15.4) to an external monitor using an HDMI cable.
2. Log on to Mageia Desktop
3. After random 10-15 minutes of activity all the desktop panels freeze.

OBSERVED RESULT
When I hook my laptop up to an external  monitor, plasmashell randomly freezes. The panels are no longer active, but I can continue working on the existing windows, and also switch between them using alt+tab. The only way to come back from the freeze is to kill and launch plasmashell again (killall plasmashell && plasmashell). I have also observed that the 2 monitors freeze at different times as I could see the clock stop at different times on both my screens.

EXPECTED RESULT
No freezing and uninterrupted work.

SOFTWARE/OS VERSIONS

Operating System: Mageia 7
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.6
Kernel Version: 5.7.19-desktop-3.mga7
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15.4 GiB of RAM


ADDITIONAL INFORMATION
Comment 1 Buovjaga 2020-11-12 06:59:36 UTC
It also
1) freezes without any involvement of an external monitor
2) does not freeze with 4.19 kernel

For more information and confirmations, see
https://forum.kde.org/viewtopic.php?f=289&t=164123

Switching to another tty with Ctrl-Alt-F2 often works, but not always. If it works, switching back to the original tty heals the freeze.
Comment 2 devel 2020-12-23 12:49:28 UTC
Same bug on kubuntu 20.10, plasma version 5.19.5, after a while memory starts going up and then the system freezes, the highest i recorded memory usage was 6gb, also, restarting the plasma resets the usage.
Comment 3 Nate Graham 2021-08-16 23:50:00 UTC
Can someone affected get a backtrace of what plasmashell was doing when it hung? See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
Comment 4 Christoph Schulz 2021-08-27 05:14:19 UTC
Created attachment 141080 [details]
Plasmashell backtrace while hanging

I attached a plasmashell backtrace. Plasmashell was frozen at that point, i.e. the task bar was not reacting, there was no visual progress of time etc. I'm using Gentoo Linux with Linux 5.10.52, KDE 5.21.5, Qt 5.15.2 and Mesa 21.1.7. I use the Intel i915 driver. Unfortunately, on this system I do not have detailed debugging symbols available at present.
Comment 5 Nate Graham 2021-08-27 16:52:17 UTC
Thanks. Looks like it's stuck in QSGThreadedRenderLoop::polishAndSync().

I wonder... can you try again with the "Basic" (unthreaded) render loop? You can access this setting in the hidden "Plasma Renderer" settings window, which yo can find by searching for "Plasma Renderer" in Kickoff or KRunner.

Are you using an NVIDIA GPU, by any chance?
Comment 6 Christoph Schulz 2021-08-27 17:36:50 UTC
I will try the non-threaded render loop, but presumable I won't have new results until next week. And no, unfortunately (or fortunately?) I do not use an NVIDIA GPU. It's the Intel HD Graphics 520 being part of the Intel i5-6200U notebook CPU (Skylake architecture).
Comment 7 Nate Graham 2021-08-27 17:55:13 UTC
OK, if you're not using an NVIDIA GPU, then it's probably not that other known issue with NVIDIA GPUs and the threaded render loop.
Comment 8 Christoph Schulz 2021-09-05 04:59:05 UTC
After changing the setting to the non-threaded render loop, I haven't had any freezes so far. Am I supposed to encounter any other problems with that setting (with the exception of, say, performance issues)? Are there any known pitfalls? Or can I simply use it "as is" without ever changing it back?
Comment 9 Bug Janitor Service 2021-09-20 04:35:31 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Nate Graham 2023-04-21 14:49:01 UTC
This will be fixed automatically in Qt6, but unfortunately we can't just use the basic render look unconditionally in Qt 5 since it causes other regressions. :(