Bug 477916 - Black screen after switching VT
Summary: Black screen after switching VT
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.90.0
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-12-02 15:29 UTC by hexchain
Modified: 2024-02-20 20:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.11
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hexchain 2023-12-02 15:29:44 UTC
SUMMARY
KWin sometimes shows a black screen (or fades into black from the desktop), with only a mouse cursor, after switching back from another VT/user session. The mouse cursor seems to be still reactive to what's under it, but the screen is black. It seems that triggering DPMS to turn off and on the screen (kscreen-doctor -d off) can rescue KWin from this situation.

It usually happens when invoking the "Switch User" action from KRunner, logging in to another user, and then switching back. Using the Switch User button from Kickoff may also trigger this issue, but seems to be less frequent.

According to reports in the KWin matrix room, it doesn't seem to be limited to Wayland: https://matrix.to/#/!xdwRmYgjAuZSEhsheE:kde.org/$WilUfLA1WHQJ5rbCuIaq0c8kHO8edGUSxqrIf6Eymf4?via=libera.chat&via=matrix.org&via=kde.org

STEPS TO REPRODUCE
1. Switch to another user session
2. Switch back

OBSERVED RESULT
The screen is black or starts to fade into black.

EXPECTED RESULT
The screen should not be black.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Graphics Platform: Wayland
Comment 1 Jakob Petsovits 2024-02-20 19:41:19 UTC
Git commit 9e3e5675924c9b9772693717f4e2b80d0ff394bd by Jakob Petsovits.
Committed on 20/02/2024 at 19:29.
Pushed by jpetso into branch 'master'.

backends/drm: Undo fade-out effect upon unsuccessful DPMS Off

DrmOutput::setDrmDpmsMode() already takes care of reverting any
pending output pipeline changes, but the aboutToTurnOff signal from
setDpmsMode() needs an explicit wakeUp signal to cancel it out.
Related: bug 481520

M  +4    -1    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/9e3e5675924c9b9772693717f4e2b80d0ff394bd
Comment 2 Jakob Petsovits 2024-02-20 19:59:44 UTC
Git commit d062ce8750a9fde7973d3457ca5915469925a0e4 by Jakob Petsovits.
Committed on 20/02/2024 at 19:43.
Pushed by jpetso into branch 'Plasma/6.0'.

backends/drm: Undo fade-out effect upon unsuccessful DPMS Off

DrmOutput::setDrmDpmsMode() already takes care of reverting any
pending output pipeline changes, but the aboutToTurnOff signal from
setDpmsMode() needs an explicit wakeUp signal to cancel it out.
Related: bug 481520


(cherry picked from commit 9e3e5675924c9b9772693717f4e2b80d0ff394bd)

M  +4    -1    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/d062ce8750a9fde7973d3457ca5915469925a0e4
Comment 3 Jakob Petsovits 2024-02-20 20:11:06 UTC
Git commit 26d36b9ac2414adfba344fa16a268976adb7728d by Jakob Petsovits.
Committed on 20/02/2024 at 19:45.
Pushed by jpetso into branch 'Plasma/5.27'.

backends/drm: Undo fade-out effect upon unsuccessful DPMS Off

DrmOutput::setDrmDpmsMode() already takes care of reverting any
pending output pipeline changes, but the aboutToTurnOff signal from
setDpmsMode() needs an explicit wakeUp signal to cancel it out.
Related: bug 481520


(cherry picked from commit 9e3e5675924c9b9772693717f4e2b80d0ff394bd)

M  +4    -1    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/26d36b9ac2414adfba344fa16a268976adb7728d