Bug 508959 - desktop freezes if switched into sleep mode
Summary: desktop freezes if switched into sleep mode
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.4.4
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-31 08:58 UTC by Ayon
Modified: 2025-09-27 03:20 UTC (History)
3 users (show)

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


Attachments
plasmashell log file (53.10 KB, text/x-log)
2025-08-31 08:58 UTC, Ayon
Details
ai generated script (1.78 KB, application/x-shellscript)
2025-09-26 17:02 UTC, Ayon
Details
journal after resume (614.78 KB, text/x-log)
2025-09-26 17:03 UTC, Ayon
Details
journal current boot (613.98 KB, text/x-log)
2025-09-26 17:04 UTC, Ayon
Details
journal previous boot (459.81 KB, text/x-log)
2025-09-26 17:04 UTC, Ayon
Details
lsmod (8.39 KB, text/x-log)
2025-09-26 17:05 UTC, Ayon
Details
mem sleep status (14 bytes, text/plain)
2025-09-26 17:05 UTC, Ayon
Details
power state (16 bytes, text/plain)
2025-09-26 17:06 UTC, Ayon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ayon 2025-08-31 08:58:52 UTC
Created attachment 184598 [details]
plasmashell log file

SUMMARY
In a fresh installed system with KDE Plasma, Power Management suspends the session and switches to sleep mode by default. And, that freezes my Desktop completely not even the power switch works at that moment let alone mouse or keyboard. So, I had to unplug the whole computer from the socket. Same thing happens if I switch to sleep mode manually. Inside the casing all of the fans runs normally and the screen stays turned off.

STEPS TO REPRODUCE
1. Switch to Sleep Mode
2. Face the Error

OBSERVED RESULT
Desktop Freezes and no button or switches work if switched to sleep mode

EXPECTED RESULT
To go into sleep mode without any interruption and the fans should not run

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.12.43-1-lts (64-bit)
Graphics Platform: Wayland
Processors: 16 × 13th Gen Intel® Core™ i5-13400F
Memory: 16 GiB of RAM (15.4 GiB usable)
Graphics Processor: Intel® Arc

ADDITIONAL INFORMATION
I have been facing this issue for quite a long time. When I was on Windows it worked fine. Also, hibernation works on my system if I configured it that way. And, sorry for not being able get crash reports.
Comment 1 Filip 2025-09-01 08:54:26 UTC
Does it freeze when there are no open apps?

I can reproduce this when trying to sleep when some app is open, Brave Browser for example (Sleeps fine when Dolphin is open). The screen goes black but it freezes I guess. I need to shutdown via the power button.
When I go to sleep with no open apps it sleeps correctly.

