Tiny Core Linux
Tiny Core Extensions => TCE Talk => Extension requests => Topic started by: emninger on November 18, 2015, 01:48:12 PM
-
I do not find nothing in the extensions regard powermanagement, exception made for the xfce power manager. I'd like to have pm-utils to be able to do s2ram.
-
You can set your box to Suspend to RAM like so:
sudo su "root" -c "echo -n mem > /sys/power/state"
If you have a swap partition or a swap file you can use Suspend to DISK:
sudo su "root" -c "echo -n disk > /sys/power/state"
I didn't play with these two yet...
sudo su "root" -c "echo -n standby > /sys/power/state"
sudo su "root" -c "echo -n freeze > /sys/power/state"
-
You can set your box to Suspend to RAM like so:
sudo su "root" -c "echo -n mem > /sys/power/state"
If you have a swap partition or a swap file you can use Suspend to DISK:
sudo su "root" -c "echo -n disk > /sys/power/state"
I didn't play with these two yet...
sudo su "root" -c "echo -n standby > /sys/power/state"
sudo su "root" -c "echo -n freeze > /sys/power/state"
Wow, great! Thanks a lot!
-
sudo su is redundant. su "root" is also redundant.
use sudo sh -c instead.
-
True. Not sure why I had these entries in my WM for so long.
Adjusted. Thanks.
-
Just a question: I created a shell script with the command (corrected ;) ). Now i'd like to find the way how to make it executed on close_lid. But i do not see how.
What i did is to execute it by a fluxbox shortcut (key).
-
I run it from /usr/local/etc/acpi/actions/lm_lid.sh, but acpid needs to be running and there needs to be the right /usr/local/etc/acpi/events/lm_lid pointing to the action
-
....
If you have a swap partition or a swap file you can use Suspend to DISK:
sudo su "root" -c "echo -n disk > /sys/power/state"
....
You're sure it works also with a swapfile (not partition!)? And what would happen, if the swapfile has not enough space? (i set a swapfile of 1 gig which is the same as the ram on the netbook. To not loose too much of disposable space of the internal sata flashdisk, which is pretty fast though. But i see, sometimes there are used for swap 100/200 mb).
-
In theory yes.
https://www.kernel.org/doc/Documentation/power/swsusp-and-swap-files.txt
I couldn't get it to work though.
sudo sh -c "echo -n shutdown > /sys/power/disk" ; sudo sh -c "echo -n disk > /sys/power/state"
sh: write error: No such device
Swap file / partition needs to be larger than RAM.
In addition to the boot code resume=/dev/sdXY , also resume_offset= is needed.
e2fsprogs.tcz contains filefrag which can be used to get the file header offset of the swap file.
sudo filefrag -v /mnt/sda3/tc.swp | grep -m1 "0:"
filefrag doesn't seem to work for a swap file stored on a FAT formatted partition.
-
Ok. Practically, i can live with STR only. It's more a matter of perfectionism to get working STD as well.
In any case, my situation is this: Netbook with 1 gig ram, and 16 gig internal sata flash disk. Since i'm encountering trouble with the zram-swap option and the sata flash is decently fast i thought a swapfile might be an option. Since you're saying it should be larger than the ram: By how much? I'd prefer to waste as little as possible of the storing space ;)
Thanks a lot in advance!