You are not logged in.

#1 2025-08-02 10:15:04

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Arch Linux freezes resuming from sleep

I think it's the 1st time I tried Sleep since I installed Arch Linux KDE.

Application Menu, Power / Session, Sleep works.

But e.g. mouse click to resume from sleep, the desktop is froze but I can move the pointer by the mouse.
Ctrl-Alt-Del & power button (I set System Settings, Power Management, When power button pressed: Shut down) nothing, so hard shut down (hold the power button like 4 seconds).

I googled "arch linux sleep freeze" I found https://bbs.archlinux.org/viewtopic.php?id=296954 , although suprised by that manual intervention & I installed nvidia-open I still wrote:

/usr/lib/systemd/system/systemd-suspend.service
[Service]
Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"

/usr/lib/systemd/system/systemd-homed.service
[Service]
Environment="SYSTEMD_HOME_LOCK_FREEZE_SESSION=false"

but same issue...

Sleep works on Windows 11.
I can hibernate.
I installed Arch Linux on a USB flash drive, the OS partition is F2FS:

systemctl suspend

works!
On archlinux-2025.08.01-x86_64.iso :

fsck /dev/nvme0n1p1

good.

So the issue come from Arch Linux with my NVMe /dev/disk/by-id/nvme-WDS250G3X0C-00SJG0_185250422455 .

Has anyone also that issue?

EDIT
Plot twist: I not know I not thought this before:

Windows 11 on a HDD
Disk Management: there's the NVMe listed but:
Sleep
resume by e.g. a mouse click
Disk Management: there's not the NVMe listed, even after Refresh! (same as Arch Linux CLI on a USB flash drive with sudo fdisk -l)
Restart or Shut down
black display, PC stuck so hard shut down.

So it's not an issue of an OS but a firmware or/& hardware issue!

Last edited by jebez (2025-08-13 14:46:13)

Offline

#2 2025-08-02 18:50:24

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

so hard shut down (hold the power button like 4 seconds)

Avoid that at all costs - if the mouse cursor still moves there's essentially no way the kernel has halted, so https://wiki.archlinux.org/title/Keyboa … el_(SysRq) will still work.
But I guess you'll even be able to switch to TTY3 w/ ctrl+alt+f3 ?
Most likely the compositor/and or just plasmashell has crashed.

For a general oversight of the situation,please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Offline

#3 2025-08-03 00:43:29

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

http://0x0.st/873y.txt

Avoid that at all costs

Why? It's a desktop PC, I had power cut also (EDF, électricité de France).

But I guess you'll even be able to switch to TTY3 w/ ctrl+alt+f3 ?

Yes but just a blinking cursor...

I tried again, black screen but again I can move the pointer by the mouse...

Offline

#4 2025-08-03 07:44:47

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

You're risking data loss/filesystem corruption and will esp. not be able to preserve the journal of the troublesome boot.
You're probably not getting framebuffer control back from kwin_wayland - can you ssh into the system?

=> Test the behavior w/ plasma on X11 and see https://wiki.archlinux.org/title/NVIDIA … er_suspend (notably check whether the userspace services are enabled)

Offline

#5 2025-08-03 08:05:26

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

I updated my 1st post.

can you ssh into the system?

Remote shell my PC? Why? I not have an other PC...

Test the behavior w/ plasma on X11

KDE stopped the X11 session at log in... & why X11? Wayland is better.

https://wiki.archlinux.org/title/NVIDIA … er_suspend
I've PreserveVideoMemoryAllocations: 1 .

Last edited by jebez (2025-08-03 08:46:54)

Offline

#6 2025-08-03 08:12:16

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

Remote shell my PC? Why?

seth wrote:

You're probably not getting framebuffer control back from kwin_wayland

KDE stopped the X11 session at login

https://archlinux.org/news/plasma-640-w … re-on-x11/

why X11?

seth wrote:

You're probably not getting framebuffer control back from kwin_wayland

and you can disable the compositor on X11

Wayland is better.

If you wanna postulate stuff I'll postulate that you're not nearly qualified to even pretend to have an opinion on that.
But it's mostly for cross-testing the situation and understand what's going on on your system at all.

I've PreserveVideoMemoryAllocations: 1 .

seth wrote:

notably check whether the userspace services are enabled

Offline

#7 2025-08-03 08:53:52

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

On X11 I had screen tearing watching videos & playing video games, not on Wayland...
Also

sudo pacman -S plasma-x11-session

X11 session at log in, log in, sleep: the desktop is froze but I can move the pointer by the mouse.

