Bug 513346

Summary: KWin freezes when interrupting screen-off dimming process when using a script on AMD 7840HS platform
Product: [Plasma] kwin Reporter: Li Jiajun <wlmqljj>
Component: platform-drmAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: xaver.hugl
Priority: NOR    
Version First Reported In: 6.5.4   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Logs (from journalctl -b -0)

Description Li Jiajun 2025-12-14 08:15:49 UTC
SUMMARY
I used a script to turn off the screen, which previously worked without issues. The script is as follows:

#!/bin/sh
/bin/sleep 1 && /bin/dbus-send --session --print-reply --dest=org.kde.kglobalaccel /component/org_kde_powerdevil org.kde.kglobalaccel.Component.invokeShortcut string:'Turn Off Screen'

However, I discovered that if I run this script in Konsole and interrupt it by touching the touchpad while the screen is dimming, KWin throws errors and freezes. After the system enters S0ix sleep and wakes up, KWin recovers. Checking the journal reveals a large number of repeated errors.

STEPS TO REPRODUCE
1. Run the script in Konsole.
2. Interrupt the process by touching the touchpad while the screen is dimming.
3. KWin freezes and throws errors.

OBSERVED RESULT
KWin freezes and throws repeated errors. Below is a sample of the log:
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Failed to find a working output layer configuration! Enabled layers:
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: src QRectF(0,0 2880x1800) -> dst QRect(0,0 2880x1800)
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Atomic modeset test failed! Invalid parameters
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Atomic modeset test failed! Invalid parameters
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Atomic modeset test failed! Invalid parameters
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: atomic commit failed: Invalid parameters
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: drmPrimeFDToHandle() failed
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Failed to create framebuffer: Wrong file descriptor
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Rendering a layer failed!
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Failed to find a working output layer configuration! Enabled layers:
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: src QRectF(0,0 2880x1800) -> dst QRect(0,0 2880x1800)
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: src QRectF(0,0 256x256) -> dst QRect(845,1089 256x256)
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: drmPrimeFDToHandle() failed
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Failed to create framebuffer: Wrong file descriptor
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Rendering a layer failed!
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: Failed to find a working output layer configuration! Enabled layers:
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: src QRectF(0,0 2880x1800) -> dst QRect(0,0 2880x1800)
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: src QRectF(0,0 256x256) -> dst QRect(845,1089 256x256)
12/14 15:36:01 wlmqljj-wujie14pro kwin_wayland[1194]: drmPrimeFDToHandle() failed
And these logs repeats again and again...

EXPECTED RESULT
KWin should not freeze when the dimming process is interrupted by user input.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.12.61-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
Memory: 16 GiB of RAM (14.8 GiB usable)
Graphics Processor: AMD Radeon 780M Graphics

ADDITIONAL INFORMATION
Full log attached (ZH-CN, filltered)
Comment 1 Li Jiajun 2025-12-14 08:18:44 UTC
Created attachment 187623 [details]
Logs (from journalctl -b -0)
Comment 2 Zamundaaa 2025-12-15 12:09:21 UTC

*** This bug has been marked as a duplicate of bug 513151 ***