Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate wake up from suspend #17

Closed
acostach opened this issue Jul 6, 2020 · 7 comments
Closed

Investigate wake up from suspend #17

acostach opened this issue Jul 6, 2020 · 7 comments
Assignees

Comments

@acostach
Copy link
Contributor

acostach commented Jul 6, 2020

This issue on nxp's website mentions impossibility of waking up the coral board from sleep, as there are no buttons available on the device, and uart gpios don't work for this.

Check if this is reproducible and see if some gpio or some other input could be used to wake the board up from sleep.

@acostach acostach self-assigned this Jul 6, 2020
@acostach
Copy link
Contributor Author

acostach commented Jul 8, 2020

Reproduced the issue on the coral image, indeed with suspend2idle can be resumed via ttymxc2, and after deep suspend it cannot be resumed anymore via uart.

Initially suspected kernel/dtb differences, but after further investigation I could trace this down to the bootloader image.

Booting with mendel u-boot and Balena kernel, dtb and rootfs I'm able to resume suspend so the issue is likely in the uboot image, which in mendel contains a different imx-atf, and is compiled with a different imx-mkimage.

Below is Balena image booted with mendel u-boot, resuming correctly from suspend:

root@f6f77e9:~# echo mem > /sys/power/state 
[  522.069683] PM: suspend entry (deep)
[  522.073360] PM: Syncing filesystems ... done.
[  522.230673] Freezing user space processes ... (elapsed 0.002 seconds) done.
[  522.239838] OOM killer disabled.
[  522.243068] Freezing remaining freezable tasks ... (elapsed 0.024 seconds) done.
[  522.274709] Suspending console(s) (use no_console_suspend to debug)
[  522.409511] PM: suspend devices took 0.128 seconds
[  522.416264] Disabling non-boot CPUs ...
[  522.440070] IRQ 6: no longer affine to CPU1
[  522.447518] CPU1: shutdown
[  522.447522] psci: CPU1 killed.
[  522.479516] CPU2: shutdown
[  522.479520] psci: CPU2 killed.
[  522.503523] CPU3: shutdown
[  522.503527] psci: CPU3 killed.
[  522.504394] Enabling non-boot CPUs ...
[  522.504994] Detected VIPT I-cache on CPU1
[  522.505017] GICv3: CPU1: found redistributor 1 region 0:0x00000000388a0000
[  522.505064] CPU1: Booted secondary processor [410fd034]
[  522.505668]  cache: parent cpu1 should not be sleeping
[  522.505873] CPU1 is up
[  522.506419] Detected VIPT I-cache on CPU2
[  522.506436] GICv3: CPU2: found redistributor 2 region 0:0x00000000388c0000
[  522.506467] CPU2: Booted secondary processor [410fd034]
[  522.506826]  cache: parent cpu2 should not be sleeping
[  522.507003] CPU2 is up
[  522.507549] Detected VIPT I-cache on CPU3
[  522.507567] GICv3: CPU3: found redistributor 3 region 0:0x00000000388e0000
[  522.507599] CPU3: Booted secondary processor [410fd034]
[  522.507956]  cache: parent cpu3 should not be sleeping
[  522.508160] CPU3 is up
[  522.511288] imx6q-pcie 33800000.pcie: pcie phy pll is locked.
[  522.565978] imx6q-pcie 33c00000.pcie: pcie phy pll is locked.
[  522.653670] PM: resume devices took 0.032 seconds
[  522.775504] OOM killer enabled.
[  522.778647] Restarting tasks ... done.
[  522.784633] PM: suspend exit

Continuing investigation on u-boot/atf side.

@acostach
Copy link
Contributor Author

acostach commented Jul 9, 2020

Fixed by #18

@acostach
Copy link
Contributor Author

acostach commented Jul 9, 2020

Image containing the fix is now available in staging dashboard.

@acostach
Copy link
Contributor Author

Production release will be available after the rootfs space problem is solved in meta-balena.

@acostach
Copy link
Contributor Author

This fix is now available in production dashboard v2.52.7 for the Coral Dev

@acostach
Copy link
Contributor Author

Fix merged but not longer in production (supervisor update necessary). To close in this ticket when a release newer than 2.52.7 is available in production.

@acostach acostach reopened this Jul 22, 2020
@acostach
Copy link
Contributor Author

Fix is back in production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant