Enable hibernate guide 27 October 2022, 21:51:11 I succesfully use artix runit KDE on a laptop. Sleep suspend and resume work correctly. Hibernation also seems to work but actually the system just shuts down. I would like to properly enable hibernate to the swap file but after readinghttps://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernationandhttps://wiki.archlinux.org/title/Kernel_parameters#GRUBI start to panic.I would appreciate a guide in the wiki for first-timers.Code: [Select]x360:[root]:/home/art# cat /proc/cmdlineBOOT_IMAGE=/boot/vmlinuz-linux root=UUID=68abdd14-9ad9-4009-a96c-60d12937c089 rw net.ifnames=0 quietx360:[root]:/home/art# filefrag -v /swapfileFilesystem type is: ef53File size of /swapfile is 8589934592 (2097152 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 221183: 303104.. 524287: 221184: 1: 221184.. 483327: 557056.. 819199: 262144: 524288: 2: 483328.. 546815: 821248.. 884735: 63488: 819200: 3: 546816.. 708607: 886784.. 1048575: 161792: 884736: 4: 708608.. 1200127: 1081344.. 1572863: 491520: 1048576: 5: 1200128.. 1689599: 1607680.. 2097151: 489472: 1572864: 6: 1689600.. 2097151: 2129920.. 2537471: 407552: 2097152: last,eof/swapfile: 7 extents found
Re: Enable hibernate guide Reply #1 – 28 October 2022, 01:27:41 Where's resume= and resume_offset= on your kernel command line? Did you edit /etc/default/gruband run update-grub?
Re: Enable hibernate guide Reply #2 – 28 October 2022, 14:05:33 Quote from: capezotte – on 28 October 2022, 01:27:41Where's resume= and resume_offset= on your kernel command line? Did you edit /etc/default/gruband run update-grub?I have never altered it. Just read the guides, took a look into the files mentioned there, but made no changes to them. Just posted them above to illustrate what I have learnt so far and where is my starting point. I realize this sounds helpless, but currently I will not be able to sort things out if I made any mistake along the steps I hardly understand....
Re: Enable hibernate guide Reply #3 – 31 October 2022, 18:50:27 Please beware that the instruction below may be no longer up-to-date. Also when updating /boot/grub/grub.cfg (step 4 below) Code: [Select]# update-grub may be required.However, you spurred my ambition... I selected for testing my obsolete disk of smaller capacity that still kept the system before cloning. The whole process is simple but not very friendly. It can be summarized as follows:Add a resume runtime hook to the /etc/mkinitcpio.conf, ex.Code: [Select]HOOKS=(base udev autodetect keyboard modconf block filesystems resume fsck)Regenerate manually the initramfsCode: [Select]# mkinitcpio -PWarnings of missing firmware were interesting, but did not matter for now.Add a resume kernel parameter (additional arguments to the Linux image) to the etc/default/grub file, As I use a a swap file instead of a partition, I also needed a resume_offset kernel parameter. I knew it from the commands explained in the post above.ex. Code: [Select]GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=56a369ef-06a0-49fe-bf8b-acb1165f615d resume_offset=3850240 quiet"Nb. do not edit the GRUB_CMDLINE_LINUX value"Populate" new arguments from the /etc/default/grub file to the /boot/grub/grub.cfg with a single command regenerating the latter:Code: [Select]# grub-mkconfig -o /boot/grub/grub.cfgRebootIf curious recheck your new kernel command line parameters:Code: [Select]# cat /proc/cmdlineBOOT_IMAGE=/boot/vmlinuz-linux root=UUID=56a369ef-06a0-49fe-bf8b-acb1165f615d rw net.ifnames=0 resume=UUID=56a369ef-06a0-49fe-bf8b-acb1165f615d resume_offset=3850240 quietHibernate, ex. from your DE.Please correct the above if I erred or ommited anything. In my case from Plasma to hibernate and back after resume I was taken to the lock-screen.I would also appreciate if anyone elaborated the above on what point and how to run # update-grub. Last Edit: 16 March 2023, 12:58:30 by kur-ka 2 Likes