Bug 486068

Summary: Fails to revert to laptop monitor after sleeping while connected to external monitor
Product: [Plasma] kwin Reporter: ssamot
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: xaver.hugl
Priority: NOR Keywords: multiscreen
Version First Reported In: 6.0.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description ssamot 2024-04-24 11:58:30 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY


STEPS TO REPRODUCE
1.  Connect the computer to an external monitor
2.  Let it sleep 
3.  Disconnect the usb-c cable connecting it to the external monitor

OBSERVED RESULT

Computer seems to be working, but the screen is black and there is no way to access it you do a hard reset. 

EXPECTED RESULT
Locked screen waiting for password

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  Endeavour OS
(available in About System)
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0 
Qt Version: 6.7.0

ADDITIONAL INFORMATION
Comment 1 Zamundaaa 2024-04-24 13:50:19 UTC
Is this on Wayland or Xorg?
Comment 2 ssamot 2024-04-24 14:21:02 UTC
(In reply to Zamundaaa from comment #1)
> Is this on Wayland or Xorg?

Wayland
Comment 3 Zamundaaa 2024-04-24 15:03:28 UTC
okay. Do you still see the cursor? Also, if you disable the lock screen, does that change anything?
Comment 4 ssamot 2024-04-24 17:28:33 UTC
Thanks for the guidance. 

After resetting some settings (basically changing the time it needs to get to sleep) and trying to do this manually (i.e. lock screen and get it to sleep, than unplug), everything worked fine for as many times as I've tried plugging and unplugging, no matter how awkward the scenario. 

When the the problem happened there was no cursor, the only way I could tell that the laptop was up was pressing buttons (caps lock, fn keys) which seemed to work , and my bluetooth headphones would connect and disconnect normally. 

My suspension now is that this has something to do not with sleeping, but with the "turn off screen".  I'll try that now and get back to you.
Comment 5 ssamot 2024-04-26 09:47:35 UTC
Hello again -- I am really sorry,  I can't force it to replicate. I am not sure if this has to to with all the settings I've reseted trying to get this to break (rebooted, changed the sleep timings, changed the  default theme), but I can disconnect just fine. What happens is that the screen goes dark for a tiny bit and then reverts to normal. The problem I had was that it would stay black. 

I'll get back to this if happens again "naturally".