Bug 456803

Summary: Plasma crashes after screen inactivity with "requesting unexisting screen 3" error
Product: [Plasma] plasmashell Reporter: Alfonso Murolo <almur.kde>
Component: generic-multiscreenAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: aleixpol, kde, nate, notmart
Priority: NOR Keywords: wayland-only
Version First Reported In: 5.25.3   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.27
Sentry Crash Report:
Attachments: journalctl log

Description Alfonso Murolo 2022-07-16 15:12:47 UTC
SUMMARY
Turning screens on after the screens turned themselves off for inactivity makes plasmashell crash.

 Once they are off 

STEPS TO REPRODUCE
1. Using Wayland with two Displayport screens, let KDE be without interacting until the two screens turn themselves off for inactivity.
2. Once they are off, come back to the computer and move the mouse to wake the screens up
3. Observe at least plasma crashing, if not failing to wake screens up at all (in which case, a hard reset is required)
4. If the screens were to come back up correctly, logging in with the password shows the unlock button and it does not continue the login procedure, hanging there, since plasma crashed behind the scenes.

OBSERVED RESULT
Plasma crashes and sometimes fails to wake up screens.
journalctl shows multiple instances of:
plasmashell[1473]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

and multiple instances of:
plasmashell[1473]: requesting unexisting screen 3


EXPECTED RESULT
The screens should wake up normally and plasma should not crash.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.18.10-arch1-1
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Comment 1 Nate Graham 2022-07-18 19:47:27 UTC
If something crashed, we need a backtrace of it so we can figure out what's going on. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports.

Can you please attach one? Thanks!
Comment 2 Alfonso Murolo 2022-07-19 16:30:18 UTC
Hi Nate, thanks for the instructions.
It just happened again (I could also replicate it by let it lock for inactivity and turn off the screens directly) and I had prepared my distro to get a dump with debug symbols. Sadly, it seems that it is not just "crashing" - plasmashell is still alive, printing those errors to journalctl until I hard reset. Exactly the same ones i wrote before. Is there a way I can provide more info even if plasmashell does not exactly 'crash' all the time such as in this case?

Other times, I am able to see the actual crash if I manage to log back in and plasmashell is gone - I see the crash dialog and so on. As soon as I manage to replicate that, I will look to retrieve a trace with coredumpctl (I have a whole bunch of those in the list from the recent past, but I am not sure anymore if they are from an event I am describing in this issue or something else).
Comment 3 Nate Graham 2022-07-19 16:54:53 UTC
If it's not crashing, what is it doing?
Comment 4 Alfonso Murolo 2022-07-19 17:27:29 UTC
(In reply to Nate Graham from comment #3)
> If it's not crashing, what is it doing?

I'd say it's a good question :-) I will try to replicate the crash behaviour where I get the crash dialog too. In that case, the hard reset is not necessary and I am able to get back to the desktop with a crashed plasmashell and a crash dialog welcoming me. Plasma is gone, but will eventually restart and so the session is recovered. In this other case which just happened, the logs in journalctl are all I am able to find for now of what is happening. Is there some other log which is plasma specific which I could browse?
Comment 5 Alfonso Murolo 2022-07-19 17:59:11 UTC
Created attachment 150748 [details]
journalctl log

In this workflow, I locked the computer manually and turned off both screens myself. Then waited for some seconds, and turned them back on at the same time. Plasma was gone, wallpaper was gone, and it seems it found itself in timeout, killed itself and restarted - in a total of almost 1 minute downtime.
Comment 6 Nate Graham 2023-04-10 23:08:35 UTC
Sorry this happened, and sorry you didn't get a response sooner. Mose of the code here has changed to improve multimonitor use-cases in Plasma 5.27, so the original "requesting unexisting screen 3" crash is likely no longer possible. If you experience more crashes with Plasma 5.27.4 or newer, please submit additional bug reports for them. Thanks!