# Let's get Hibernation working

**URL:** <https://community.mnt.re/t/lets-get-hibernation-working/1678>\
**Category:** MNT Reform\
**Created:** [October 4, 2023, 3:07pm UTC](https://community.mnt.re/t/lets-get-hibernation-working/1678 "2023-10-04T15:07:05Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![2disbetter](https://community.mnt.re/user_avatar/community.mnt.re/2disbetter/32/303_2.png) [@2disbetter](https://community.mnt.re/u/2disbetter)\
**Post date:** [April 23, 2024, 5:52pm UTC](https://community.mnt.re/t/lets-get-hibernation-working/1678/21 "2024-04-23T17:52:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![crypt](https://community.mnt.re/user_avatar/community.mnt.re/crypt/32/714_2.png) [@crypt](https://community.mnt.re/u/crypt)\
**Post date:** [May 1, 2024, 8:08am UTC](https://community.mnt.re/t/lets-get-hibernation-working/1678/22 "2024-05-01T08:08:55Z")

</div>

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

Might be worth a try

---

<div class="post-metadata">

**Author:** ![jfred](https://community.mnt.re/user_avatar/community.mnt.re/jfred/32/485_2.png) [@jfred](https://community.mnt.re/u/jfred)\
**Post date:** [January 23, 2025, 2:35am UTC](https://community.mnt.re/t/lets-get-hibernation-working/1678/23 "2025-01-23T02:35:20Z")

</div>

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](https://community.mnt.re/t/lets-get-hibernation-working/1678/3)) 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](https://docs.kernel.org/power/basic-pm-debugging.html) 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!

---

<div class="post-metadata">

**Author:** ![jfred](https://community.mnt.re/user_avatar/community.mnt.re/jfred/32/485_2.png) [@jfred](https://community.mnt.re/u/jfred)\
**Post date:** [January 23, 2025, 3:43am UTC](https://community.mnt.re/t/lets-get-hibernation-working/1678/24 "2025-01-23T03:43:32Z")

</div>

Ahhh, I see - so [this is where hibernation terminates when running a `devices` test](https://github.com/torvalds/linux/blob/7004a2e46d1693848370809aa3d9c340a209edbb/kernel/power/hibernate.c#L419-L422).

Looks like during a `platform` test, we call `create_image()`, which calls [`dpm_suspend_end(PMSG_FREEZE)`](https://github.com/torvalds/linux/blob/7004a2e46d1693848370809aa3d9c340a209edbb/kernel/power/hibernate.c#L306) and [`platform_pre_snapshot(platform_mode)`](https://github.com/torvalds/linux/blob/7004a2e46d1693848370809aa3d9c340a209edbb/kernel/power/hibernate.c#L312). 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.

[Previous page](https://community.mnt.re/t/lets-get-hibernation-working/1678.md?page=1)
