Bug 513151 - Computer freezes immediately before the screen entering in power saving mode
Summary: Computer freezes immediately before the screen entering in power saving mode
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 6.5.4
Platform: Arch Linux Linux
: VHI major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 513188 513226 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-12-10 01:30 UTC by Patrick Silva
Modified: 2025-12-13 14:24 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.5.5
Sentry Crash Report:


Attachments
journal log (509.60 KB, text/plain)
2025-12-10 01:30 UTC, Patrick Silva
Details
drm-debug log (516.31 KB, text/plain)
2025-12-10 17:40 UTC, Patrick Silva
Details
systemctl (118.20 KB, text/plain)
2025-12-10 23:00 UTC, papajoke
Details
CachyOS log of 2025-12-11. (100.87 KB, text/x-log)
2025-12-11 17:52 UTC, Chema
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2025-12-10 01:30:17 UTC
Created attachment 187478 [details]
journal log

SUMMARY
Since update to Plasma 6.5.4, sometimes my computer freezes completely (I can't even move the mouse cursor) immediately before the screen enters in power saving mode. The screen dims partially and then the computer freezes completely and I need to force reboot
.
The journal log says this when the computer freezes:
kwin_wayland[1119]: atomic commit failed: Invalid argument

I use a single screen with intel iGPU.
I'm attaching the full journal log.

STEPS TO REPRODUCE
1. set the screen to automatically turn off after timeout
2. wait until the timeout is reached
3. 

OBSERVED RESULT
sometimes computer freezes immediately before the screen entering in power saving mode

EXPECTED RESULT
the observed result should not occur

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.17.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4790 CPU @ 3.60GHz
Memory: 32 GiB of RAM (31,2 GiB usable)
Graphics Processor: Intel® HD Graphics 4600
Comment 1 Nate Graham 2025-12-10 16:25:57 UTC
This is Bug 512511, which I thought was master-only.

We'll investigate and backport the fix if needed. Thanks for reporting it!

*** This bug has been marked as a duplicate of bug 512511 ***
Comment 2 Zamundaaa 2025-12-10 16:31:51 UTC
Let's look at what exactly is happening first. The warnings look a bit different at least, there's no EBUSY here:
> dez 09 21:55:19 Arch-PC kwin_wayland[1119]: Atomic modeset test failed! Invalid argument
> dez 09 21:55:19 Arch-PC kwin_wayland[1119]: Setting dpms mode failed!

Please get a drm debug log of the situation: https://invent.kde.org/plasma/kwin/-/wikis/Debugging/Debugging-DRM-issues
Comment 3 Patrick Silva 2025-12-10 17:40:53 UTC
Created attachment 187497 [details]
drm-debug log

It just happened again. The computer froze completely when Plasma tried to turn the screen off after playing a video in youtube
with Firefox 145. drm-debug log attached.
Comment 4 TLGA 2025-12-10 18:52:25 UTC
I'm having the exact same issue on Plasma 6.5.4, didn't occur on 6.5.3 and it doesn't happen anymore since I reverted my system back to 6.5.3 so it seems to be specific to this version.

For me it's not linked to the system entering power saving mode or anything as I disabled it entirely but it happened when the screen locks itself automatically after some time. I would say it happened about half the time Plasma tried to lock the screen.

I have the same "Atomic modeset test failed! Invalid argument" in my logs but not the "Setting dpms mode failed!". 
I'm also using Firefox to play YouTube video so there may be a link there.
Comment 5 Zamundaaa 2025-12-10 19:31:28 UTC
This is the entire section from one of the failing atomic tests:
[20772.926973] i915 0000:00:02.0: [drm:drm_ioctl] comm="kwin_wayland" pid=1082, dev=0xe201, auth=1, DRM_IOCTL_MODE_ATOMIC
[20772.926984] i915 0000:00:02.0: [drm:drm_atomic_state_init] Allocated atomic state 000000001f7f4c60
[20772.926992] i915 0000:00:02.0: [drm:drm_atomic_get_plane_state] Added [PLANE:38:sprite A] 000000008b2a04a1 state to 000000001f7f4c60
[20772.926997] i915 0000:00:02.0: [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:38:sprite A] state 000000008b2a04a1
[20772.927003] [drm:drm_mode_object_get] OBJ ID: 109 (3)
[20772.927008] [drm:drm_mode_object_get] OBJ ID: 109 (4)
[20772.927011] i915 0000:00:02.0: [drm:drm_atomic_get_plane_state] Added [PLANE:44:cursor A] 00000000af9d8963 state to 000000001f7f4c60
[20772.927017] [drm:drm_mode_object_get] OBJ ID: 115 (2)
[20772.927020] [drm:drm_mode_object_get] OBJ ID: 116 (4)
[20772.927023] [drm:drm_mode_object_get] OBJ ID: 116 (5)
[20772.927026] [drm:drm_mode_object_get] OBJ ID: 116 (6)
[20772.927029] i915 0000:00:02.0: [drm:drm_atomic_get_crtc_state] Added [CRTC:49:pipe A] 00000000c01439e5 state to 000000001f7f4c60
[20772.927034] i915 0000:00:02.0: [drm:drm_atomic_state_default_clear] Clearing atomic state 000000001f7f4c60
[20772.927039] [drm:drm_mode_object_put.part.0] OBJ ID: 115 (3)
[20772.927043] [drm:drm_mode_object_put.part.0] OBJ ID: 116 (7)
[20772.927046] [drm:drm_mode_object_put.part.0] OBJ ID: 116 (6)
[20772.927048] [drm:drm_mode_object_put.part.0] OBJ ID: 116 (5)
[20772.927052] [drm:drm_mode_object_put.part.0] OBJ ID: 109 (5)
[20772.927055] [drm:drm_mode_object_put.part.0] OBJ ID: 109 (4)
[20772.927059] i915 0000:00:02.0: [drm:__drm_atomic_state_free] Freeing atomic state 000000001f7f4c60
[20772.927064] i915 0000:00:02.0: [drm:drm_ioctl] comm="kwin_wayland", pid=1082, ret=-22


...which is unfortunately completely useless, the driver doesn't log why it fails the commit.

If it's new with 6.5.4 and happens pretty consistently, can you bisect?
Comment 6 papajoke 2025-12-10 22:36:58 UTC
Same error as soon as the screen dims, stuck at about 50% brightness.
screen and keyborad frozen
linux is not completely frozen because the file server is still working.

These two lines are repeated 100 times :

Dec. 10 11:14:15 bmax kwin_wayland[633]: atomic commit failed: Invalid argument  ## THE FIRST AND INIQUE
Dec. 10 11:14:28 bmax kwin_wayland[633]: Atomic modeset test failed! Invalid argument
Dec. 10 11:14:28 bmax kwin_wayland[633]: Setting dpms mode failed!
Dec. 10 11:14:28 bmax kwin_wayland[633]: Atomic modeset test failed! Invalid argument
Dec. 10 11:14:28 bmax kwin_wayland[633]: Setting dpms mode failed!...

Dec. 10 11:55:24 bmax kwin_wayland[633]: Setting dpms mode failed!
Dec. 10 11:55:24 bmax kwin_wayland[633]: Atomic modeset test failed! Invalid argument



archlinux, since new 6.5.4
wayland, pcu: intel M100 with Intel Alder Lake-N driver: i915, no gpu
Comment 7 papajoke 2025-12-10 23:00:17 UTC
Created attachment 187510 [details]
systemctl
Comment 8 Potomac 2025-12-11 00:46:37 UTC
I have a similar problem :

I use Arch Linux, Plasma 6.5.4-1, AMD Radeon RX7600 graphic card :

- randomly when the screen enter to standby mode then I can not exit standby mode, I have to unplug the HDMI cable and plug back in order to have to exit the standby mode,

when the bug occurs I can read this message on journalctl :

Le bug est confirmé :
https://bugs.kde.org/show_bug.cgi?id=512511

dans journalctl je peux voir le message quand le bug se produit :

kwin_wayland[1662]: Atomic modeset test failed! Argument invalide
Comment 9 Belanthiel 2025-12-11 16:42:18 UTC
Same issue here using CachyOS (Arch) 

Prior to the upgrade to KDE 6.5.4 sleep worked flawlessly, but since the upgrade if I allow the OS to turn off the screen I am unable to bring the screen back up.  This includes trying to bring up a TTY, so the only way to recover is a forced reset.  Have disabled sleep and turn off screen till we get a solution to this.

KDE Plasma 6.5.4
KDE Framework 6.20
Wayland
Kernel 6.18
Intel Core i9-10850k @5.2GHz
32 gigs ram
AMD RX 6900XT GPU
Comment 10 Chema 2025-12-11 17:51:49 UTC
I have the same problem in CachyOS, although with this error message in PowerDevil:

11/12/25 17:58	org_kde_powerdevil	Error detecting VCP version using VCP feature xDF: Error_Info[EIO in ddc_write_read_with_retry, causes: DDCRC_READ_ALL_ZERO, DDCRC_DDC_DATA(2), EIO]
11/12/25 17:58	org_kde_powerdevil	[  1535] Error detecting VCP version using VCP feature xDF: Error_Info[EIO in ddc_write_read_with_retry, causes: DDCRC_READ_ALL_ZERO, DDCRC_DDC_DATA(2), EIO]

I will upload the log in the next post (Log_2025-12-11.log).

Here are my system details:

Operating System: CachyOS Linux 
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.18.0-5-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 8845HS w/ Radeon 780M Graphics
Memory: 64 GiB of RAM (59,7 GiB usable)
Graphics Processor: AMD Radeon 780M Graphics
Manufacturer: GMKtec
Product Name: NucBox K8 Plus
Comment 11 Chema 2025-12-11 17:52:03 UTC
Created attachment 187530 [details]
CachyOS log of 2025-12-11.
Comment 12 Chema 2025-12-11 17:56:25 UTC
*** Bug 513226 has been marked as a duplicate of this bug. ***
Comment 13 Chema 2025-12-11 18:29:24 UTC
Just to clarify something about this problem, because I think I misunderstood it. The problem doesn't occur when it tries to enter sleep mode, but rather as soon as the screen automatically dims. As soon as the screen enters that state, the system stops responding (or at least the screen does). The keyboard remains active; I can toggle the Caps Lock key on and off, but the screen no longer reacts, and the system doesn't go into sleep mode by double-pressing the power button. The only option is to restart.
Comment 14 Canoe 2025-12-11 19:28:58 UTC
Confirmed, this is an issue with the point at which the screen tries to go into lock mode and dims first. The dim hangs half way, and then the display looks frozen until it's power cycled, at which point it comes back to a bright lock screen. 

Operating System: EndeavourOS 
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.17.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 64 GiB of RAM (62.4 GiB usable)
Graphics Processor: AMD Radeon RX 9070 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X670 GAMING X AX
Comment 15 Chema 2025-12-11 21:50:19 UTC
I've verified that the problem also occurs when the screen automatically turns off (I tried disabling automatic screen dimming and leaving only automatic shutdown enabled, and the same issue persisted). Therefore, it seems to be happening in two situations:

- When the screen automatically dims.

- When the screen automatically turns off.

Nate, please, when you find a solution to this, don't wait until KDE 6.5.5 to fix it. We can't keep working like this for a month until the new version is released. Please release a hotfix that includes the affected packages.
Comment 16 Belanthiel 2025-12-12 02:20:48 UTC
Wanted to add  that several users are reporting that they have 'fixed' this issue by reverting (only) Kwin to the previous version.
Comment 17 AMM 2025-12-12 06:30:14 UTC
Confirming that this issue happens with me too.
Downgrading to Kwin 6.5.3 works (keeping other packages on 6.5.4)
Issue is now widespread so hope that this will be taken up on priority.

Using Arch Linux
Comment 18 Matteo Hausner 2025-12-12 09:17:35 UTC
The issue can also be triggered (sometimes) while the lock screen is active and the ESC key is pressed.
Comment 19 shira 2025-12-12 12:04:14 UTC
Seems like this doesn't occur every single time the screen dims, sometimes it freezes and sometimes it doesn't.
Comment 20 Chema 2025-12-12 13:00:13 UTC
I just installed the new version KWin 6.5.4-2.1, which was recently released, and it seems to have solved the problem, at least in my case. I'm waiting for confirmation from other users.
Comment 21 Zamundaaa 2025-12-12 13:43:11 UTC
*** Bug 511118 has been marked as a duplicate of this bug. ***
Comment 22 Bug Janitor Service 2025-12-12 13:43:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8560
Comment 23 Zamundaaa 2025-12-12 13:50:26 UTC
*** Bug 513188 has been marked as a duplicate of this bug. ***
Comment 24 Matteo Hausner 2025-12-12 13:54:33 UTC
(In reply to Chema from comment #20)
> I just installed the new version KWin 6.5.4-2.1, which was recently
> released, and it seems to have solved the problem, at least in my case. I'm
> waiting for confirmation from other users.

I also just updated kwin (6.5.4-1 -> 6.5.4-2) on Arch, and the problem seems to be gone.
Thanks!
Comment 25 Bug Janitor Service 2025-12-12 14:16:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8562
Comment 26 Zamundaaa 2025-12-12 15:01:27 UTC
Git commit 30a7f52841dd1c449965d0c9d5cd4915697ab129 by Xaver Hugl.
Committed on 12/12/2025 at 13:59.
Pushed by zamundaaa into branch 'master'.

core/sessions: don't take ownership of an fd that Qt will close

QDBusUnixFileDescriptor closes the file descriptor in its destructor, if we
want to take ownership of it, we need to duplicate the file descriptor.
If we don't duplicate it, but directly take "ownership" of the file descriptor,
the following sequence of events can happen:

1. ~QDBusUnixFileDescriptor closes file descriptor A
2. some new fd B is allocated, which happens to have the same handle as fd A
3. ~FileDescriptor closes fd A, but it has the same handle as fd, so it actually
   closes fd B!
4. whenever fd B is used, we run into problems

To make such issues easier to debug in the future, this also adds debug logging
for when closing a file descriptor fails.

M  +1    -1    src/core/session_consolekit.cpp
M  +1    -1    src/core/session_logind.cpp
M  +19   -3    src/utils/filedescriptor.cpp

https://invent.kde.org/plasma/kwin/-/commit/30a7f52841dd1c449965d0c9d5cd4915697ab129
Comment 27 Zamundaaa 2025-12-12 15:02:34 UTC
Git commit ef4504320de2c3a7c7aebcf083d75db361f802ae by Xaver Hugl.
Committed on 12/12/2025 at 14:11.
Pushed by zamundaaa into branch 'Plasma/6.5'.

core/sessions: don't take ownership of an fd that Qt will close

QDBusUnixFileDescriptor closes the file descriptor in its destructor, if we
want to take ownership of it, we need to duplicate the file descriptor.
If we don't duplicate it, but directly take "ownership" of the file descriptor,
the following sequence of events can happen:

1. ~QDBusUnixFileDescriptor closes file descriptor A
2. some new fd B is allocated, which happens to have the same handle as fd A
3. ~FileDescriptor closes fd A, but it has the same handle as fd, so it actually
   closes fd B!
4. whenever fd B is used, we run into problems

To make such issues easier to debug in the future, this also adds debug logging
for when closing a file descriptor fails.
(cherry picked from commit 30a7f52841dd1c449965d0c9d5cd4915697ab129)

M  +1    -1    src/core/session_consolekit.cpp
M  +1    -1    src/core/session_logind.cpp
M  +19   -3    src/utils/filedescriptor.cpp

https://invent.kde.org/plasma/kwin/-/commit/ef4504320de2c3a7c7aebcf083d75db361f802ae
Comment 28 Zamundaaa 2025-12-12 15:07:33 UTC
The commit will only be in Plasma 6.5.5, but I sent an email requesting distributions to backport it immediately as well.
Comment 29 immerohnegott 2025-12-12 15:21:02 UTC
(In reply to Chema from comment #20)
> I just installed the new version KWin 6.5.4-2.1, which was recently
> released, and it seems to have solved the problem, at least in my case. I'm
> waiting for confirmation from other users.

I just installed the updated package on Arch and switched back to Wayland. This appears to have resolved the issue.
Comment 30 Belanthiel 2025-12-12 20:59:51 UTC
Installed the updated kwin 6.5.4-2.1 and it does allow the PC to wake from sleep now.  It does not however allow the video to recover if I set KDE to dim and then turn off the monitor.  I have to unplug the HDMI to regain video (6900XT) when this happens.  Till this is resolved I have disabled both dim and turn off monitor in KDE settings.
Comment 31 Perfect Gentleman 2025-12-13 05:09:37 UTC
I've set "Turn off screen" to "Never" so far it's okay.
Comment 32 Belanthiel 2025-12-13 07:09:23 UTC
With kwin 6.5.4-3.1 everything seems to be working well again.  Will let it sleep tonight with dim, and turn screen off enabled.