I also tried Plasma compiled from master (not sure when it was fixed and if it will be released in 6.4.x or 6.5)  and I didn't have any issues there so it might be fixed.
Comment 2 Ayon 2025-09-01 15:33:46 UTC
(In reply to Filip from comment #1)
> Does it freeze when there are no open apps?
Yes, just confirmed a few moment ago

> When I go to sleep with no open apps it sleeps correctly.
I wish mine did too, I always face black screen void

> it might be fixed.
Hopefully, works on my machine too. I have been facing this issue for quite a long time now
Comment 3 TraceyC 2025-09-03 16:09:53 UTC
We need to determine if plasmashell crashed or it / kwin just hung. if something crashed, there will be a coredump, and need a backtrace of it so we can figure out what's going on. Can you please attach a backtrace of the crash using the coredumpctl command-line program, as detailed in https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl ?

Let us know if there are no coredumps from the date of the last freeze / crash. Thanks!
Comment 4 Ayon 2025-09-04 05:57:48 UTC
(In reply to TraceyC from comment #3)
> using the coredumpctl command-line program, as detailed in 
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl

I used sudo coredumpctl --reverse but it says, No coredumps found. How else can I help?
Comment 5 TraceyC 2025-09-04 19:26:55 UTC
Thanks for confirming there are no coredumps. That means there isn't a crash, but something froze, probably kwin

Can you check kwin's logs when the hard freeze occurs? If you can't get to a TTY, you might have to ssh to your machine to do this:

  journalctl --boot --user-unit plasma-kwin_wayland > ~/log.txt

Also, is there any chance that you could retrieve kwin's backtrace when the
hard freeze occurs? You would need to ssh from another computer and attach a debugger to kwin process, e.g.

  sudo gdb -p $(pidof kwin_wayland)

then type

  bt

and paste the output here

Thanks!
Comment 6 Ayon 2025-09-05 02:59:59 UTC
(In reply to TraceyC from comment #5)
I do not have any other computer so I tried to use Termux from my phone to ssh into my desktop when it freezes. But sadly, when the desktop freezes the ssh connection also freezes. And if I try to reconnect after disconnecting, it says timeout after a long period of waiting.
Comment 7 Filip 2025-09-09 07:53:33 UTC
I can't reproduce the issue anymore on my PC after the system update. Ayon can you check if it got resolved for you?
Comment 8 Ayon 2025-09-09 08:25:08 UTC
(In reply to Filip from comment #7)
> I can't reproduce the issue anymore on my PC after the system update. Ayon

That's amazing!

> can you check if it got resolved for you?

Sadly, It didn't
Comment 9 Bug Janitor Service 2025-09-24 03:47:15 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 10 TraceyC 2025-09-24 16:38:00 UTC
Ayon, you might be able to get more information for the kwin developers with some debug logging.

After logging in, export this environment variable:

export QT_LOGGING_RULES="kwin_*.debug=true"

Then, allow the system to sleep to reproduce the freeze. After you're able to log back in, attach the following file to this report:

~/.local/share/sddm/wayland-session.log

Thanks.
Comment 11 Ayon 2025-09-24 17:45:32 UTC
(In reply to TraceyC from comment #10)
> ~/.local/share/sddm/wayland-session.log
I am currently dual booting Windows and Ubuntu 25.04. A few moment ago I installed `kde-plasma-desktop` and tried to reproduce the issue and it is there. And I did not have sddm as my display manager, I had to change that too. But, sadly after doing all these I got an empty `wayland-session.log` file. Let me know if anything else needed. 

One thing I should mention that, I don't really think the problem is not KDE Plasma specific, even though I never really used other DE but in GNOME, they did not even give the option to go into sleep mode. I was only able to switch to sleep mode on Windows where it works fine.
Comment 12 TraceyC 2025-09-25 16:02:01 UTC
(In reply to Ayon from comment #11)
> I am currently dual booting Windows and Ubuntu 25.04. A few moment ago I
> installed `kde-plasma-desktop` and tried to reproduce the issue and it is
> there. And I did not have sddm as my display manager, I had to change that
> too. But, sadly after doing all these I got an empty `wayland-session.log`
> file. Let me know if anything else needed. 

Honestly, the problem may be due to the system state. Distros like Kubuntu ensure that all the needed dependencies are installed for the Plasma desktop. If you install those packages yourself, we can't be sure of the system state. You become the maintainer of your Plasma desktop, rather than Ubuntu or KDE.

This is also a different system than the one originally being used, which was Arch. Are you able to get the logs from that system, or another system with a distro provided Plasma install? If we can't get logs from a system with a stable Plasma install, I'm afraid there isn't much we can do.
Comment 13 Ayon 2025-09-26 04:14:27 UTC
(In reply to TraceyC from comment #12)
> Distros like Kubuntu ensure that all the needed dependencies are installed 
> for the Plasma desktop. If you install those packages yourself, we can't
> be sure of the system state. You become the maintainer of your Plasma desktop, 
> rather than Ubuntu or KDE.

Probably, I can switch distros or even single boot if dual boot is not an option. I would like to know which distro will suit the best. A distro that is actively maintained by KDE? I visited the website it was showing Fedora KDE, Kubuntu and few others. Let me know which one I should use.
Comment 14 TraceyC 2025-09-26 15:48:14 UTC
If you're just wanting to test this bug, installing KDE Neon Testing in a VM is a good path forward.

If you want a distro to be your daily driver, KDE Neon user or Fedora are solid choices that offer easy ways to get debug packages installed.
Comment 15 Ayon 2025-09-26 16:48:56 UTC
(In reply to TraceyC from comment #14)
> If you want a distro to be your daily driver, KDE Neon user or Fedora are
> solid choices that offer easy ways to get debug packages installed.
Sorry to disappoint, but in Fedora KDE it didn't even generate any empty file. What I have tried is, first to insert the following line in .bashrc, I also tried just exporting directly as a command. But, unfortunately none of them generated any log files.

export QT_LOGGING_RULES="kwin_*.debug=true"
Comment 16 Ayon 2025-09-26 17:00:20 UTC
So, basically I used ChatGPT to generate a script that will generate logs related to the issue. I'm attaching those if needed and the script itself. And, I think I'm going to install KDE Neon User, to check if that can generate anything but before that I am curious to know why fedora didn't work.
Comment 17 Ayon 2025-09-26 17:02:11 UTC
Created attachment 185299 [details]
ai generated script
Comment 18 Ayon 2025-09-26 17:03:43 UTC
Created attachment 185300 [details]
journal after resume
Comment 19 Ayon 2025-09-26 17:04:21 UTC
Created attachment 185301 [details]
journal current boot
Comment 20 Ayon 2025-09-26 17:04:53 UTC
Created attachment 185302 [details]
journal previous boot
Comment 21 Ayon 2025-09-26 17:05:11 UTC
Created attachment 185303 [details]
lsmod
Comment 22 Ayon 2025-09-26 17:05:39 UTC
Created attachment 185304 [details]
mem sleep status
Comment 23 Ayon 2025-09-26 17:06:26 UTC
Created attachment 185305 [details]
power state
Comment 24 TraceyC 2025-09-26 17:41:15 UTC
Please do not submit AI-generated bug details. AIs hallucinate and cannot be trusted to produce accurate technical data, wasting your time as well as ours. The logs attached based on the script aren't what we need.

Given that this has happened with three different distros on the same hardware, I suspect a kernel or hardware level issue at this point.

(In reply to Ayon from comment #15)
> Sorry to disappoint, but in Fedora KDE it didn't even generate any empty
> file.

I checked on a Fedora FM and I don't find ~/.local/share/sddm/wayland-session.log either. Apparently they do things a little differently. 
With the environment variable exported in your .bashrc can you attach this file:

~/.cache/wayland-errors

Thanks
Comment 25 TraceyC 2025-09-26 17:43:37 UTC
Also, please let us know the motherboard in your system. Some of them have been known to have problems with waking from sleep.
Comment 26 Ayon 2025-09-26 18:17:47 UTC
(In reply to TraceyC from comment #25)
> please let us know the motherboard in your system
GIGABYTE B660M DS3H AX DDR4

(In reply to TraceyC from comment #24)
> Please do not submit AI-generated bug details. AIs hallucinate and cannot be
> trusted to produce accurate technical data, wasting your time as well as
> ours. The logs attached based on the script aren't what we need.
I am sorry, I should have asked first. I wish there was a delete comment option.

> ~/.cache/wayland-errors
I have checked the location but found an empty file.
Comment 27 TraceyC 2025-09-26 18:40:27 UTC
I'm out of ideas, so I'll let the kwin developers take it from here.
Comment 28 Ayon 2025-09-27 03:20:59 UTC
(In reply to TraceyC from comment #27)
> I'm out of ideas, so I'll let the kwin developers take it from here.
I checked on KDE Neon User Edition, got an empty file.