Bug 502542 - press keyboard make screen still flicker when black screen
Summary: press keyboard make screen still flicker when black screen
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: 6.3.4
Platform: Arch Linux All
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2025-04-08 03:21 UTC by 448311217
Modified: 2025-04-12 00:38 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 448311217 2025-04-08 03:21:05 UTC
SUMMARY

```kinfo
Operating System: Arch Linux
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.9.0
Kernel Version: 6.12.21-1-lts (64-bit)
Graphics Platform: offscreen
Processors: 4 × Intel® Core™ i5-5200U CPU @ 2.20GHz
Memory: 15.3 GiB of RAM
```
Nvidia old driver 525.147.05-6, after screen black, and press keyboard to wake up it, screen will still flicker a few seconds.

STEPS TO REPRODUCE

1. waiting for screen black and then wait 1 minute(or "Win+L" lock screen, and press ESC to close screen, then wait 1minute).
2. press any keyboard key.
3. show this bug.

OBSERVED RESULT

screen was still flicker, 
`jounalctl -f` show this:
```
Apr 08 10:46:34 archlinux kwin_wayland[799]: kwin_wayland_drm: Bad link status detected on connector eDP-1
Apr 08 10:46:35 archlinux kwin_wayland[799]: kwin_wayland_drm: atomic commit failed: Invalid argument
Apr 08 10:47:03 archlinux systemd[1]: dbus-:1.2-org.kde.powerdevil.backlighthelper@16.service: Deactivated successfully.
```
Here is the full log of `sudo journalctl -b`: <https://fars.ee/y8h_>

EXPECTED RESULT

Screen show SDDM login interface.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
On linux kernel 6.1.129-1, will not reproduce this bug.
And can reproduce it on: 6.6.85-1, 6.13.8.arch1-1.
Comment 1 Bug Janitor Service 2025-04-08 14:44:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7464
Comment 2 Zamundaaa 2025-04-08 21:44:44 UTC
Git commit 6d8f78b2c579cada21e795a9c386068dd0168ac8 by Xaver Hugl.
Committed on 08/04/2025 at 14:43.
Pushed by zamundaaa into branch 'master'.

backends/drm: immediately force a modeset on bad link status

In the past this happened automatically, as we did an atomic modeset test in
DrmGpu::updateOutputs, but now we need to do it explicitly.

M  +3    -1    src/backends/drm/drm_gpu.cpp

https://invent.kde.org/plasma/kwin/-/commit/6d8f78b2c579cada21e795a9c386068dd0168ac8
Comment 3 Vlad Zahorodnii 2025-04-09 05:40:50 UTC
Git commit 3dcc4daca4b2eb5cb2884d50600cc9595072e9db by Vlad Zahorodnii, on behalf of Xaver Hugl.
Committed on 09/04/2025 at 05:24.
Pushed by vladz into branch 'Plasma/6.3'.

backends/drm: immediately force a modeset on bad link status

In the past this happened automatically, as we did an atomic modeset test in
DrmGpu::updateOutputs, but now we need to do it explicitly.


(cherry picked from commit 6d8f78b2c579cada21e795a9c386068dd0168ac8)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +3    -1    src/backends/drm/drm_gpu.cpp

https://invent.kde.org/plasma/kwin/-/commit/3dcc4daca4b2eb5cb2884d50600cc9595072e9db