Tool/software: Linux
Hi,
I'm working with a custom board based on the Beaglebone Black running TI-linux-kernel v 4.9.41. I would like to know the proper configuration to use the 'disk' option under '/sys/power/state'.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Linux
Hi,
I'm working with a custom board based on the Beaglebone Black running TI-linux-kernel v 4.9.41. I would like to know the proper configuration to use the 'disk' option under '/sys/power/state'.
Hi Mauricio,
First find out what states are supported:
cat /sys/power/state
If "disk" state is not supported you should enable that option in the menuconfig:
Power management options --->
Hibernation (aka 'suspend to disk')
You can find some details in the Linux kernel documentation at:
www.kernel.org/.../basic-pm-debugging.txt
and:
processors.wiki.ti.com/index.php
BR
Tsvetolin Shulev
Hi,
All the power management options are available. The content of '/sys/power/state' is 'freeze standby mem disk'. When I try to suspend to disk using 'echo disk > /sys/power/state' the output is :
-sh: echo: write error: No such device
And the output of dmesg is:
[16325.636137] PM: Syncing filesystems ...
[16325.641252] done.
[16325.641329] Freezing user space processes ... (elapsed 0.002 seconds) done.
[16325.643610] PM: Basic memory bitmaps created
[16325.643642] PM: Preallocating image memory... done (allocated 35603 pages)
[16325.986388] PM: Allocated 142412 kbytes in 0.34 seconds (418.85 MB/s)
[16325.986425] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
[16326.002862] PM: freeze of devices complete after 9.617 msecs
[16326.008641] PM: late freeze of devices complete after 5.689 msecs
[16326.015176] PM: noirq freeze of devices complete after 6.458 msecs
[16326.015229] Disabling non-boot CPUs ...
[16326.015270] PM: Creating hibernation image:
[16326.015270] PM: Need to copy 35481 pages
[16326.015270] PM: Normal pages needed: 35481 + 1024, available pages: 95066
[16326.015270] PM: Hibernation image created (35481 pages copied)
[16326.019984] PM: noirq thaw of devices complete after 4.537 msecs
[16326.024731] PM: early thaw of devices complete after 4.053 msecs
[16326.028675] Suspended for 1.450 seconds
[16326.158560] PM: thaw of devices complete after 133.731 msecs
[16326.162968] PM: writing image.
[16326.163016] PM: Cannot find swap device, try swapon -a.
[16326.163040] PM: Cannot get swap writer
[16326.275069] PM: Basic memory bitmaps freed
[16326.275154] Restarting tasks ... done.
I've read the basic-pm-debugging.txt document and it doesn't mention the swap device.
How do I configure the swap device? Do I need a partition ?
I checked and reproduced the issue. The issue is reported to power management experts but analyzing will take some time.
BR
Tsvetolin Shulev