You are not logged in.

#1 2016-04-03 21:47:51

paulmak
Member
Registered: 2016-04-03
Posts: 6

[Solved] Hibernation issue.

Hello ,

First of all, thanks for reading my issue.

I've been trying to get hibernate to work without any success. Upon attempting to hibernate the screen goes black with only the mouse visible, then turns off, a second later turns back on to blackness showing the mouse, then turns off for good. Afterwards, starting the system seems like a normal boot and no state is saved or resumed.

Swap seems to work...besides trying to hibernate.

My partitions:
/dev/sda1 - efi boot partition
/dev/sda2 - swap partition  (4gb, same as my ram size)
/dev/sda3 - root

I'm booting directly with efibootmgr (no bootloader).
My efi partition (sda1) is mounted in /boot.
My fstab is correctly generated, containing records for the swap(sda2) and the root (sda3) using uuids.

The "/etc/mkinitcpio.conf" file has my hooks as: HOOKS="base udev resume autodetect modconf block filesystems keyboard fsck". From what I've read, placing "resume" after "udev" is proper?

After adding "resume", I then run "mkinitcpio -p linux", seems to be successful.
(done with arch installation usb, after the following commands. "mount /dev/sda3 /mnt" "swapon /dev/sda2" "mount /dev/sda1 /mnt/boot" "arch-chroot /mnt /bin/bash" )


The efi entry is added like this, in reference to the wiki , https://wiki.archlinux.org/index.php/EF … bootmgr.29 :
efibootmgr -d /dev/sda -p 1 -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/sda3 rw resume=/dev/sda2 initrd=/initramfs-linux.img"

running efibootmgr -v shows:
Boot0000* Arch Linux    HD(1,GPT,d8d1753b-b3dd-4875-a007-80d9f929b03c,0x800,0x32000)/File(\vmlinuz-linux)r.o.o.t.=./.d.e.v./.s.d.a.3. .r.w. .r.e.s.u.m.e.=./.d.e.v./.s.d.a.2. .i.n.i.t.r.d.=./.i.n.i.t.r.a.m.f.s.-.l.i.n.u.x...i.m.g.
-(Those periods are annoying)

And thats it. From what I understand to get hibernate to work I need to: add resume to my hooks (done), update initramf by running mkinitcpio -p linux (done), make sure my efi boot entry has the resume variable pointing to my swap sda2 (done).

If anyone has any idea how I can proceed to get hibernate to work, please let me know. Much appreciated!

Last edited by paulmak (2016-04-10 06:43:15)

Offline

#2 2016-04-06 02:12:15

paulmak
Member
Registered: 2016-04-03
Posts: 6

Re: [Solved] Hibernation issue.

Issue solved, check your "/sys/power/image_size". Supposedly this value is defaulted to 2/5 of your ram. Set mine to the same size as my swap(4,000,000,000 for 4gb) got things working. Since the issue I've also set a custom hostname which solved many other issues and potential helped with this one as well. I was assuming its alright to leave your hostname unset and use "localhost"  (at least for kde, idk??)  but for reasons beyond me it seems necessary to set your own.

Offline

#3 2016-04-06 02:22:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Hibernation issue.

You do need to set a hostname; it solves all manner of issues...

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB