Bug 485364

Summary: Plasma won't switch main screen to be external if laptop lid was closed
Product: [Plasma] kwin Reporter: Yoshio Sato <vasua.ukraine>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, vasua.ukraine
Priority: NOR Keywords: multiscreen, wayland-only
Version: 6.0.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: System information about hardware, Wayland, OpenGL, Vulkan...
System settings display control section on closed/open lid

Description Yoshio Sato 2024-04-11 09:54:25 UTC
Created attachment 168384 [details]
System information about hardware, Wayland, OpenGL, Vulkan...

Plasma won't switch main screen to be external if the laptop lid was closed

STEPS TO REPRODUCE
1. Close your laptop lid
2. Look at the external screen
3. Notice that the closed and disabled laptop display is still the main one and the external display still displays no panels/widgets/applets from the main screen

OBSERVED RESULT
Plasma won't switch the main screen to be external while the laptop lid is closed

EXPECTED RESULT
Plasma will switch the main screen to be external for the time lid being closed

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed 20240407
KDE Plasma Version: 6.0.3 (Wayland)
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3

ADDITIONAL INFORMATION
running on Wayland

GPU 1: NVIDIA GeForce GTX 1650 Mobile / Max-Q
GPU 2: AMD Radeon RX Vega 6 (Ryzen 4000/5000 Mobile Series) (Driver Version: 550.67)

external display is connected via NVIDIA managed HDMI port
for more info see attachment
Comment 1 Yoshio Sato 2024-04-11 10:06:38 UTC
Created attachment 168385 [details]
System settings display control section on closed/open lid

System settings display control section on closed/open lid
Comment 2 Nate Graham 2024-04-12 20:28:55 UTC
That gap between screens looks suspicious. However this use case is working for me. Let's see if we can rule out hardware issues or software bugs; can you try this in a new clean user account and see if it still happens as described? Thanks!
Comment 3 Yoshio Sato 2024-04-14 10:16:43 UTC
(In reply to Nate Graham from comment #2)
> That gap between screens looks suspicious. However this use case is working
> for me. Let's see if we can rule out hardware issues or software bugs; can
> you try this in a new clean user account and see if it still happens as
> described? Thanks!

On a new user it works fine, I tried setting the same displays layout and scaling factor but it still worked.
I also tried disabling the ICC profile on my main user without reboot, but it didn't help.
I remember it working right after update to Plasma 6.0.1, but some time later it stopped working (I don't remember if any updates happened right before it stopped working)
Comment 4 Yoshio Sato 2024-04-14 10:19:11 UTC
BTW, the main GPU is 'AMD Renoir [Radeon RX Vega 6 ]'
Comment 5 Nate Graham 2024-04-14 15:23:38 UTC
If it's working in a new user account, then there is some invalid config in your main user account that's causing this. If you move aside ~/.config/kwinoutputconfig.json (don't delete it), reboot, and replicate the setup, does the problem go away?
Comment 6 Yoshio Sato 2024-04-16 18:57:05 UTC
(In reply to Nate Graham from comment #5)
> If it's working in a new user account, then there is some invalid config in
> your main user account that's causing this. If you move aside
> ~/.config/kwinoutputconfig.json (don't delete it), reboot, and replicate the
> setup, does the problem go away?

Thanks, it did help!
The original config was migrated from Plasma 5 installation 1y+ old.
If it will be helpful here are the old and new configs just in case:
new: https://pastebin.com/aBd0Wwzb
old: https://pastebin.com/wR00YU1F