Bug 481946

Summary: Screen reset of position and resolution when turned off and on again
Product: [Plasma] KScreen Reporter: Tom <kde>
Component: commonAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 5.27.10   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screen Arrangement/Res after on/off
Screen Arrangement

Description Tom 2024-02-28 17:42:11 UTC
Created attachment 166162 [details]
Screen Arrangement/Res after on/off

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
***
I have 2 Monitors. When I turn off my primary monitor and turn it back on, it resets to a low resolution and its position in the screen arrangement is reset. It's very annoying to fix because my mouse can be stuck on one monitor while KScreen opens on the other monitor. 
This only happens when I turn the screen off. Unplugging and plugging back in works perfectly fine. The Screen being put to sleep by KDE leads to the same behavior.
It does not happen if the power-off is super short, like <5s or so.
STEPS TO REPRODUCE
1.  Turn off Screen
2.  Turn on Screen
3.  Suffer

OBSERVED RESULT

Monitor is reset to a low resolution. The multi-monitor screen arrangement is put into a weird state.

EXPECTED RESULT

Everything is as it was before the screen was turned off.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 5.27.10 (Arch, latest as of now)
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
Operating System: Arch Linux 
Kernel Version: 6.7.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 7900 12-Core Processor
Memory: 30,5 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT
Manufacturer: ASRock
Product Name: B650M Pro RS

Both my screen run at 1920x1080. The one with the issue is connected via DisplayPort. It's marked as my primary monitor. The other one is connected via HDMI.

xrandr output:
Screen 0: minimum 16 x 16, current 3840 x 1080, maximum 32767 x 32767
DP-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 530mm x 300mm
   1920x1080     59.96*+
   1440x1080     59.99  
   1400x1050     59.98  
   1280x1024     59.89  
   1280x960      59.94  
   1152x864      59.96  
   1024x768      59.92  
   800x600       59.86  
   640x480       59.38  
   320x240       59.52  
   1680x1050     59.95  
   1440x900      59.89  
   1280x800      59.81  
   1152x720      59.97  
   960x600       59.63  
   928x580       59.88  
   800x500       59.50  
   768x480       59.90  
   720x480       59.71  
   640x400       59.95  
   320x200       58.96  
   1600x900      59.95  
   1368x768      59.88  
   1280x720      59.86  
   1024x576      59.90  
   864x486       59.92  
   720x400       59.55  
   640x350       59.77  
HDMI-A-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 530mm x 300mm
   1920x1080     59.96*+
   1440x1080     59.99  
   1400x1050     59.98  
   1280x1024     59.89  
   1280x960      59.94  
   1152x864      59.96  
   1024x768      59.92  
   800x600       59.86  
   640x480       59.38  
   320x240       59.52  
   1680x1050     59.95  
   1440x900      59.89  
   1280x800      59.81  
   1152x720      59.97  
   960x600       59.63  
   928x580       59.88  
   800x500       59.50  
   768x480       59.90  
   720x480       59.71  
   640x400       59.95  
   320x200       58.96  
   1600x900      59.95  
   1368x768      59.88  
   1280x720      59.86  
   1024x576      59.90  
   864x486       59.92  
   720x400       59.55  
   640x350       59.77  

I'd be happy to share any further Information that will help resolve this.

I also think that there is another lesson to be learned from this issue: The Display arrangement should never be default-configured into an invalid state (as in the screenshot - the display NEED to touch but they don't!). It might also make sense to default-intialize screens to use the maximum resolution.
Comment 1 Tom 2024-02-28 17:43:13 UTC
Created attachment 166163 [details]
Screen Arrangement
Comment 2 Nate Graham 2024-03-01 20:32:04 UTC
Effectively the same issue as Bug 479952 (same root cause), which is still present in Plasma 6.

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