You are not logged in.

#1 2020-06-13 13:25:11

jerryDaBaaws
Member
Registered: 2020-06-08
Posts: 115

Can't get hibernate to work

So afaik the last kernel update broke the swap file which was created using the fallocate command.
So after after turning swap off and deleting the old swap, I created a new one using:

    dd if=/dev/zero of=/swapfile bs=1M count=8192 status=progress
    chmod 600 /swapfile
    mkswap /swapfile
    swapon /swapfile

lsblk output :

/dev/sda    931.5G disk        
├─/dev/sda1 361.3G part vfat   
├─/dev/sda2   239G part ext4   
├─/dev/sda3 330.5G part ext4   /
└─/dev/sda4 699.7M part vfat   /boot/EFI
/dev/sr0     1024M rom  

fstab

# /dev/sda3
UUID=d9348b6e-f435-4ed8-b910-5f31e2d3d606	/         	ext4      	rw,relatime	0 1

# /dev/sda4
UUID=8DB8-1CEA      	/boot/EFI      	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 2

/swapfile none swap defaults 0 0

I have resume hook in /etc/mkinitcpio.conf and resume,resume_offset as boot parameters , whose values I double checked

but on running systemctl hibernate I'm getting

Failed to hibernate system via logind: Not enough swap space for hibernation

any idea why ?

side question: As per the fstab entry, shouldn't swapfile should be shown as mounted in lsblk output ?

Edit: My RAM size is of 8GB

Last edited by jerryDaBaaws (2020-06-13 13:30:58)

Offline

#2 2020-06-13 13:48:53

finoderi
Member
Registered: 2020-06-12
Posts: 76

Re: Can't get hibernate to work

In your kernel parameters you should have this:

resume=UUID=d9348b6e-f435-4ed8-b910-5f31e2d3d606

- the same UUID as your root partition.

As per the fstab entry, shouldn't swapfile should be shown as mounted in lsblk output ?

No, if it's a swap file, it shouldn't.

On a side note, I don't think you really need 'relatime' parameter, 'noatime' would be better, but I could be wrong...

Offline

#3 2020-06-13 14:43:05

jerryDaBaaws
Member
Registered: 2020-06-08
Posts: 115

Re: Can't get hibernate to work

resume=UUID=d9348b6e-f435-4ed8-b910-5f31e2d3d606

I think they are pretty much the same thing , I did mention hibernate was working before with these same settings.
also changing it to UUID also dosn't make any difference.

Offline

#4 2020-06-13 16:14:41

finoderi
Member
Registered: 2020-06-12
Posts: 76

Re: Can't get hibernate to work

I've just checked to be sure - hibernation works. In my case it's btrfs root partition and systemd-boot. And I use 'systemd' hook only in mkinitcpio - no 'udev' or 'resume'. So may be this issue has something to do with GRUB or other boot loaders that you're using.

Offline

#5 2020-06-22 12:24:27

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,653
Website

Re: Can't get hibernate to work

Mod note: Splitting shuruper's issue off into a separate topic, as it's likely a different issue to the one experienced by the op of this topic.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB