You are not logged in.

#1 2017-09-02 22:56:29

jcarrano
Member
Registered: 2017-09-02
Posts: 4

Laptop freeze when resuming from sleep

I'm having an issue where my laptop sometimes hangs when waking up from sleep.
My previous post (see below) was sent to the dustbin as it involved non-supported software, so I'd like to know how I can fix it in an officially supported way (i.e. without changing the init system like I did).
I hope this time I'm not off topic.

jcarrano wrote:

Let me tell you about a problem I had and how I solved it, in case someone encounters the same issue. I hope it is not off-topic for this forum as it involves some non-vanilla stuff.

I installed Arch on a Samsung Notebook 9 (NP900X5L). The iPXE installer is awesome and everything worked perfect out of the box, with one exception: the machine would sometimes hang when waking up from suspend. Sometimes the screen would be black, sometimes it would present the display manager and hang shortly afterwards and if I tried to switch VTs it would hang. After a while even the keyboard lights would stop working, which made me think the kernel was dying. After powering off and rebooting I couldn't find any logs. That made me suspect maybe I/O was hung.

I tried suspending from text mode. When I resumed, the shell still worked, but if I tried to run any non-builtin command or access the filesystem the shell hung. I set up kernel logging to a VT. Some time after waking up, I started seeing messages like
task XXXXX blocked for more than 120 seconds
And after several tasks blocked and were killed the whole system froze.
After reading around, I tried disabling SSD trim, changing the IO scheduler, disabling swap. Nothing worked and the problem was a mystery. Then I remembered that systemd is well known for causing mysterious bugs (this one bit me before). In an act of desperation I followed the instructions at http://systemd-free.org/ and -without making any backups- changed to OpenRC. I'm used to OpenRC as I used Gentoo before.

After adding myself to the relevant groups, everything worked (almost) perfectly out of the box. It's been some weeks now and many suspend-resume cycles and it did not hang once. The only issue was the Fn keys were not correctly mapped, but I already submitted a patch to systemd/udev with a fix

Offline

#2 2017-09-02 23:11:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 26,972
Website

Re: Laptop freeze when resuming from sleep

How do you suspend? What power management, if any, do you have installed? What is in the journal when you experience a freeze?


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#3 2017-09-02 23:42:31

jcarrano
Member
Registered: 2017-09-02
Posts: 4

Re: Laptop freeze when resuming from sleep

There is nothing in the journal. The last entries are from when the system goes to sleep, and nothing after. I was using the default Arch kernel, with the default systemd backend. I had the problem when I suspended from xfce power manager and also using 'systemd suspend'.

Offline

#4 2017-09-02 23:56:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 26,972
Website

Re: Laptop freeze when resuming from sleep


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#5 2017-09-03 01:00:29

jcarrano
Member
Registered: 2017-09-02
Posts: 4

Re: Laptop freeze when resuming from sleep

If you are you referring to this note:

Note: systemd cannot handle AC and Battery ACPI events, so if you use Laptop Mode Tools or other similar tools acpid is still required.

then I don't see how it could cause a freeze like the one I'm seeing with I/O not working and causing processes to hang, maybe it fails to wake up the SSD?

Offline

#6 2017-09-06 12:00:00

marker5a
Member
Registered: 2010-03-19
Posts: 3

Re: Laptop freeze when resuming from sleep

I confirm the same behavior... Using systemd-suspend, the laptop goes to sleep fine, however waking up, the system is in a quasi-hung state.  I can't interact with my terminal, can;t switch to other TTYs... for all intents and purposes, it is frozen.

Also, nothing in the log.  I noticed this when I upgraded to the latest systemd on september 5

Offline

#7 2019-01-29 14:19:46

Zoey
Member
Registered: 2019-01-29
Posts: 1

Re: Laptop freeze when resuming from sleep

Hi.

I have the same issue when I lock (using i3lock) and close my laptop. I use a laptop with a dual boot (windows 10 and archlinux).
I think it's linked with an other issue that I have : sometimes when I boot on archlinux, the screen display "cannot boot EFI". I solved it by boot on a live and reinstall my kernel (pacman -R linux, pacman -S linux, mkinitcpio linux) but it continue to appear.

I wish it brings more information to this issue.

Offline

#8 2019-01-29 19:41:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 6,443

Re: Laptop freeze when resuming from sleep

This thread is close to two years old, whatever the original cause it is quite unlikely that you *still* have the exact same issue. If you want help with this, make your own thread with information on your own system.

Don't necrobump

Closing.

Offline

Board footer

Powered by FluxBB