You are not logged in.

#1 2023-01-16 02:37:23

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

System freezes while trying to sleep

Hello,

This problem started happening relatively recently (a couple of months ago), before this there were no issues. My system (laptop - ASUS ROG GL553VE) seems to be stuck/frozen while trying to into sleep, the display turns off but the system itself remains in a powered state and hitting the keyboard does not wake it up, even if waiting for long period of time.

One day I left it running for a few hours thinking it went into sleep, but it was in that comatose state and there was nothing I could do except hard reset. I haven't tried the SysRq keys yet but I doubt they'd be of help.

It only occurs rarely, I use the suspend feature everyday and I get stuck in this state only a few times in a month.

This was working perfectly before this issue started happening, I've been using the Zen kernel since a while before the issue, I don't think this plays a role but it's worth mentioning.

The journal doesn't show any interesting info, here are the last four lines before I had to hard reset today:

Jan 16 07:21:19 arch systemd[1]: Starting System Suspend...
Jan 16 07:21:19 arch systemd-sleep[198518]: Entering sleep state 'suspend'...
Jan 16 07:21:19 arch kernel: PM: suspend entry (deep)
Jan 16 07:21:19 arch wpa_supplicant[1271]: wlp2s0: CTRL-EVENT-DSCP-POLICY clear_all

While discussing in IRC I found a user with a very similar (if not the same) issue, but the main difference was that they always had it ever since they started using Linux. Here's their thread: https://bbs.archlinux.org/viewtopic.php?id=258138

Last edited by TheDcoder (2023-01-23 23:53:34)

Offline

#2 2023-01-17 00:59:44

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

Re: System freezes while trying to sleep

I performed a clean suspend today for reference and I *may* have found the culprit, this is the very next step in the suspension procedure according to the journal:

Jan 17 06:23:09 arch kernel: Filesystems sync: 0.083 seconds

I will check to see if this is the cause every time. Also I'm switching to the stock Arch Linux kernel now just to see if the Zen patches have anything to do with the issue.

Offline

#3 2023-01-20 06:07:34

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

Re: System freezes while trying to sleep

It happened again today, and I left it running for a good 4 hours before I got back. Here are the last few journal entries before I forced reset:

Jan 20 07:31:02 arch wpa_supplicant[1384]: p2p-dev-wlp2s0: CTRL-EVENT-DSCP-POLICY clear_all
Jan 20 07:31:02 arch systemd[1]: Reached target Sleep.
Jan 20 07:31:02 arch wpa_supplicant[1384]: p2p-dev-wlp2s0: CTRL-EVENT-DSCP-POLICY clear_all
Jan 20 07:31:02 arch wpa_supplicant[1384]: nl80211: deinit ifname=p2p-dev-wlp2s0 disabled_11b_rates=0
Jan 20 07:31:02 arch systemd[1]: Starting System Suspend...
Jan 20 07:31:02 arch systemd-sleep[27433]: Entering sleep state 'suspend'...

Seems to be happening more often that I thought, and I'm using the stock Arch Linux kernel too... anybody have any ideas that I can try to fix the issue?

Offline

#4 2023-01-20 15:35:01

mattf
Member
Registered: 2020-04-12
Posts: 17

Re: System freezes while trying to sleep

Did you take a look at https://wiki.archlinux.org/title/NVIDIA … er_suspend and other tips that are in this page? I shot in the dark but do you have the nvidia-suspend.service and nvidia-hibernate.service enabled and running?

This laptop might also have an integrated intel gpu. On mine I did:

/etc/modprobe.d/i915.conf

# enables firmware update of intel gpu
options i915 enable_psr=0 enable_guc=0 enable_gvt=1

/etc/modprobe.d/nvidia-power-management.conf

options nvidia NVreg_PreserveVideoMemoryAllocations=0 NVreg_TemporaryFilePath=/cache/

Many of those issues were fixed in recent (where I mean in the last 2 years) updates of the nvidia driver and linux kernel. I used to have those issues but with linux-lts and nvidia-lts packages i don't anymore.

Last edited by mattf (2023-01-20 15:35:46)

Offline

#5 2023-01-20 21:01:09

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

Re: System freezes while trying to sleep

Hi mattf,

mattf wrote:

Did you take a look at https://wiki.archlinux.org/title/NVIDIA … er_suspend and other tips that are in this page? I shot in the dark but do you have the nvidia-suspend.service and nvidia-hibernate.service enabled and running?

No actually, just went through it and updated my config, let's see if it helps.

mattf wrote:

This laptop might also have an integrated intel gpu. On mine I did:

/etc/modprobe.d/i915.conf

# enables firmware update of intel gpu
options i915 enable_psr=0 enable_guc=0 enable_gvt=1

Mine does have an Intel iGPU but those options are unnecessary and the comment is straight up incorrect:

1. The comment says firmware update, but those option cannot update the firmware, they just enable them.
2. The supplied values actually disable both the GuC and HuC firmwares
3. The final option enables virtualization, which is unneeded and can only cause more complications IMO

