Bug 470636 - The primary screen is switched after waking from sleep on Wayland
Summary: The primary screen is switched after waking from sleep on Wayland
Status: RESOLVED DOWNSTREAM
Alias: None
Product: KScreen
Classification: Plasma
Component: common (other bugs)
Version First Reported In: 5.27.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-04 17:20 UTC by aronkvh
Modified: 2023-06-22 05:52 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aronkvh 2023-06-04 17:20:11 UTC
1. Put the system to sleep
2. Wake up
3. The primary monitor is now the second monitor instead of the previous primary monitor
4. Open settings and fix it

happens every time, only on Wayland

KDE neon 5.27
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 5.19.0-43-generic (64-bit)
Graphics Processor: NVIDIA GeForce RTX 3060/PCIe/SSE2
Comment 1 Nate Graham 2023-06-05 19:04:22 UTC
How are you determining that the primariness of the screens has been switched? Is it because the output of `kscreen-doctor -o` has changed and indicates that a different screen is primary, or is it based on observed side effects such as the desktop and/or panel switching positions?

Can you paste the output of `kscreen-doctor -o` after this happens, and then again after you fix it?
Comment 2 Nate Graham 2023-06-05 19:04:58 UTC
And, if it's possible for you to plug the screens into different display ports on the GPU from the ports you've already got them plugged into, can you try that and see if it helps?
Comment 3 aronkvh 2023-06-10 09:24:22 UTC
(In reply to Nate Graham from comment #1)
> How are you determining that the primariness of the screens has been
> switched? Is it because the output of `kscreen-doctor -o` has changed and
> indicates that a different screen is primary, or is it based on observed
> side effects such as the desktop and/or panel switching positions?
> 
> Can you paste the output of `kscreen-doctor -o` after this happens, and then
> again after you fix it?

The radio button in systemsettings is switched, as well as all panels/icons. 

kscreen-doctor -o before fix: 
Output: 1 HDMI-A-1 enabled connected priority 2 HDMI Modes: 0:1920x1080@60*! 1:1920x1080@60 2:1920x1080@60 3:1920x1080@50 4:1600x1200@60 5:1680x1050@60 6:1280x1024@75 7:1280x1024@60 8:1440x900@60 9:1280x720@60 10:1280x720@50 11:1024x768@75 12:1024x768@60 13:800x600@75 14:800x600@60 15:800x600@56 16:720x576@50 17:720x480@60 18:640x480@75 19:640x480@73 20:640x480@60 21:640x480@60 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 2 DP-2 enabled connected priority 1 DisplayPort Modes: 0:1680x1050@60*! 1:1600x1200@60 2:1680x1050@60 3:1280x1024@75 4:1280x1024@60 5:1440x900@75 6:1440x900@60 7:1024x768@75 8:1024x768@70 9:1024x768@60 10:800x600@75 11:800x600@72 12:800x600@60 13:800x600@56 14:640x480@75 15:640x480@73 16:640x480@60 Geometry: 1920,15 1680x1050 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown

after fix: 
Output: 1 HDMI-A-1 enabled connected priority 1 HDMI Modes: 0:1920x1080@60*! 1:1920x1080@60 2:1920x1080@60 3:1920x1080@50 4:1600x1200@60 5:1680x1050@60 6:1280x1024@75 7:1280x1024@60 8:1440x900@60 9:1280x720@60 10:1280x720@50 11:1024x768@75 12:1024x768@60 13:800x600@75 14:800x600@60 15:800x600@56 16:720x576@50 17:720x480@60 18:640x480@75 19:640x480@73 20:640x480@60 21:640x480@60 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 2 DP-2 enabled connected priority 2 DisplayPort Modes: 0:1680x1050@60*! 1:1600x1200@60 2:1680x1050@60 3:1280x1024@75 4:1280x1024@60 5:1440x900@75 6:1440x900@60 7:1024x768@75 8:1024x768@70 9:1024x768@60 10:800x600@75 11:800x600@72 12:800x600@60 13:800x600@56 14:640x480@75 15:640x480@73 16:640x480@60 Geometry: 1920,15 1680x1050 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Comment 4 aronkvh 2023-06-17 11:14:39 UTC
(In reply to Nate Graham from comment #2)
> And, if it's possible for you to plug the screens into different display
> ports on the GPU from the ports you've already got them plugged into, can
> you try that and see if it helps?

That seem to have helped. I also seem to have resolved an acpi error that caused sleep errors, and I can't reproduce since. so it might not be kscreen's fault
Comment 5 Nate Graham 2023-06-22 05:52:38 UTC
It does sound like a hardware or low level driver issue at this point, yeah. Glad it's fixed now.