You are not logged in.

#1 2018-06-01 14:17:57

onexused
Member
Registered: 2009-10-07
Posts: 79

Hard drive sometimes doesn't resume from s2ram

I got a Lenovo Thinkpad T520 and installed Arch Linux 64-bit.  Sometimes when resuming from sleep / s2ram (closing, opening the lid), I suspect the hard drive doesn't spin back up properly as programs work until they try to access the disk, at which point they freeze.  I can't reboot properly and have to hold the power button to shut down.  An SD card inserted before s2ram can still be accessed.  The mouse cursor in X still moves around and things in RAM seem to be able to be accessed.  I cannot predict after which s2ram this will happen.  Downgrading to linux-lts (currently 4.14.44) doesn't solve this as it did for me with a previous machine: https://bbs.archlinux.org/viewtopic.php?id=222669

Edit: My systems haven't reacted to SysRq for years, so I can't use this to assist reboot.

Last edited by onexused (2018-06-01 14:21:18)

Offline

#2 2018-06-01 16:58:59

loqs
Member
Registered: 2014-03-06
Posts: 5,204

Re: Hard drive sometimes doesn't resume from s2ram

onexused wrote:

Edit: My systems haven't reacted to SysRq for years, so I can't use this to assist reboot.

Have you overriden /usr/lib/sysctl.d/50-default.conf setting kernel.sysrq=16 which only allows sync?

Offline

#3 2018-06-01 22:04:44

onexused
Member
Registered: 2009-10-07
Posts: 79

Re: Hard drive sometimes doesn't resume from s2ram

loqs wrote:
onexused wrote:

Edit: My systems haven't reacted to SysRq for years, so I can't use this to assist reboot.

Have you overriden /usr/lib/sysctl.d/50-default.conf setting kernel.sysrq=16 which only allows sync?

I have now.
Of course, the freezing issue still stands.

Offline

#4 2018-06-02 07:55:01

seth
Member
Registered: 2012-09-03
Posts: 7,564

Re: Hard drive sometimes doesn't resume from s2ram

Did you look at the dmesg tail (more than ten lines, though) on such incident? Might reveal an error response or whether the disk showed up at all.
You could also try to make hdparm talk to the disk (eg. -z) to see whether that works. (best call hdparm before the S3 and copy it to some tmpfs - otherwise you won't be able to call it on a flawed resume)

Online

#5 2018-06-06 16:39:55

onexused
Member
Registered: 2009-10-07
Posts: 79

Re: Hard drive sometimes doesn't resume from s2ram

Though this has happened twice since your post, I haven't been able to find anything out.  I haven't yet been able to call dmesg after the freeze because every terminal emulator has been in use (and if I close a program, I don't get the prompt/shell).  hdparm -z tells me "BLKRRPART failed: Device or resource busy".  Obviously, journalctl isn't useful because nothing's written to disk after a resume where this happens.

I'll pull up a terminal emulator that just sits there unused and wait for the issue to happen again.

Offline

#6 2018-06-06 18:28:28

seth
Member
Registered: 2012-09-03
Posts: 7,564

Re: Hard drive sometimes doesn't resume from s2ram

You can just run "dmesg -w" in an xterm. But you'll likely just get ioctl errors because the drive doesn't respond.
Does this only happen on battery or also on PSU?

Online

#7 2018-06-07 23:54:37

onexused
Member
Registered: 2009-10-07
Posts: 79

Re: Hard drive sometimes doesn't resume from s2ram

seth wrote:

You can just run "dmesg -w" in an xterm. But you'll likely just get ioctl errors because the drive doesn't respond.

That as well as `journalctl -f` are running, waiting for a problem.

seth wrote:

Does this only happen on battery or also on PSU?

I haven't noticed.  I'll pay attention next time.

Offline

#8 2018-06-11 15:49:03

onexused
Member
Registered: 2009-10-07
Posts: 79

Re: Hard drive sometimes doesn't resume from s2ram

During the normal course of use, I've suspended it several times while plugged in, and several while on battery.  Twice it froze when suspended while on battery, but never while plugged in.

Offline

#9 2018-06-11 20:45:41

seth
Member
Registered: 2012-09-03
Posts: 7,564

Re: Hard drive sometimes doesn't resume from s2ram

Assuming the pattern holds, check whether the battery produces enough voltage by comparing

cat /sys/class/power_supply/BAT1/voltage_now

Also compare the charge_full and charge_full_design on whether the battery has aged a lot.

Online

#10 2018-06-12 15:48:47

onexused
Member
Registered: 2009-10-07
Posts: 79

Re: Hard drive sometimes doesn't resume from s2ram

full - 61100000
full_design - 84240000
voltage_now (100%) - 12383000
voltage_now (5%) - 10772000
(battery's label says 11.1v)

Offline

#11 2018-06-12 15:59:49

seth
Member
Registered: 2012-09-03
Posts: 7,564

Re: Hard drive sometimes doesn't resume from s2ram

So on low charge, the battery is undervoltaged and that might be too low to spin up the drive.
=> The interesting question is whether the low charge correlates to the low voltage correlates to the spin up failure.

Online

#12 2018-06-24 19:14:37

onexused
Member
Registered: 2009-10-07
Posts: 79

Re: Hard drive sometimes doesn't resume from s2ram

Low voltage correlates to low charge, at least in alkaline batteries, judging by how I was taught to test them with a multimeter.  However, the battery reports 10.189 (?) volts now at 41%, and reported 10.772 earlier at 5%.
After 12 days, I haven't been able to get the sleep/resume to fail while the laptop is plugged in, but it's not always possible to keep it plugged in while sleeping, so I don't consider this a good workaround.
I perhaps should make a point of sleeping and resuming the laptop more often to collect data.

Offline

Board footer

Powered by FluxBB