You are not logged in.

#26 2023-03-26 08:12:23

kaztai
Member
Registered: 2023-01-22
Posts: 10

Re: System freezes while trying to sleep

Hi seth, thank you for sharing the link. I hadn't seen it before. I'll try checking by adding the boot options as described there.

Offline

#27 2023-04-12 20:14:59

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: System freezes while trying to sleep

I added `initcall_debug no_console_suspend` to my list of kernel options, and also made a service to set `/sys/power/pm_async` to `0`, however doing that results in my system hanging up AFTER I wake it up. I just get a blank screen but the HDMI signal to my external monitor is active... it just doesn't send anything to the display. I will add any interesting data from the journal in my next post, not planning to replicate the pm_async hang now.

Offline

#28 2023-04-13 21:16:45

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: System freezes while trying to sleep

I replicated the `pm_async` hang today and there's literally nothing in the journal after I woke my system.

Here's the output before suspend:

Apr 13 19:18:18 arch systemd[1]: nvidia-suspend.service: Deactivated successfully.
Apr 13 19:18:18 arch systemd[1]: Finished NVIDIA system suspend actions.
Apr 13 19:18:18 arch systemd[1]: Starting System Suspend...
Apr 13 19:18:18 arch systemd-sleep[11802]: Entering sleep state 'suspend'...
Apr 13 19:18:18 arch kernel: PM: suspend entry (deep)
Apr 13 19:18:19 arch kernel: Filesystems sync: 0.304 seconds
TheDcoder wrote:

I just get a blank screen but the HDMI signal to my external monitor is active... it just doesn't send anything to the display.

Correction: I do see a lone blinking cursor on a blank console, no output other than that.

Offline

#29 2023-04-13 21:43:37

seth
Member
Registered: 2012-09-03
Posts: 57,018

Re: System freezes while trying to sleep

Did you try pm_test, https://www.kernel.org/doc/Documentatio … ugging.txt ("2. Testing suspend to RAM (STR)")

Offline

#30 2023-04-14 09:09:12

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: System freezes while trying to sleep

No, it sounds comprehensive and it might identify the culprit driver. I will try it later when I can.

Offline

#31 2023-04-18 18:56:20

RogerS_01
Member
Registered: 2023-04-18
Posts: 16

Re: System freezes while trying to sleep

I've been having the same issue after I upgraded from kernel 5.15, where some times it was freezing when trying to enter sleep mode, forcing me to power off the laptop.

The logs were indicating that the freeze happened right after PM: suspend entry (deep), thus when trying to do the Filesystems sync.

It happens both with the 6.1 LTS and 6.2 Zen kernels.

I seem to have been able to isolate the issue (for me at least). It only seems to happen when the swap is being utilized, even if it's as little as 20MB or so.

I first tried to disable zswap, but that didn't help. Then I disabled my swap file entirely and enabled zram instead. With zram enabled I had to work really hard to get it to start using any swap at all (waking up a ton of dormant tabs in two different Firefox profiles + another browser, opening up multiple PhpStorm projects at once, plus some other applications). Finally at around 19GB+ out of 31.2GB RAM used it started using a little bit of swap, so I tried sleep mode again and this time it worked without any issues. I've been able to use sleep mode multiple times without any issues since yesterday, each time with a bit of zram swap usage (between ~25MB and ~230MB).

I did read about a user who's having a similar issue (on AMD though) and was working for him when using S0ix but not S3. Unfortunately my laptop doesn't seem to support S0ix so I wasn't able to test that.
https://gitlab.freedesktop.org/drm/amd/-/issues/2357

To the OP (and others having similar issues) maybe try disabling swap (optionally enabling zram if needed) to see if that helps? If that solves the issue for other people as well, someone should probably report it to the kernel developers.

CPU: Core i7-6700HQ

Offline

#32 2023-04-18 19:14:22

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: System freezes while trying to sleep

That's a good one! I initially did not have swap enabled in my system but I had to enable it as OOM Killer would get invoked in edge cases. I will disable swap now and see if I can replicate the freeze issue.

Offline

#33 2023-04-18 19:41:53

RogerS_01
Member
Registered: 2023-04-18
Posts: 16

Re: System freezes while trying to sleep

Looks like I celebrated too soon, because not too long after I posted my previous reply it happened again. Same symptoms and the journal from the previous boot only gets to "kernel: PM: suspend entry (deep)".

Maybe something else on the filesystem needed to be synced this time, causing the freeze?

Back to square one I guess. I'll go back to using kernel 5.15 again until this is resolved.

Offline

#34 2023-04-21 22:59:41

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: System freezes while trying to sleep

Happened again for me too, with the same error details. I'm considering trying out Linux 5.15 to see if the issue gets resolved in that version for me too.

Offline

#35 2023-04-25 22:36:45

cribari
Member
From: Recife, Brazil
Registered: 2016-01-28
Posts: 84
Website

Re: System freezes while trying to sleep

I am having the same problem on an Intel laptop (LG Gram). It started after I upgraded to kernel 6.1.1.  Occasionally, the computer freezes when suspending or hibernating.


Linux, street photography and Baroque music enthusiast.

Offline

#36 2023-04-25 22:45:04

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: System freezes while trying to sleep

I've been using the LTS 5.15 kernel since I made the last post and I've not encountered the issue yet. I think it might be working, so it's worth giving a shot for anyone who's having this issue. AUR has a linux-lts515 package for anyone who's interested in trying this.

Offline

#37 2023-04-29 13:47:31

uzvermode
Member
Registered: 2023-03-11
Posts: 9

Re: System freezes while trying to sleep

Apr 29 16:09:32 tuxnote systemd[1]: Started Lock the screen on resume from suspend.
Apr 29 16:09:32 tuxnote systemd[1]: Reached target Sleep.
Apr 29 16:09:32 tuxnote systemd[1]: Starting System Suspend...
Apr 29 16:09:32 tuxnote systemd-sleep[45304]: Entering sleep state 'suspend'...
Apr 29 16:09:32 tuxnote kernel: PM: suspend entry (deep)

Same issue on Intel base laptop(i5-8250u). Last working kernel 6.0.12, all versions above it - got random freeze on suspend and no error messages in journal

Offline

#38 2023-05-02 13:42:35

shteren
Member
Registered: 2023-05-02
Posts: 1
Website

Re: System freezes while trying to sleep

Same issue on Lenovo AIO 720-24IKB (nvidia + intel). I suspect that it is caused by background processes. If no work is done for a couple of minutes before entering sleep, this usually happens successfully.

Offline

#39 2023-05-02 18:16:08

marcel83
Member
Registered: 2023-05-02
Posts: 4

Re: System freezes while trying to sleep

I can confirm that 6.0.12 is the last working version available from the Arch Linux archives. In my case the issue occurs on an Intel NUC (i3-7100U). Version 6.2.13 is still affected.

I already started a git bisect but decided to test version 6.3.1 first before installing a development kernel that could potentially damage my hardware. Also, since the problem occurs only sporadically for me (like every other day or so) and I don't seem to be able to provoke it, bisecting the kernel may take a while.

Offline

#40 2023-05-07 11:52:01

marcel83
Member
Registered: 2023-05-02
Posts: 4

Re: System freezes while trying to sleep

Version 6.3.1 is also still affected. It seemed to work fine for a few days, but eventually it happened again.

Offline

#41 2023-05-09 17:26:28

uzvermode
Member
Registered: 2023-03-11
Posts: 9

Re: System freezes while trying to sleep

marcel83 wrote:

Version 6.3.1 is also still affected. It seemed to work fine for a few days, but eventually it happened again.

I'll try 6.3.1 during this week with systemd-sleep.target hack for running `sync` command while system going to `deep` sleep

Offline

#42 2023-05-14 10:08:23

uzvermode
Member
Registered: 2023-03-11
Posts: 9

Re: System freezes while trying to sleep

So far uptime almost 5 days and 22 suspends under 6.3.1 kernel with no freezes.
My workaround is to place unit with content

#!/usr/bin/env bash
sync

under the path

/usr/lib/systemd/system-sleep/suspend2ram_fix.sleep

and

sudo chmod +x /usr/lib/systemd/system-sleep/suspend2ram_fix.sleep

then reboot, or may do the trick

sudo systemd daemon-reload

Hope this temporary fix will help u

Offline

#43 2023-05-23 17:18:54

uzvermode
Member
Registered: 2023-03-11
Posts: 9

Re: System freezes while trying to sleep

uzvermode wrote:

So far uptime almost 5 days and 22 suspends under 6.3.1 kernel with no freezes.
My workaround is to place unit with content

#!/usr/bin/env bash
sync

under the path

/usr/lib/systemd/system-sleep/suspend2ram_fix.sleep

and

sudo chmod +x /usr/lib/systemd/system-sleep/suspend2ram_fix.sleep

then reboot, or may do the trick

sudo systemd daemon-reload

Hope this temporary fix will help u

Not working, but freezes rarely. Downgrading to 6.0.12 for now

Offline

#44 2023-05-30 00:42:39

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: System freezes while trying to sleep

@marcel83 How far have you been able to bisect until now?

@uzvermode As a general rule, you shouldn't put your own files under `/usr/lib`, instead use `/etc`.

Offline

#45 2023-06-01 18:02:51

marcel83
Member
Registered: 2023-05-02
Posts: 4

Re: System freezes while trying to sleep

TheDcoder wrote:

@marcel83 How far have you been able to bisect until now?

Still 8 steps to go, it will take a while. The trouble is that since I cannot provoke the error and it will often work fine for several days before happening again, I need to wait for at least a week or so and even then I can't be absolutely sure I actually picked a good commit.

Has anyone filed or been able to find an upstream report for this yet?

Offline

#46 2023-06-02 04:43:14

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: System freezes while trying to sleep

Thank you @marcel, I want to help but I am not sure if I can get around to setting up a custom kernel for bisecting. I have also not tried filing a report yet since technical details of this issue seem to be sparse, I doubt they'll be able to find it sooner than us without a solid lead.

Offline

#47 2023-06-18 16:04:55

kaztai
Member
Registered: 2023-01-22
Posts: 10

Re: System freezes while trying to sleep

Could this URL be related to the same issue?
https://discussion.fedoraproject.org/t/ … king/81465

Offline

#48 2023-06-18 16:19:32

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: System freezes while trying to sleep

It's hard to tell since there's very little technical insight in that thread. In any case, can anyone confirm that this issue still exists in the latest kernel? I'm too afraid to test it myself, LOL.

Offline

#49 2023-06-20 04:22:11

kaztai
Member
Registered: 2023-01-22
Posts: 10

Re: System freezes while trying to sleep

I encountered the same issue on linux-6.3.8.arch1-1 in my environment.
I've been trying various things, but I haven't made any significant progress to report yet.

Offline

#50 2023-08-03 18:12:45

8472
Member
From: Slovakia
Registered: 2010-05-15
Posts: 88

Re: System freezes while trying to sleep

Finally found this thread.

Same problem on ASUS ZENBOOK UX410UA-GV024
Original 4GB RAM extended to 20GB.
Intel HD Graphics 620.
Have the same experience, that there were no problems with kernel v5, started with v6*.
LTS or non-LTS kernel versions, doesn't matter, problem with both.
Happens randomly, very occasionally I have even a luck of 1 week hibernating the laptop without a freeze.

Currently testing: https://wiki.archlinux.org/title/Power_ … ibernating
Previously also tested with "HibernateMode=platform shutdown", no success.


Logic clearly dictates that the needs of the many outweigh the needs of the few.

Offline

Board footer

Powered by FluxBB