Bug 496932

Summary: On X11 Display layout always wrong after wake up from sleep
Product: [Plasma] KScreen Reporter: Marcelo Vanzin <mmvgroups>
Component: commonAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kdedev, nate
Priority: NOR Keywords: multiscreen, X11-only
Version First Reported In: 6.2.4   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marcelo Vanzin 2024-12-02 14:59:43 UTC
SUMMARY
When my laptop wakes up from sleep with an external display attached, the layout is always wrong.

The display is configured so the external display is on the right of the built-in display.

After waking up, the external display is set up to mirror the built-in one. I have to go to the display config and fix it manually on every wake up.

Once woken up, I've tried the following in case that gives any hints:

- disconnecting and connecting the external monitor does not fix things; in fact, it changes the resolution to match the external monitor's, and the built-in monitor now doesn't show the whole screen.
- if I fix the display config manually, disconnecting the external monitor and connecting it back results in the expected layout, but windows that were previously on the external monitor are not moved.

STEPS TO REPRODUCE
1. Have an external monitor connected and set up on the right of the built-in laptop monitor
2. Lock screen and put system to sleep (for me: close laptop lid)
3. Wake system up (for me: open the lid)

OBSERVED RESULT
External monitor is a mirror of the built-in monitor.

EXPECTED RESULT
External monitor is on the right of the built-in monitor.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.2
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.8.0-49-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8650U CPU @ 1.90GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20L50018US
System Version: ThinkPad T480

ADDITIONAL INFORMATION
I'm pretty sure this worked on a previous version of the 6.x line, but I don't remember exactly when it broke. I think it was when I upgraded from Neon 22.04 to Neon 24.04.

Let me know if there's any more information I can gather to help with this.

After the system wakes up, it also becomes hit by bug 484323; I need to run `kwin --replace` to fix it until next time the system goes to sleep, or external monitors are connected / disconnected.
Comment 1 Marcelo Vanzin 2024-12-02 15:00:40 UTC
Extra bit of info: if I shut down the computer with the external monitor connected and laid out on the right of the built-in monitor, and turn the computer back on, the layout is properly restored. This only really happens on wake up from sleep.
Comment 2 Marcelo Vanzin 2024-12-08 22:41:24 UTC
One more: if I disconnect the external monitor before putting the laptop to sleep, it's restored in the proper location after wake up, whether the monitor is plugged back in before or after wake up.
Comment 3 Nate Graham 2024-12-11 22:23:38 UTC
Does it happen on Wayland too? Or only on X11?
Comment 4 Marcelo Vanzin 2024-12-12 16:13:12 UTC
It does not happen on Wayland.

Plasma was updated to 6.2.4 since I filed this, problem still persists on X11.
Comment 5 Bug Janitor Service 2024-12-27 03:47:28 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Marcelo Vanzin 2025-01-11 01:07:42 UTC
Still a problem on 6.2.5.
Comment 7 TraceyC 2025-02-24 17:58:53 UTC
Adding the x11-only keyword