So I have a swapfile, and I have already configured in /etc/fstab
to automatically use that swapfile and I have verified this using htop
.
The next issue is that inside /etc/default/grub
I have added the followign lines:
GRUB_DEFAULT='0'
GRUB_TIMEOUT='5'
GRUB_DISTRIBUTOR='EndeavourOS'
GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES loglevel=3'
GRUB_CMDLINE_LINUX="quiet splash resume=/dev/sda1 resume_offset=7288832 radeon.cik_support=0 amdgpu.cik_support=1"
I got the offset by running sudo filefrag -v /swapfile
Filesystem type is: ef53
File size of /swapfile is 17179869184 (4194304 blocks of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 0.. 0: 7288832.. 7288832: 1:
1: 1.. 18431: 7288833.. 7307263: 18431: unwritten
2: 18432.. 51199: 12484608.. 12517375: 32768: 7307264: unwritten
3: 51200.. 83967: 16678912.. 16711679: 32768: 12517376: unwritten
4: 83968.. 116735: 25067520.. 25100287: 32768: 16711680: unwritten
I did run sudo update-grub
but yeah when I try to hibernate, it does shut the computer down but upon boot my session is not restored.
So any idea if I am missing something?
dalto
2
Did you add resume support in mkinicpio/dracut?
No I didn’t where is that file?
dalto
4
Are you using mkinitcpio or dracut?
During the installation I opted in for grub boot loader so I assume I would be using mkinitcpio, how would I verify this?
dalto
6
If you installed off the Cassini ISO where there was a bootloader choice, you should be using dracut.
Check with this:
pacman -Q | grep dracut
If you are using dracut, create a file at /etc/dracut.conf.d/resume.conf
with the following contents:
add_dracutmodules+=" resume "
Then run sudo dracut-rebuild
and reboot.
2 Likes
It appears I am using dracut according to this output:
dracut 056-1
eos-dracut 1.0-2
That actually worked thanks 
Just curious so do I also need to setup resume in /etc/default/grub
as well since we are doing this in /etc/dracut.conf.d/resume.conf
?
Oh, so how come I need to do this extra step where I need to add it to dracut
?
dalto
10
You need to add support for resume to the initram.
It would be the same if you were using mkinitcpio. You would have to add support there as well.
Doesn’t /etc/default/grub
file manage this though?
What does dracut
even do?
dalto
12
Not exactly. You set the kernel options in /etc/default/grub
but you also need to add support to the initrd image.
Dracut builds the initrd.
1 Like
system
Closed
13
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.