Offline

#6 2023-01-23 10:26:43

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

Re: System freezes while trying to sleep

I had the same problem with my PC (LIFEBOOK WS1/B3 CPU: i7-8550U, GPU: Intel UHD Graphics 620). (Not nVidia).
I use Suspend at least twice daily, but it often freezes and I have to press the power button each time to restart it.
There are no logs of concern in the journal.

Success :

 Jan 18 23:34:22 arch systemd[1]: Reached target Sleep.
 Jan 18 23:34:22 arch systemd[1]: Starting System Suspend...
 Jan 18 23:34:22 arch systemd-sleep[577393]: Entering sleep state 'suspend'...
 Jan 18 23:34:22 arch kernel: PM: suspend entry (deep)
 Jan 18 23:34:22 arch kernel: Filesystems sync: 0.009 seconds

On failure :

 Jan 19 01:55:53 arch systemd[1]: Reached target Sleep.
 Jan 19 01:55:53 arch systemd[1]: Starting System Suspend...
 Jan 19 01:55:53 arch systemd-sleep[578733]: Entering sleep state 'suspend'...
 Jan 19 01:55:53 arch kernel: PM: suspend entry (deep)

This problem started after I updated Arch on 24 December.
At that time the kernel changed from 6.0.12 to 6.1.1.
I thought this might be the cause, so I tried downgrading the kernel.

# pacman -Q linux
linux 6.1.7.arch1-1
# cd /var/cache/pacman/pkg
# pacman -U file://linux-6.0.12.arch1-1-x86_64.pkg.tar.zst

I've suspended a few times since then, but so far this hasn't happened.

Offline

#7 2023-01-23 23:53:16

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

Re: System freezes while trying to sleep

Hi kaztai, Thanks for sharing your experience as well, I will remove "(might be related to Nvidia GPU)" from the title as your experience matches mine pretty well but you don't have an Nvidia GPU.

Offline

#8 2023-01-26 12:53:44

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

Re: System freezes while trying to sleep

The issue happened again today, even with nvidia-suspend.service enabled... nothing new in the journal.

Offline

#9 2023-01-27 12:44:00

mattf
Member
Registered: 2020-04-12
Posts: 17

Re: System freezes while trying to sleep

TheDcoder I've started having a persistent problem now that makes me unable o suspend on the newest `linux` kernel.

Whenever I suspend now, it seems to fail trying doing it and my machine reboots. I still haven't gathered much info but it seems things were fine to me so far just because I didn't update.

Offline

#10 2023-01-30 18:51:27

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

Re: System freezes while trying to sleep

The issue occurred again today, I tried to do an emergency sync with the SysRq key combination but my USB keyboard was powered down and I didn't use the right combination on my laptop's keyboard. I've figured it out now so I will try doing an emergency sync the next time it freezes.

@mattf That's an interesting development, please do look into it and share any interesting info which can help us narrow down the issue.

Offline

#11 2023-01-31 10:32:46

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

Re: System freezes while trying to sleep

It happened AGAIN today, but what's even more strange is that it happened during shutdown! Unfortunately the journal was stopped before the freeze so there are no useful logs:

Jan 31 04:00:29 arch systemd[1]: systemd-remount-fs.service: Deactivated successfully.
Jan 31 04:00:29 arch systemd[1]: Stopped Remount Root and Kernel File Systems.
Jan 31 04:00:29 arch systemd[1]: systemd-tmpfiles-setup-dev.service: Deactivated successfully.
Jan 31 04:00:29 arch systemd[1]: Stopped Create Static Device Nodes in /dev.
Jan 31 04:00:29 arch systemd[1]: Reached target System Shutdown.
Jan 31 04:00:29 arch systemd[1]: Reached target Late Shutdown Services.
Jan 31 04:00:29 arch systemd[1]: systemd-poweroff.service: Deactivated successfully.
Jan 31 04:00:29 arch systemd[1]: Finished System Power Off.
Jan 31 04:00:29 arch systemd[1]: Reached target System Power Off.
Jan 31 04:00:29 arch systemd[1]: Shutting down.
Jan 31 04:00:29 arch audit: BPF prog-id=23 op=UNLOAD
Jan 31 04:00:29 arch systemd-shutdown[1]: Syncing filesystems and block devices.
Jan 31 04:00:29 arch systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Jan 31 04:00:29 arch systemd-journald[265]: Received SIGTERM from PID 1 (systemd-shutdow).
Jan 31 04:00:29 arch systemd-journald[265]: Journal stopped

I did try SysRq to force sync, kill and reboot the system but that did not appear to do anything...

Offline

#12 2023-02-08 06:19:00

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

Re: System freezes while trying to sleep

I updated the kernel to linux-6.1.9.arch1-2.
Afterwards, I tried suspending several times and so far it's been successful.

Offline

#13 2023-02-08 15:44:51

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

Re: System freezes while trying to sleep

I'm still on linux and linux-zen 6.1.8.arch1-1, will upgrade now and see if that fixes the issue for me too. Thanks for reporting here @kaztai.

Offline

#14 2023-02-17 11:21:40

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

Re: System freezes while trying to sleep

I was almost convinced that the kernel update fixed the issue... until now. The same freeze happened again, and this time I remembered to try the SysRq keys, but unfortunately they did not do anything, I tried both force sync and reboot. These were the final lines in the journal:

Feb 17 13:55:23 arch systemd[1]: nvidia-suspend.service: Deactivated successfully.
Feb 17 13:55:23 arch systemd[1]: Finished NVIDIA system suspend actions.
Feb 17 13:55:23 arch audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=nvidia-suspend comm="systemd" exe="/usr/lib/systemd/systemd>
Feb 17 13:55:23 arch audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=nvidia-suspend comm="systemd" exe="/usr/lib/systemd/systemd">
Feb 17 13:55:23 arch kernel: audit: type=1130 audit(1676622323.807:502): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=nvidia-suspend comm="systemd" e>
Feb 17 13:55:23 arch kernel: audit: type=1131 audit(1676622323.807:503): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=nvidia-suspend comm="systemd" e>
Feb 17 13:55:23 arch systemd[1]: Starting System Suspend...
Feb 17 13:55:23 arch systemd-sleep[38763]: Entering sleep state 'suspend'...

Kernel version for reference:

Linux arch 6.1.11-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 09 Feb 2023 20:06:11 +0000 x86_64 GNU/Linux

Last edited by TheDcoder (2023-02-17 11:22:54)

Offline

#15 2023-02-18 11:46:01

dmidge
Member
Registered: 2015-04-04
Posts: 68

Re: System freezes while trying to sleep

I have the same issue on my laptop, an aspire-e15. I let the system sleep when there is a long inactivity, but sometimes it works, sometimes it fails.

It started about 6 months ago. I was wondering if it could be a hardware issue, where the ACPI calls fails sometimes. Any thought on it, or the best step to debug it?

Offline

#16 2023-02-19 21:32:13

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

Re: System freezes while trying to sleep

It happened again just now, I used the suspend option and when I got back, the laptop was still running, and I also noticed that the fans were running at high-speed (this happens sometimes). Here are the last few lines from the journal as usual:

Feb 20 02:33:35 arch systemd[1]: Starting System Suspend...
Feb 20 02:33:35 arch systemd-sleep[11460]: Entering sleep state 'suspend'...
Feb 20 02:33:35 arch kernel: PM: suspend entry (deep)
dmidge wrote:

I was wondering if it could be a hardware issue, where the ACPI calls fails sometimes. Any thought on it, or the best step to debug it?

Same here... is there any way to debug this issue at all? Seems very low-level to me... :-/

Offline

#17 2023-02-25 03:21:20

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

Re: System freezes while trying to sleep

Happened again, the logs show the same stuff. One interesting thing to note is that I had a ~2.8 GiB file in tmpfs, it may or may not be related to the issue.

Offline

#18 2023-02-25 07:09:16

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: System freezes while trying to sleep

Simply OOM vs. zswap? Do you have a swap partition/file?
https://bbs.archlinux.org/viewtopic.php … 2#p2063182

Online

#19 2023-02-25 15:03:25

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

Re: System freezes while trying to sleep

Hi seth,

I had more than ample RAM left, so if you are suggesting that the issue might've been due to low memory, that's not true. To answer your question, yes, I do have a swap file on my EXT4 data partition which resides on a spinny disk.

I went through the linked thread briefly and I didn't like what I read about zswap, so I'll disable it from now on to see if that makes a difference.

Offline

#20 2023-02-25 15:07:53

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: System freezes while trying to sleep

It probably won't matter though if you had "more than ample RAM" left.
You don't have a parallel windows installation either?

https://01.org/blogs/rzhang/2015/best-p … ate-issues

Online

#21 2023-02-25 15:17:52

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

Re: System freezes while trying to sleep

I do have a Windows installation, but I don't use it regularly and I've configured it to fully shutdown (not the hybrid shutdown), so I don't think it's interfering with anything... am I wrong?

Thanks for sharing that link, some very good information in there... I might try a few of those steps to try and narrow down the issue.

Offline

#22 2023-02-25 15:26:54

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: System freezes while trying to sleep

Since windows keeps silently re-enabling fast-start w/ updates, I'd check to make sure it's still disabled.

Online

#23 2023-02-25 15:38:40

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

Re: System freezes while trying to sleep

Just checked it, and yep, still disabled.

Offline

#24 2023-03-25 08:44:12

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

Re: System freezes while trying to sleep

I previously wrote that the issue was fixed after updating to 6.1.9, but that was not the case. The problem still persists even with kernel updates up to 6.2.6.
The only known workaround for me at this time is to roll back the kernel to 6.0.12.
Is there any way to investigate the cause of the problem?

Offline

#25 2023-03-25 11:58:50

seth
Member
Registered: 2012-09-03
Posts: 49,993

Online

Board footer

Powered by FluxBB