Isn't PreserveVideoMemoryAllocations: 1 you say? So what?

Since it seems an issue of KDE I googled "kde sleep freeze": lot of results, I found https://forum.manjaro.org/t/freezing-af … eep/137879 but I've UKI (see my config under) so how?
In /etc/mkinitcpio.d/linux.preset

mem_sleep_default=deep

?

Last edited by jebez (2025-08-03 18:19:40)

Offline

#8 2025-08-03 15:45:59

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

Isn't PreserveVideoMemoryAllocations: 1 you say? So what?

The point is to enable the matching userspace services. Read the link I posted.

Generic freezes are "common-ish" and can have a trillion different causes.
What happens if you suspend the compositor on X11 (SHIFT+Alt+F12 should disable shadows and transparency etc.)

Ftr, https://bbs.archlinux.org/viewtopic.php?id=307355

Offline

#9 2025-08-03 18:24:24

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

I tried:
/etc/kernel/cmdline

root=/dev/disk/by-id/nvme-WDS250G3X0C-00SJG0_185250422455-part1 resume=/dev/disk/by-id/nvme-WDS250G3X0C-00SJG0_185250422455-part2 rw mem_sleep_default=deep

then

sudo mkinitcpio -P

Also:
X11, SHIFT+Alt+F12
Same issue...

The point is to enable the matching userspace services. Read the link I posted.

For god sake in the link you posted there's just PreserveVideoMemoryAllocations: 1 so what?

I posted to the forum of KDE https://discuss.kde.org/t/arch-linux-kd … leep/38052 .

Last edited by jebez (2025-08-03 18:26:27)

Offline

#10 2025-08-04 00:19:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,790

Re: Arch Linux freezes resuming from sleep

The service files seth mentions are the line

Wiki wrote:

Necessary services nvidia-suspend.service, nvidia-hibernate.service, and nvidia-resume.service are enabled by default on supported drivers, as per upstream requirements.

you should verify that they are with

systemctl status nvidia-{suspend,resume,hibernate}

Offline

#11 2025-08-04 01:20:24

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

[a@archlinux ~]$ systemctl status nvidia-hibernate
○ nvidia-hibernate.service - NVIDIA system hibernate actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-hibernate.service; enabled; preset: disabled)
     Active: inactive (dead)
[a@archlinux ~]$ systemctl status nvidia-suspend
○ nvidia-suspend.service - NVIDIA system suspend actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-suspend.service; enabled; preset: disabled)
     Active: inactive (dead)
[a@archlinux ~]$ systemctl status nvidia-resume
○ nvidia-resume.service - NVIDIA system resume actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-resume.service; enabled; preset: disabled)
     Active: inactive (dead)

Offline

#12 2025-08-04 15:46:56

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

mem_sleep_default=deep

Don't enforce that.
What's

cat /sys/power/mem_sleep

w/o the kernel parameter anyway?

Also there're several threads now / kwin(_wayland) apparently cross-fucking the framebuffer (ssh typically works but apparently that's not an option, though nb. that there's ssh clients for android and iOS)
So: let's see who's the culprit here
Can you suspend and wake from the multi-user.target (2nd link below, that means you're not starting any GUI. Ever. Before suspending the system)
How do you start KDE? SDDM? => Disable that and try https://wiki.archlinux.org/title/KDE#From_the_console
Finally, log into an openbox or icewm session (no kde) and suspend the system from there. Can you wake it?

I'll point out that the moving mouse cursor guarantees that the kernel is still alive and so is the GPU.
You'll be facing a problem with KDE or maybe your disk doesn't wake up and stalls all IO, but rebooting w/ https://wiki.archlinux.org/title/Keyboa … el_(SysRq) will still work and will hopefully get us a journal to inspect the situation.
Do then entire REISUB-dance  and give it a couple of seconds between the individual steps.

Offline

#13 2025-08-04 16:07:30

tcn
Member
Registered: 2011-09-30
Posts: 83

Re: Arch Linux freezes resuming from sleep

seth wrote:

You're risking data loss/filesystem corruption

So, this is still a thing?

I have an 1st gen 1950x threadripper and sleep/wake worked fine for years.
But then finally the year of linux on the desktop arrived a while ago and the machine randomly fails to wakeup (or fall asleep, this also sometime doesn't work or only on the 2nd or 3rd attempt).
No SSH, no switching to console, no nothing. Sometime I can move the cursor for a few seconds.

I have had to hard rebooted dozens and dozens of times since. So far btrfs stood tall.

Offline

#14 2025-08-04 16:17:36

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

If you're holding the power button, the power will be cut from the system cold.
Any data that has not been synced to disk will be lost - this is inevitable.
Filesystem corruption can occur as result of that and is mostly down to whether this happens while the FS is writing transaction data at this point.
BTRFS is not exactly on the record in being overly robust here for now…

But from your thread, your situation might differ from the one ITT, because you enter the suspend but never really succeed on a HW level (we'll see) - nor wakeup.
So you get a full FS sync in anticipation of the suspend and then nothing else happens until you push the power button.
But the system here clearly wakes up and random stuff might be going on between then and the finger on the power button.

Offline

#15 2025-08-04 16:32:30

tcn
Member
Registered: 2011-09-30
Posts: 83

Re: Arch Linux freezes resuming from sleep

I have experienced file system corruptions in the past (with btrfs) but thought/hoped that these days were over.

After all there are also grid outages that I have zero control over.
AFAIK this is even fairly common in the US due to overland power cables that happen to rip apart during storms.
Losing not-yet-fsync'ed is fine. File system corruption sure is not. I would have expected that modern file systems do everything in their power to prevent that for mentioned reasons.

Random power outage out of the blue and your machine (and business) is dead? Really? Even worse for a NAS.

Offline

#16 2025-08-04 18:03:46

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

[a@archlinux ~]$ cat /sys/power/mem_sleep
s2idle [deep]
systemctl set-default multi-user

Restart

suspend -f

a blinking cursor under... but Ctrl-Alt-Del works, I reboot.
It's supposed to work, to supend? So it's not an issue of KDE?

Last edited by jebez (2025-08-04 18:20:48)

Offline

#17 2025-08-04 21:09:05

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

tcn wrote:

I would have expected that modern file systems do everything in their power to prevent that for mentioned reasons.

Yes, journaling. sampling the forum: btrfs shows up more often w/ recovery issues thatn ext4. By a lot.

@jebez

s2idle [deep]

so it's default anyway, the parameter is completely inert.

a blinking cursor under... but Ctrl-Alt-Del works, I reboot.

Please post the journal of that boot, eg. 

sudo journalctl -b -1 | curl -F 'file=@-' 0x0.st

for the previous (-1) one (if you've not rebooted since)

Offline

#18 2025-08-04 22:14:43

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

Offline

#19 2025-08-05 06:43:11

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

Aug 04 22:09:39 archlinux kernel: Linux version 6.15.9-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250729, GNU ld (GNU Binutils) 2.45.0) #1 SMP PREEMPT_DYNAMIC Sat, 02 Aug 2025 01:20:06 +0000
…
Aug 04 22:09:51 archlinux login[754]: LOGIN ON tty1 BY a
Aug 04 22:09:51 archlinux systemd[773]: Finished Update XDG user dir configuration.
Aug 04 22:09:51 archlinux systemd[773]: Reached target Main User Target.
Aug 04 22:09:51 archlinux systemd[773]: Startup finished in 238ms.
Aug 04 22:09:52 archlinux systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Aug 04 22:10:12 archlinux systemd-timesyncd[410]: Contacted time server [2a02:c207:0:4041::1]:123 (2.arch.pool.ntp.org).
Aug 04 22:10:12 archlinux systemd-timesyncd[410]: Initial clock synchronization to Mon 2025-08-04 22:10:12.501111 UTC.
Aug 04 22:10:12 archlinux systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Aug 04 22:10:50 archlinux sudo[807]: pam_unix(sudo:auth): user [a] has blank password; authenticated without it
Aug 04 22:11:14 archlinux sudo[811]:        a : TTY=tty1 ; PWD=/home/a ; USER=root ; COMMAND=/usr/bin/journalctl -b
Aug 04 22:11:14 archlinux sudo[811]: pam_unix(sudo:session): session opened for user root(uid=0) by a(uid=1000)

There's no trace of any sleep attempt in that journal, didn't pay enough attention to your post…

suspend -f

That's  shell built-in  that just stops the shell.
You want to run

systemctl suspend

Offline

#20 2025-08-05 08:06:50

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

Ah sorry...

http://0x0.st/8hTO.txt

systemctl set-default multi-user

Restart

systemctl suspend

Resume by e.g. click the mouse
Some text at display.
Ctrl-Alt-Del, power button & REISUB nothing, so hard shut down.

So it's not an issue of KDE, I updated the title & flagged https://discuss.kde.org/t/arch-linux-kd … leep/38052 .

Last edited by jebez (2025-08-05 16:19:23)

Offline

#21 2025-08-05 14:35:26

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

Some text at display

What text? In doubt take a photo of the screen and link that here.
The last journal is from

Aug 05 07:52:00 archlinux kernel: Linux version 6.15.9-arch1-1 (linux@archlinux) (gcc (GCC) 15.1.1 20250729, GNU ld (GNU Binutils) 2.45.0) #1 SMP PREEMPT_DYNAMIC Sat, 02 Aug 2025 01:20:06 +0000

to

Aug 05 07:53:15 archlinux sudo[799]: pam_unix(sudo:auth): user [a] has blank password; authenticated without it
Aug 05 07:53:15 archlinux sudo[799]:        a : TTY=tty1 ; PWD=/home/a ; USER=root ; COMMAND=/usr/bin/journalctl -b
Aug 05 07:53:15 archlinux sudo[799]: pam_unix(sudo:session): session opened for user root(uid=0) by a(uid=1000)

and there's no sleep attempt in it (so I guess that's the journal of the reboot after the wakeup failure)

Offline

#22 2025-08-05 14:57:43

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

I not wrote -1 sorry...

http://0x0.st/8hMF.txt

What text? In doubt take a photo of the screen and link that here.

Isn't this text in the link above? How to copy the text in console?
I'll get my new smartphone tomorrow, drowned the old.

Offline

#23 2025-08-05 16:07:09

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

Journal ends at

Aug 05 14:46:24 archlinux systemd[1]: Reached target Sleep.
Aug 05 14:46:24 archlinux systemd[1]: Starting NVIDIA system suspend actions...
Aug 05 14:46:24 archlinux suspend[801]: nvidia-suspend.service
Aug 05 14:46:24 archlinux logger[801]: <13>Aug  5 14:46:24 suspend: nvidia-suspend.service
Aug 05 14:46:25 archlinux systemd[1]: nvidia-suspend.service: Deactivated successfully.
Aug 05 14:46:25 archlinux systemd[1]: Finished NVIDIA system suspend actions.
Aug 05 14:46:25 archlinux systemd[1]: Starting System Suspend...
Aug 05 14:46:25 archlinux systemd-sleep[812]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
Aug 05 14:46:25 archlinux systemd-sleep[812]: This is not recommended, and might result in unexpected behavior, particularly
Aug 05 14:46:25 archlinux systemd-sleep[812]: in suspend-then-hibernate operations or setups with encrypted home directories.
Aug 05 14:46:25 archlinux systemd-sleep[812]: Performing sleep operation 'suspend'...
Aug 05 14:46:25 archlinux kernel: PM: suspend entry (deep)

If you hold the power button to shutdown the system, the journal cannot be synced to disk anymore and all information between the last sync and the reboot are lost.
Hence iff a reboot isn't possible even using sysrq+REISUB you'll have to secure final on-screen informations with a picture.

Offline

#24 2025-08-05 20:05:27

jebez
Member
From: France
Registered: 2025-01-15
Posts: 165

Re: Arch Linux freezes resuming from sleep

My bad SysRq works: as french I've azerty so I saw https://fr.wikipedia.org/wiki/Magic_SysRq_key : "Alt + Imprim écran ou Syst" but https://en.wikipedia.org/wiki/Magic_SysRq_key : "The combinations always assume the QWERTY keyboard layout" so looking with System Settings, Keyboard I discovered it's Alt-Fn-Impécr.

http://0x0.st/8hQG.txt

Before:
https://drive.google.com/file/d/17HfbBm … jcoYDaX0pB

After:
https://drive.google.com/file/d/1JvlqwO … wRWe97xi-c
https://drive.google.com/file/d/1vZoUFd … AkUTXpVNBl

Last edited by jebez (2025-08-05 22:43:31)

Offline

#25 2025-08-05 21:22:33

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,992

Re: Arch Linux freezes resuming from sleep

Is the system installed on an F2FS partition?
Bold move… but it's probably rather related to https://wiki.archlinux.org/title/Solid_ … leshooting
"nvme_core.default_ps_max_latency_us=0 pcie_aspm=off iommu=soft" to the https://wiki.archlinux.org/title/Kernel_parameters and if that doesn't cut it, add "pcie_port_pm=off" to the list.

Fwwi, if the root partition no longer responds, rebooting w/ the sysrq would not preserve the log either.

Offline

Board footer

Powered by FluxBB