You are not logged in.

#1 2017-08-17 22:54:22

zuntik
Member
Registered: 2017-08-11
Posts: 37

[Solved] Improve Hibernation times

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

#2 2017-08-18 10:59:29

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [Solved] Improve Hibernation times

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

#3 2017-08-18 16:46:42

zuntik
Member
Registered: 2017-08-11
Posts: 37

Re: [Solved] Improve Hibernation times

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

Board footer

Powered by FluxBB