Let's get Hibernation working

Thank you for your efforts! Here is to you getting more energy to tackle this some more. Really appreciate it. I wonder if the NVME drive not waking is still being an issue here? I wouldn’t expect it because the drive is properly initialize everytime I power on my Reform, so I’m guessing this shouldn’t be an issue.

I wonder if that could be fixed by forcing an unload and reload of the usb drivers.

Might be worth a try

1 Like

I’ve been doing some poking around tonight on my i.MX8MP Pocket Reform after having just tried out the psuspend script, because I’m interested in hibernation support on this thing too.

What’s really interesting to me is that (as @AbortRetryFail noticed way back here) the devices test mode in /sys/power/pm_test seems to work every time for me (provided networking is disabled first, otherwise some tasks fail to freeze), but the same is not true in the processors test mode. And yet, manually offlining and onlining the nonboot cores works just fine.

This seems unusual, because the power management debugging docs mentioned above indicate that the main difference between the two test modes (when not running in platform mode, which isn’t available on the Pocket Reform) is that disabling of nonboot CPUs. Maybe there’s a race of some sort going on?

(EDIT: Though actually wait, the platform test also causes the system to hang despite being in shutdown mode… odd.)

Also interestingly, for a brief period of time during the devices test, the current draw drops to about half of what it’s at during psuspend. So it’s definitely doing something!

1 Like

Ahhh, I see - so this is where hibernation terminates when running a devices test.

Looks like during a platform test, we call create_image(), which calls dpm_suspend_end(PMSG_FREEZE) and platform_pre_snapshot(platform_mode). I think the latter should be a no-op since I think platform_support should be 0, but the former appears to shut down more devices than were shut down during a devices test.

I suppose I should hook up a serial console to this thing to see how far along it gets/if it’s failing in a similar way to the cases from earlier in this thread.

2 Likes