Hibernating iMX6 Linux to SD/MMC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hibernating iMX6 Linux to SD/MMC

3,914 Views
dmitryv
Contributor II

Hi All,

I'm looking for a reliable way to suspend (hibernate) iMX6 Linux-based device by saving its state to a non-volatile memory (say, SD/MMC or NAND) upon unexpected power down event (yes, there is a small power back up to do it). Of course there should be a way to restore the system state after powering on. I guess this is more generic question rather than iMX- or BSP-specific. But anyway... I found a couple of articles on the Web about this topic but it is not clear how usable they are:

https://wiki.archlinux.org/index.php/Suspending_to_Disk_with_hibernate-script

Suspend To Disk For ARM - eLinux.org

If somebody has such experience or knows a good direction to dig - could you please share with me?

Thanks!

--

Dmitry Varakin

Labels (2)
0 Kudos
Reply
4 Replies

1,696 Views
AnsonHuang
NXP Employee
NXP Employee

Hi,

     Not sure whether you really want a hibernate feature, we didn't have software release that support hibernation, although I did try it before and the kernel is working, but many drivers still need to do a lot of work to make the feature stable enough, as when hibernated, the whole chip will be power off, so when system resume, all the modules may need to recover its status.

     So, I suggest you use STR(suspend to RAM) instead of hibernate, use "echo mem > /sys/power/state" to make system suspend into RAM. Then use power key or RTC or other wakeup source to wake up system.

1,696 Views
fabio_estevam
NXP Employee
NXP Employee

You can put the system in low power mode as:

echo mem > /sys/power/state

Then you can use an interrupt source to wakeup the processor.

0 Kudos
Reply

1,696 Views
dmitryv
Contributor II

Hi Fabio,

This brings the processor to low power mode which still requires external power supply to maintain it. The customer has solved the problem by backporting hibernation mode from a newer kernel version.

--

Dmitry

0 Kudos
Reply

1,696 Views
rupeshpaterical
Contributor I

Hi Dmitry,

Can you kindly share more details on the details of the backporting done to implement hibernation mode.

We use iMX6 with Linux L3.10.9_1.0.0-alpha, 10/2013,   but still could not succeed in putting the board in hibernation. Other low power modes ( "mem", "standby" ) are found to be working.

Our customer needs the board to move to hibernation.  We also tried to implement the feature using a swap file and pm-hibernate combination, but the board is not moving to hibernation.

Rupesh

0 Kudos
Reply