Bug 506359

Summary: after overnight screen lock, no outputs or inputs after turning on display
Product: [Plasma] kwin Reporter: andy <andy>
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 6.3.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description andy 2025-06-29 19:04:58 UTC
SUMMARY
My setup has a gpu with a single 4k output screen (LG TV) via HDMI 2.1. At night I lock the session and turn off the screen. In the morning, when I turn on the TV again, usually it says no signal. A partial workaround seems to be Ctrl+Alt+F2 then Ctrl+Alt+F1. But in addition sometimes after this I have no keyboard/mouse input. The TV sees the signal that is my black desktop background, but mouse/keyboard does nothing. So if I go and unplug/replug my USB inputs, I hear the disconnect sound and reconnect sound from plasma, and then the inputs work.

STEPS TO REPRODUCE
1. Lock screen and turn off monitor at night
2. In the morning turn on the screen and note if it says "no signal"
3. Perform Ctrl+Alt+F2 and then Ctrl+Alt+F1. Note if there is now a signal
4. Try to use mouse and keyboard to unlock the session. Note if there is no keyboard/mouse input
5. Unplug USB input devices. Note if there is a disconnect sound played by plasma.
6. Re-plug USB input devices. Note if there is a connect sound played by plasma.
7. Try logging in now

OBSERVED RESULT
- no signal when turning on the screen
- get a signal after changing virtual terminals
    - at least half of the time, after this I can log in now
- (less than half the time) no keyboard/mouse input after changing virtual terminals back to plasma
- hear the disconnect/reconnect sounds
- mouse and keyboard work after disconnect/reconnect and I can unlock the session

When I lock my screen and turn it off at night, the journal shows many apps logging messages like
- qt.qpa.wayland: There are no outputs - creating placeholder screen
- qt.qpa.wayland: Creating a fake screen in order for Qt not to crash

In the morning I also see the same messages (not sure if before or after switching virtual terminals,
 but I see them e.g. 37 seconds before I unplugged USBs or the first kernel USB disconnect messages).


EXPECTED RESULT
- Ctrl+Alt+F2 and Ctrl+Alt+F1 ideally would not be required for the TV to detect an HDMI signal
- Mouse/keyboard should not be blocked. They definitely work otherwise per the virtual terminal change and even have the plasma disconnect sound.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch linux 6.15.2-arch-1
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Comment 1 andy 2025-06-30 03:17:43 UTC
Also worth noting, locking screen and turning off monitor for only an hour, when I come back I don't have to do Ctrl+Alt+F2 / F1 and any USB shenanigans. It seems to always be when I leave it overnight.

My Power Management settings are:
- When inactive: Do nothing
- Dim automatically: Never
- Turn off screen: Never
- Switch to power profile: Leave unchanged
Comment 2 andy 2025-06-30 17:34:08 UTC
Last night did a `systemctl --user restart plasma-powerdevil.service` before locking screen and turning it off. This morning had both HDMI signal and mouse/keyboard input.