IMX8MP Android Hibernate

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IMX8MP Android Hibernate

791 次查看
persandberg
Contributor II

Have someone tried to hibernate with suspend-to-disk on Android13/14 and got it working?

The system is build with Kernel config paramters as follow:

CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATE_CALLBACKS=y
CONFIG_HIBERNATION=y
CONFIG_HIBERNATION_SNAPSHOT_DEV=y
CONFIG_PM_STD_PARTITION="/dev/block/mmcblk2p14"
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y

 

The error we get is:

 

[ 1039.323435] PM: hibernation: Creating image:
[ 1039.323435] PM: hibernation: Need to copy 179787 pages
[ 1039.323435] PM: hibernation: Normal pages needed: 179787 + 1024, available pages: 270631
[ 1039.323435] PM: hibernation: Memory allocation failed
[ 1039.323435] PM: hibernation: Error -12 creating image

0 项奖励
回复
3 回复数

723 次查看
jamesbone
NXP TechSupport
NXP TechSupport
  • File system inconsistency

Hibernation requires user create the hibernation image each time. The hibernation image stores memory information and can restore system then. File system has the inode and the related information also in the memory so it will be stored with hibernation images. This is good for most of PC, NB. But it is not practical for most embedded system. We would like to create hibernation image once and always restore system from the image. It's so call Single Image mode. On my approach, I tried to use ram disk as Android System partition. The ram disk will be part of hibernation and then we can restore from system using the same image every time.

0 项奖励
回复

748 次查看
persandberg
Contributor II

We are using Technexion Wandboard EDM-G-IMX8MP. It uses the NXP PMIC PCA9450C.

Our problems start with memory allocations for hibernation images. We suspect this is prior to stopping/starting the PMIC.

We are currently executing on Android 13 where we have made a swap partition:

                       total      used        free        shared    buffers

Mem:             1.6G        808M       857M     584K        708K

-/+ buffers/cache:    807M        858M

Swap:            6.0G       473M        5.5G

Swap is allocated from a dedicated swap partition residing on disk (eMMC).

When we hibernate the system, it seems we are running out of memory. However, we should have enough. What could be the problem?

0 项奖励
回复

775 次查看
jamesbone
NXP TechSupport
NXP TechSupport

Which board are you using? to test?  Since there is some dependency to the PMIC of the board to get the Hibernation available.

0 项奖励
回复