0

My computer

I have a HP Probook 650G1 notebook, that I have never managed to hibernate with Linux.

I have installed Ubuntu 18.04 with a dedicated swap partition (8.25 Gb), bigger than the installed RAM (8 Gb). No other operating systems are installed.

The problem

With any of these commands:

  • sudo pm-hibernate
  • sudo systemctl hibernate

my computer switches off correctly.

But when I resume, it does a regular boot. The command:

sudo journalctl -b

provides no clues (no special error message).

Software configuration

Kernel: 4.15.0-38-generic

Contents of my /etc/fstab:

# / was on /dev/sda5 during installation
UUID=3197c456-942a-45b2-b8b0-002a81b67e01 /               xfs     defaults        0       0
# /home was on /dev/sda2 during installation
UUID=a2976b22-65d3-46d3-8362-af4c45586937 /home           ext4    defaults        0       2
# swap was on /dev/sda3 during installation
#UUID=8d41a139-a5ae-4a01-8496-b692ba699f2a none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

Contents of /etc/initramfs-tools/conf.d/resume:

RESUME=UUID=8d41a139-a5ae-4a01-8496-b692ba699f2a

If I do this:

$ update-initramfs -u -k all
[sudo] senha para david: 
update-initramfs: Generating /boot/initrd.img-4.15.0-38-generic
cryptsetup: WARNING: failed to detect canonical device of uuid=8d41a139-a5ae-4a01-8496-b692ba699f2a
update-initramfs: Generating /boot/initrd.img-4.15.0-36-generic
cryptsetup: WARNING: failed to detect canonical device of uuid=8d41a139-a5ae-4a01-8496-b692ba699f2a

I had originally this value:

RESUME=UUID=c8ee0bf9-cd8a-4cc2-a6b7-f41e8f5bb71c

If I leave the original value again:

$ sudo update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-4.15.0-38-generic
cryptsetup: WARNING: failed to detect canonical device of uuid=8d41a139-a5ae-4a01-8496-b692ba699f2a
W: initramfs-tools configuration sets RESUME=UUID=c8ee0bf9-cd8a-4cc2-a6b7-f41e8f5bb71c
W: but no matching swap device is available.
update-initramfs: Generating /boot/initrd.img-4.15.0-36-generic
cryptsetup: WARNING: failed to detect canonical device of uuid=8d41a139-a5ae-4a01-8496-b692ba699f2a
W: initramfs-tools configuration sets RESUME=UUID=c8ee0bf9-cd8a-4cc2-a6b7-f41e8f5bb71c
W: but no matching swap device is available.

I suspect of this not to be correct. Maybe another UUID is generated because of cryptsetup. I don't have enough knowledge. If I leave the original value, then I see this trace with journalctl -b when resuming:

After resuming with original UUID:

# journalctl -b | grep swap
Nov 11 09:18:08 halgopotente kernel: zswap: loaded using pool lzo/zbud
Nov 11 09:18:09 halgopotente systemd[1]: Starting Cryptography Setup for cryptswap1...
Nov 11 09:18:09 halgopotente mkswap[1038]: Setting up swap space version 1, size = 8,3 GiB (8854695936 bytes)
Nov 11 09:18:09 halgopotente mkswap[1038]: no label, UUID=ab5d2151-132e-4359-9c2c-7c564792365e
Nov 11 09:18:09 halgopotente systemd[1]: Started Cryptography Setup for cryptswap1.
Nov 11 09:18:09 halgopotente systemd[1]: Found device /dev/mapper/cryptswap1.
Nov 11 09:18:09 halgopotente systemd[1]: Activating swap /dev/mapper/cryptswap1...
Nov 11 09:18:09 halgopotente kernel: Adding 8647164k swap on /dev/mapper/cryptswap1.  Priority:-2 extents:1 across:8647164k SSFS
Nov 11 09:18:09 halgopotente systemd[1]: Activated swap /dev/mapper/cryptswap1.

Contents of /etc/default/grub:

GRUB_THEME=/boot/grub/themes/breeze/theme.txt

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=uuid=8d41a139-a5ae-4a01-8496-b692ba699f2a"

GRUB_CMDLINE_LINUX="acpi_sleep=nonvs"

My Bios is configured to UEFI Hybrid. I've tried also the legacy mode, but hibernation still doesn't work.

Test

I'm not able to try tuxonice because it isn't yet available for Ubuntu 18.04.

Related questions

I'll be happy to include more details if necessary.

1 Answers1

0

Since I have installed the package hibernate, I can hibernate/resume, even though I have to wait some minutes before being able to use my computer after resuming.

 apt install hibernate

Apart from having modified /etc/default/grub.

Other people have solved hibernation like this.