Bug 459681 - Resuming from powersaving/sleep results in display misconfiguration and lost window positions
Summary: Resuming from powersaving/sleep results in display misconfiguration and lost ...
Status: RESOLVED DUPLICATE of bug 461886
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.25.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-26 04:24 UTC by Jason Straight
Modified: 2024-05-24 14:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Straight 2022-09-26 04:24:27 UTC
Still having issues with multiple screens on Xorg with 5.25.90 Beta.

I have a 3440x1440@144Hz displayport screen oriented above my laptop's built in 1080 screen.

Firefox was snapped to the right side of the wide screen. Upon waking from screen powersaving, Firefox is now half off the right side of the screen.

Another powersave/wakeup immediately afterwards resulted in my displays being misconfigured. I feel like maybe it has to do with the time required for the external display to initialize after waking?

kde now has it configured as a 1920x1080@60Hz display. I have to go into display settings and change it back to 3440x1440@144Hz.

When it gets switched to 1080, it also ends up moving all windows to the built-in lower display.


Operating System: EndeavourOS
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.9-arch1-g14-1 (64-bit)
Graphics Platform: X11
Processors: 20 × 12th Gen Intel® Core™ i9-12900H
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ROG Strix G733ZW_G733ZW
System Version: 1.0
Comment 1 Nate Graham 2022-09-26 20:27:36 UTC
Is it any better with the Wayland session?
Comment 2 Jason Straight 2022-09-26 21:10:00 UTC
(In reply to Nate Graham from comment #1)
> Is it any better with the Wayland session?

Afraid not. First try - it lost my screen resolution and refresh rate.
Comment 3 Nate Graham 2022-09-26 21:24:09 UTC
That will be because of another bug (monitor information stored in a different way on Wayland vs X11). If you correct those things, reboot, and then try to reproduce the issue, does it happen again?
Comment 4 Jason Straight 2022-09-26 21:43:18 UTC
(In reply to Nate Graham from comment #3)
> That will be because of another bug (monitor information stored in a
> different way on Wayland vs X11). If you correct those things, reboot, and
> then try to reproduce the issue, does it happen again?

Still happens.
Comment 5 Zamundaaa 2022-09-27 09:53:28 UTC
After you change the monitor settings back, do the windows move back to their correct places again?
Comment 6 Jason Straight 2022-09-27 12:39:31 UTC
(In reply to Zamundaaa from comment #5)
> After you change the monitor settings back, do the windows move back to
> their correct places again?

No. Not in X anyway.
Comment 7 Jason Straight 2022-09-27 12:43:17 UTC
The reason I get the idea it has something to do with timing/time is because it takes a while of sitting for this to trigger.

For testing, I set my screen sleep to 1 minute.

If I wake the monitors right after they go to sleep, they wake up fine. If I wait for the monitor to wake back up and tell me there's no signal on DP, then it goes back to sleep. If I wake it up within several seconds of that, it still wakes up fine.

I don't know exactly what the "safe" time is, maybe it's less than a couple minutes.

But when it bugs out on me is after I've left it for about 5 or more minutes.
Comment 8 Jason Straight 2022-09-27 18:48:09 UTC
When it does come back with the proper screen settings, the windows appear to be in the right spots.
Comment 9 Jason Straight 2022-09-28 01:58:07 UTC
Another observation that (so far) seems true, in case it helps:

It only seems to have a problem the first time it sleeps the screens after a reboot.

After it does the first time, I reconfigure my screen resolution, position, and refresh rate and then every time it sleeps afterwards it successfully wakes the screens with the right settings and window positions.
Comment 10 Jason Straight 2022-10-02 00:24:27 UTC
If I use my thunderbolt usb 4 docking station, everything works fine. Still displayport.
Comment 11 Jason Straight 2022-10-17 01:07:01 UTC
Update:

I switched to OpenSuSE Tumbleweed and no longer have the problems with the resolution being change after waking the screens, but the positions of the windows are not restored. They're shifted to the right, with whatever window was snapped to the right being partially off-screen.
Comment 12 Bug Janitor Service 2022-10-17 12:12:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3063
Comment 13 Zamundaaa 2022-10-17 12:20:15 UTC
sorry, that was the wrong bug number
Comment 14 Ed Tomlinson 2022-12-05 12:14:37 UTC
I am on Arch with 5.26.4 using wayland.  My Primary monitor  (hdmi 1920x1080) is set on the right of my secondary (DP 2560x1440).  About one in ten times after waking from display powersaving I get a 'graphic menu' of screen layouts, I need to select the second from the right and  then reposition my primary screen.  I suspect its a timing issue?  The DP monitor wakes much faster than the HDMI monitor.   Are there any logs I can collect to see what happens after a good wake vs a bad wake?
Comment 15 Jason Straight 2022-12-15 16:37:35 UTC
It seems that what really makes the Windows come up in the wrong spot is when they're snapped to a screen edge.

Where I see it is my 2nd monitor, which is an ultra wide, and I often have windows snapped to one side or the other.
Comment 16 Zamundaaa 2024-05-24 14:30:21 UTC

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