You are not logged in.

#1 2015-03-28 16:32:27

rasr11
Member
Registered: 2012-03-26
Posts: 39

[Solved] How to change image_size to control image size hibernation?

I have enabled hibernation in my computer which has RAM of 3GB and swap partition of 3.2GB. I checked this in arch linux wiki "You may either decrease the value of /sys/power/image_size to make the suspend image as small as possible (for small swap partitions), or increase it to possibly speed up the hibernation process. "

I want to increase the image_size. The problem is I can't change the file, whenever I change the value using root in the next reboot it takes its default value (2/5*3GB).

Can anyone suggest the proper way to change this file?

Last edited by rasr11 (2015-04-12 01:48:37)

Offline

#2 2015-03-28 18:05:20

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved] How to change image_size to control image size hibernation?

Set it to a desired value on boot, e.g. by using https://wiki.archlinux.org/index.php/Sy … rary_files.

Offline

#3 2015-03-29 02:54:13

rasr11
Member
Registered: 2012-03-26
Posts: 39

Re: [Solved] How to change image_size to control image size hibernation?

Archwiki says " 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."

I don't know what to do in this specific scenerio.

Offline

#4 2015-03-29 10:06:30

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved] How to change image_size to control image size hibernation?

Perhaps you should see if it works?

/sys/power should be available without loading any modules.

Offline

#5 2015-03-29 14:12:59

rasr11
Member
Registered: 2012-03-26
Posts: 39

Re: [Solved] How to change image_size to control image size hibernation?

Thanks you lucke, it works. Also is there anyway to know the actual size of image file of last hibernation?

Last edited by rasr11 (2015-03-29 14:14:02)

Offline

#6 2015-03-29 14:49:21

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved] How to change image_size to control image size hibernation?

It might be in dmesg.

Offline

#7 2015-03-29 15:36:30

rasr11
Member
Registered: 2012-03-26
Posts: 39

Re: [Solved] How to change image_size to control image size hibernation?

Thank you lucke. Found the size by dmesg -k.

Offline

#8 2015-03-29 16:01:39

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] How to change image_size to control image size hibernation?

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2017-08-18 16:45:36

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

Re: [Solved] How to change image_size to control image size hibernation?

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

Last edited by zuntik (2017-08-18 16:47:22)

Offline

#10 2017-08-18 19:04:43

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [Solved] How to change image_size to control image size hibernation?

Thank you for your feedback zuntik, but this thread is over two years old and marked solved. https://wiki.archlinux.org/index.php/Co … bumping.22


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB