Bug 469470

Summary: After turning on/off tv screen, screens' geometry values are swapped, reversing screen order
Product: [Plasma] KScreen Reporter: Eric Armbruster <eric1>
Component: commonAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 5.27.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Eric Armbruster 2023-05-08 07:56:57 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Hi there, I have a second monitor (TV), every time I restart my laptop I have to change the screen order again (Meta + P)

OBSERVED RESULT
TV is left of laptop

EXPECTED RESULT
TV is right of laptop

Operating System: Arch Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.3.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700U with Radeon Graphics
Memory: 14.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 20Y7CTO1WW
System Version: ThinkPad E14 Gen 3

ADDITIONAL INFORMATION
Please let me know how to include screen information, I know you will probably need this. Thanks :)
Comment 1 Eric Armbruster 2023-05-08 08:25:30 UTC
kscreen-doctor -o

Output: 1 eDP-1 enabled connected priority 1 Panel Modes: 0:1920x1080@60*! 1:1680x1050@60 2:1280x1024@60 3:1440x900@60 4:1280x800@60 5:1280x720@60 6:1024x768@60 7:800x600@60 8:640x480@60 9:1280x1024@60 10:1024x768@60 11:1280x800@60 12:1920x1080@60 13:1600x900@60 14:1368x768@60 15:1280x720@60 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 2 HDMI-A-1 enabled connected priority 2 HDMI Modes: 0:3840x2160@30! 1:4096x2160@60 2:4096x2160@60 3:4096x2160@50 4:4096x2160@30 5:4096x2160@30 6:4096x2160@25 7:4096x2160@24 8:4096x2160@24 9:3840x2160@60 10:3840x2160@60* 11:3840x2160@50 12:3840x2160@30 13:3840x2160@30 14:3840x2160@25 15:3840x2160@24 16:3840x2160@24 17:1920x1200@30 18:1920x1080@60 19:1920x1080@60 20:1920x1080@60 21:1920x1080@50 22:1920x1080@30 23:1920x1080@30 24:1920x1080@25 25:1920x1080@24 26:1920x1080@24 27:1600x1200@30 28:1680x1050@60 29:1600x900@60 30:1280x1024@75 31:1280x1024@60 32:1440x900@60 33:1366x768@60 34:1280x800@60 35:1152x864@75 36:1280x720@60 37:1280x720@60 38:1280x720@60 39:1280x720@50 40:1024x768@75 41:1024x768@70 42:1024x768@60 43:832x624@75 44:800x600@75 45:800x600@72 46:800x600@60 47:720x576@50 48:720x480@60 49:720x480@60 50:640x480@75 51:640x480@73 52:640x480@67 53:640x480@60 54:640x480@60 55:720x400@70 56:1600x1200@60 57:1280x1024@60 58:1024x768@60 59:2560x1600@60 60:1920x1200@60 61:1280x800@60 62:3840x2160@60 63:3200x1800@60 64:2880x1620@60 65:2560x1440@60 66:1920x1080@60 67:1600x900@60 68:1368x768@60 69:1280x720@60 Geometry: 1920,0 1920x1080 Scale: 2 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Comment 2 Eric Armbruster 2023-05-09 09:35:08 UTC
Correction: its enough to simply turn on/off the TV screen. After that my screen order is scrambled.
Comment 3 Nate Graham 2023-05-15 23:14:11 UTC
When you ran `kscreen-doctor -o` up there, was that before or after the problem happened?

What's helpful is to get the output of that command both before and after the issue happens, so we can see what specifically has changed.
Comment 4 Eric Armbruster 2023-05-16 06:36:54 UTC
Ok, got the following results after performing these steps:
1. Boot-up, turn TV screen on, change screen order with Meta+P to be correct.
2. kscreen-doctor -o
3. Turn tv on/off
4. kscreen-doctor -o


kscreen-doctor -o
Output: 1 eDP-1 enabled connected priority 1 Panel Modes: 0:1920x1080@60*! 1:1680x1050@60 2:1280x1024@60 3:1440x900@60 4:1280x800@60 5:1280x720@60 6:1024x768@60 7:800x600@60 8:640x480@60 9:1280x1024@60 10:1024x768@60 11:1280x800@60 12:1920x1080@60 13:1600x900@60 14:1368x768@60 15:1280x720@60 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 2 HDMI-A-1 enabled connected priority 2 HDMI Modes: 0:3840x2160@30! 1:4096x2160@60 2:4096x2160@60 3:4096x2160@50 4:4096x2160@30 5:4096x2160@30 6:4096x2160@25 7:4096x2160@24 8:4096x2160@24 9:3840x2160@60 10:3840x2160@60* 11:3840x2160@50 12:3840x2160@30 13:3840x2160@30 14:3840x2160@25 15:3840x2160@24 16:3840x2160@24 17:1920x1200@30 18:1920x1080@60 19:1920x1080@60 20:1920x1080@60 21:1920x1080@50 22:1920x1080@30 23:1920x1080@30 24:1920x1080@25 25:1920x1080@24 26:1920x1080@24 27:1600x1200@30 28:1680x1050@60 29:1600x900@60 30:1280x1024@75 31:1280x1024@60 32:1440x900@60 33:1366x768@60 34:1280x800@60 35:1152x864@75 36:1280x720@60 37:1280x720@60 38:1280x720@60 39:1280x720@50 40:1024x768@75 41:1024x768@70 42:1024x768@60 43:832x624@75 44:800x600@75 45:800x600@72 46:800x600@60 47:720x576@50 48:720x480@60 49:720x480@60 50:640x480@75 51:640x480@73 52:640x480@67 53:640x480@60 54:640x480@60 55:720x400@70 56:1600x1200@60 57:1280x1024@60 58:1024x768@60 59:2560x1600@60 60:1920x1200@60 61:1280x800@60 62:3840x2160@60 63:3200x1800@60 64:2880x1620@60 65:2560x1440@60 66:1920x1080@60 67:1600x900@60 68:1368x768@60 69:1280x720@60 Geometry: 1920,0 1920x1080 Scale: 2 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown


 kscreen-doctor -o
Output: 1 eDP-1 enabled connected priority 1 Panel Modes: 0:1920x1080@60*! 1:1680x1050@60 2:1280x1024@60 3:1440x900@60 4:1280x800@60 5:1280x720@60 6:1024x768@60 7:800x600@60 8:640x480@60 9:1280x1024@60 10:1024x768@60 11:1280x800@60 12:1920x1080@60 13:1600x900@60 14:1368x768@60 15:1280x720@60 Geometry: 1920,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Output: 2 HDMI-A-1 enabled connected priority 2 HDMI Modes: 0:3840x2160@30! 1:4096x2160@60 2:4096x2160@60 3:4096x2160@50 4:4096x2160@30 5:4096x2160@30 6:4096x2160@25 7:4096x2160@24 8:4096x2160@24 9:3840x2160@60 10:3840x2160@60* 11:3840x2160@50 12:3840x2160@30 13:3840x2160@30 14:3840x2160@25 15:3840x2160@24 16:3840x2160@24 17:1920x1200@30 18:1920x1080@60 19:1920x1080@60 20:1920x1080@60 21:1920x1080@50 22:1920x1080@30 23:1920x1080@30 24:1920x1080@25 25:1920x1080@24 26:1920x1080@24 27:1600x1200@30 28:1680x1050@60 29:1600x900@60 30:1280x1024@75 31:1280x1024@60 32:1440x900@60 33:1366x768@60 34:1280x800@60 35:1152x864@75 36:1280x720@60 37:1280x720@60 38:1280x720@60 39:1280x720@50 40:1024x768@75 41:1024x768@70 42:1024x768@60 43:832x624@75 44:800x600@75 45:800x600@72 46:800x600@60 47:720x576@50 48:720x480@60 49:720x480@60 50:640x480@75 51:640x480@73 52:640x480@67 53:640x480@60 54:640x480@60 55:720x400@70 56:1600x1200@60 57:1280x1024@60 58:1024x768@60 59:2560x1600@60 60:1920x1200@60 61:1280x800@60 62:3840x2160@60 63:3200x1800@60 64:2880x1620@60 65:2560x1440@60 66:1920x1080@60 67:1600x900@60 68:1368x768@60 69:1280x720@60 Geometry: 0,0 1920x1080 Scale: 2 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Comment 5 Eric Armbruster 2023-05-16 06:37:57 UTC
After 3 the screen order was scrambled again.
Comment 6 Nate Graham 2023-05-16 15:52:38 UTC
Looks like the screens' geometry values are reversing. Before, eDP-1 had a geometry value of 0,0 and for HDMI-A-1, it was 1920,0. After, they're reversed.

Is the "KScreen 2" service listed as running in System Settings > Startup and Shutdown > Background Services?
Comment 7 Eric Armbruster 2023-05-16 17:30:04 UTC
Yes
Comment 8 Nate Graham 2023-05-17 14:52:55 UTC
Thanks.
Comment 9 Eric Armbruster 2023-05-19 07:28:18 UTC
Hmm, cant reproduce anymore. Closing for now.