Bug 443027

Summary: Screen elements are reset after screen is turned off and on
Product: [Plasma] plasmashell Reporter: Yosuke Matsumura <yosukematsumura>
Component: generic-crashAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nate, plasma-bugs
Priority: NOR    
Version: 5.22.5   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=420160
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: What the screen looks like monitor is turned off
What the screen looks like after monitor is turned back on
System journalctl
User journalctl
Settings - Display Configuration - Reloaded

Description Yosuke Matsumura 2021-09-27 19:00:16 UTC
SUMMARY
Desktop computer's monitor/screen turns off (either manually, or due to sleep timer). When the screen is turned back on, the desktop is "reset" - Panel has disappeared, desktop wallpaper reset to default, and existing windows are moved/resized. 

STEPS TO REPRODUCE
1. Boot up & Log in (Wayland session) - does not reproduce in X11.
2. Turn off the screen. Note - just the screen power needs to be turned off. Does not require computer to go into suspend mode. Can be done in multiple ways - all produce the error:
   a. In System Settings > Power Management > Energy Savings > Button Events Handling > Set When power button is pressed "Turn off screen". And then press the power button on the computer.
   b. Press the power button on the monitor (or pull the power cord to the monitor).
   c. Wait for system to sleep and causing monitor to power off.
3. Wait 30s (I haven't determined a minimum time required, but sometimes it doesn't happen if the screen is turned back on quickly after turning off).


OBSERVED RESULT
Screen is "reset". The side panel (only panel) is gone. The desktop background/wallpaper is set to default. The open window is moved to upper left and resized.
See attachment: After Screen On.png

EXPECTED RESULT
Screen should appear exactly the same as before the screen is turned off.
See attachment: Before Screen Off.png


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 35 Kinoite
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
GPU is Navi 21/6900XT
Mesa 21.2.2
Logs attached. Screen Off at 13:17:15. Screen On at 13:18:00.
Comment 1 Yosuke Matsumura 2021-09-27 19:00:58 UTC
Created attachment 141960 [details]
What the screen looks like monitor is turned off
Comment 2 Yosuke Matsumura 2021-09-27 19:03:50 UTC
Created attachment 141961 [details]
What the screen looks like after monitor is turned back on
Comment 3 Yosuke Matsumura 2021-09-27 19:04:30 UTC
Comment on attachment 141960 [details]
What the screen looks like monitor is turned off

What it looks like *before* the monitor is turned off
Comment 4 Yosuke Matsumura 2021-09-27 19:05:36 UTC
Created attachment 141962 [details]
System journalctl

journalctl --system -S 2021-09-2713:17:10 -U 2021-09-2713:18:18 > User_Journal.txt
Comment 5 Yosuke Matsumura 2021-09-27 19:05:57 UTC
Created attachment 141963 [details]
User journalctl

journalctl --user -S 2021-09-2713:17:10 -U 2021-09-2713:18:18 > User_Journal.txt
Comment 6 Nate Graham 2021-09-27 20:52:41 UTC
How many screens do you have? 1, or more than 1?
Comment 7 Yosuke Matsumura 2021-09-27 21:13:27 UTC
(In reply to Nate Graham from comment #6)
> How many screens do you have? 1, or more than 1?

Just 1 screen.
Comment 8 Yosuke Matsumura 2021-09-27 21:15:58 UTC
Created attachment 141965 [details]
Settings - Display Configuration - Reloaded

Looking at the Display Configuration screen in System Settings after turning the screen back on, there is a new message saying:

"A new output has been added. Settings have been reloaded."
Comment 9 Nate Graham 2021-09-28 15:22:23 UTC
Seems like the system is detecting your screen as a newly-connected screen, rather than the same one. This triggers various multi-screen bugs in Plasma such as Bug 356225, Bug 356727, Bug 391531, and Bug 436648.

Let's focus on the issue with your waking-up monitor being mis-detected as a new screen here, as fixing that will no longer expose you to those Plasma bugs.

You're using an AMD GPU, right? If so, this is most likely https://bugzilla.kernel.org/show_bug.cgi?id=206387, which triggers those Plasma bugs.
Comment 10 Yosuke Matsumura 2021-09-28 16:00:35 UTC
(In reply to Nate Graham from comment #9)
> Seems like the system is detecting your screen as a newly-connected screen,
> rather than the same one. This triggers various multi-screen bugs in Plasma
> such as Bug 356225, Bug 356727, Bug 391531, and Bug 436648.
> 
> Let's focus on the issue with your waking-up monitor being mis-detected as a
> new screen here, as fixing that will no longer expose you to those Plasma
> bugs.
> 
> You're using an AMD GPU, right? If so, this is most likely
> https://bugzilla.kernel.org/show_bug.cgi?id=206387, which triggers those
> Plasma bugs.

I just switched the connection to my monitor from DisplayPort to HDMI (no DP ports connected to the GPU). This same issue manifests. 

That amdgpu bug seems to be specific to DisplayPort, unless I'm mistaken, so it would seem that it might not be the root cause.
Comment 11 Yosuke Matsumura 2021-09-28 19:31:49 UTC
This looks to be a duplicate of 420160. Closing.

*** This bug has been marked as a duplicate of bug 420160 ***
Comment 12 Nate Graham 2021-10-04 14:25:54 UTC

*** This bug has been marked as a duplicate of bug 438839 ***