You are not logged in.
Pages: 1
Hi,
I wish to improve the hibernation time on my laptop.
I've enbled hibernation already by adding the right parameters on mkinitcpio.conf and the systemd-boot bootloader.
Here, it says that I can improve hibernation time by increasing the value on /sys/power/image_size.
I have a 4 Gib ram and an 8 Gib swap partition.
I would like to know how to change the value of this file (which I believe is 2/5 of 4 Gib) and to what.
Changing it on the file just gets overriden on boot, so I supose I am meant to follow what it says here, on the note, which says:
Note: This method may not work to set options in /sys since the systemd-tmpfiles-setup service may run before the appropriate device modules is loaded. In this case you could check whether the module has a parameter for the option you want to set with modinfo module and set this option with a config file in /etc/modprobe.d. Otherwise you will have to write a udev rule to set the appropriate attribute as soon as the device appears.
But I don't know how to do that.
Thanks
Last edited by zuntik (2017-08-18 16:47:45)
Offline
You should use systemd's tmpfiles to write stuff on files that get overwritten on bootup.
See this and the man pages mentioned on that page.
The note you posted explains a situation where tmpfiles may not work, but I don't think it should be necessary in this case.
If tmpfiles doesn't work for the reason mentioned on the note, I think simply adding the module to your initramfs could also work, but if you must write udev rules for this, see here.
Offline
Ok thanks,
All I had to do was put :
#Type Path Mode UID GID Age Argument
w /sys/power/image_size - - - - 4294967296
in /etc/tmpfiles.d/hibernationsize.conf
Offline
Pages: 1