You are not logged in.

#1 2018-07-05 11:51:55

geo909
Member
Registered: 2008-09-07
Posts: 309

[SOLVED] Laptop does not resume session from hibernation

Dear all,

I am trying to get hibernation to work on my Dell latitude e6330. Mind that I'm not running any Desktop, just the i3 window manager.
When I do `systemctl hibernate`, the screen turns off for a second, then on for a couple of seconds, and then the computer turns off. When I power on the computer again, it's like doing a regular boot, nothing is restored from previously.

I followed the instructions in the wiki, and I did the following:

First I created a swap file and configured it as follows:

sudo fallocate -l 8G /swapfile
sudo chmod 600 swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Then put this in my fstab:

/swapfile none swap defaults 0 0

Then dealt with grub. First, I put this line in my `/etc/default/grub`:

GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=25702c22-e5e2-4906-8144-23f668f09391 resume_offset=31653888"

where the UUID is the one of the partition where "/" is mounted (so, the partition where the swapfile lies in). For the offset number, I got it by:

sudo filefrag -v /swapfile | head -n 4
Filesystem type is: ef53
File size of /swapfile is 8589934592 (2097152 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..       0:   31653888..  31653888:      1:  

Then I generated the new grub configuration file:

sudo grub-mkconfig -o /boot/grub/grub.cfg

Then, I added "resume" in the mkinitcpio hooks:

> cat /etc/mkinitcpio.conf | grep HOOKS
# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
#    HOOKS=(base)
#    HOOKS=(base udev autodetect block filesystems)
#    HOOKS=(base udev block filesystems)
#    HOOKS=(base udev block mdadm encrypt filesystems)
#    HOOKS=(base udev block lvm2 filesystems)
HOOKS=(base udev autodetect modconf block resume filesystems keyboard fsck)

and generated the images.

sudo mkinitcpio -p linux

I don't miss something, right? I had no errors or warnings during the above, nor could I find any problem in dmesg or journalctl after the resume. You can check them here if you want:
dmesg: https://pastebin.com/jEadCwGV
journalctl: https://pastebin.com/zDHD9Lxz

Any pointing to the right direction would be appreciated. Thank you in advance.

Last edited by geo909 (2018-07-06 12:21:19)

Offline

#2 2018-07-05 15:02:06

seth
Member
Registered: 2012-09-03
Posts: 51,014

Re: [SOLVED] Laptop does not resume session from hibernation

The journal from the last boot (the one that shuts down instead of hibernating) would be more relevant.
To rule out the obvious: you don't have a parallel windows installation, do you?

Online

#3 2018-07-05 16:24:42

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: [SOLVED] Laptop does not resume session from hibernation

Thanks for the reply.

seth wrote:

To rule out the obvious: you don't have a parallel windows installation, do you?

Yes, I dual boot windows. I had no idea that was an issue. But to be honest from a quick google search, it doesn't appear to be one.. See the answers here, for example. What am I missing?

seth wrote:

The journal from the last boot (the one that shuts down instead of hibernating) would be more relevant.

There was never hibernating.. Not sure which one you mean, so I'll paste here a few. Sorry for spamming with logs, but it's probably easier for you to find what you need this way instead of going back and forth explaining.

  1. When I (try to) hibernate with sudo systemctl hibernate, on the next boot we have:

  2. When I boot after a normal shutdown, we have:

Last edited by geo909 (2018-07-05 16:26:51)

Offline

#4 2018-07-05 16:35:00

seth
Member
Registered: 2012-09-03
Posts: 51,014

Re: [SOLVED] Laptop does not resume session from hibernation

If you look at the end of https://pastebin.com/MMAHbpYB you'll see the system went into hibernation.

Windows becomes a major problem if fast boot is enabled, because in that case windows is already hibernating (there's no "fast boot", that's just marketing BS - windows actually stops some processes and hibernates)
https://www.tenforums.com/tutorials/418 … -10-a.html

Online

#5 2018-07-05 17:09:17

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: [SOLVED] Laptop does not resume session from hibernation

seth wrote:

If you look at the end of https://pastebin.com/MMAHbpYB you'll see the system went into hibernation.

Yes, I noticed that. But on the next boot, nothing resumes, no open windows, nothing. It looks like a fresh boot. So there's something wrong on the resuming phase.

Windows becomes a major problem if fast boot is enabled, because in that case windows is already hibernating (there's no "fast boot", that's just marketing BS - windows actually stops some processes and hibernates)
https://www.tenforums.com/tutorials/418 … -10-a.html

I see. I have windows 7 and these instructions do not seem to apply, there are no 'shutdown settings' nor there is an option for turning off fastboot anywhere, I searched thoroughly. I googled around and some people where talking about disabling fastboot from the bios. There is indeed a fastboot option in my bios, but it is set to perform a normal boot process as far I as undertand, so it shouldn't be it.

Any ideas?

Offline

#6 2018-07-05 20:02:07

seth
Member
Registered: 2012-09-03
Posts: 51,014

Re: [SOLVED] Laptop does not resume session from hibernation

Ok, no - the fakeboot only appeared w/ Win8, so unless you applied some special patches or whatever to Win7 or explicitly hibernated windows, that's not it.
(The BIOS fastboot is completely unrelated and just skips some initial basic HW tests)

Try passing

acpi_osi=! acpi_osi="Windows 2009"

to the kernel parameters - that is essentially "lie to the BIOS about the OS" - notice that this can have undesired side-effects (loss of backlight control etcetc.) but at least we'll know whether that's the reason.

Also try the main kernel and just to be sure: you saw the btrfs warning on the wiki?

Online

#7 2018-07-06 08:37:55

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: [SOLVED] Laptop does not resume session from hibernation

seth wrote:

Ok, no - the fakeboot only appeared w/ Win8, so unless you applied some special patches or whatever to Win7 or explicitly hibernated windows, that's not it.
(The BIOS fastboot is completely unrelated and just skips some initial basic HW tests)

Try passing

acpi_osi=! acpi_osi="Windows 2009"

to the kernel parameters - that is essentially "lie to the BIOS about the OS" - notice that this can have undesired side-effects (loss of backlight control etcetc.) but at least we'll know whether that's the reason.

No, this didn't work. I also removed windows alltogether from the grub menu by puting GRUB_DISABLE_OS_PROBER=true in the grub configuration file, but this didn't work either.

Also try the main kernel

Which is the main kernel? I am using the default, that is,

> uname -r
4.14.52-1-lts

You mean the mainline from aur?

and just to be sure: you saw the btrfs warning on the wiki?

Yes, it's ok, I don't use btrfs.

EDIT: Would creating a swap partition be a better option or the mechanism is the same?

Last edited by geo909 (2018-07-06 08:45:03)

Offline

#8 2018-07-06 12:20:13

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: [SOLVED] Laptop does not resume session from hibernation

Solved! The culprit was a small hack that I was using to auto-login on boot:
https://wiki.archlinux.org/index.php/Ge … al_console

As obvious as it may sound, I only remembered about it now, sorry for the waste of time Seth.

Offline

Board footer

Powered by FluxBB