A20 wake up from suspend

Started by alekata, December 27, 2016, 01:01:43 AM

Previous topic - Next topic

alekata

I am running custom A20 hardware (similar to the A20 Lime board) with debian 7 and kernel 3.4.104 without GUI (disabled in FEX).
I need to have ability to suspend the board (reduce consumption) and wake it up from suspended state as well.
Suspending works fine , command is : "echo mem > /sys/power/state", but unfortunately there is no way to wake up the device.
Is there any hardware/software solution for that because only power on/off can get back the board from suspended state ? This problem is very obvious and many olimex/sunxi users have reported the same issue but without any solution. 

JohnS

That's a very old kernel so maybe no-one works on that detail any more.

John

alekata

This kernel is provided by oimex, within the last image which can be downloaded from olimes's website.
The other can be mainline which is not well supported by sunxi maintainers.

JohnS

It has constant improvements so I cannot see why you put that.

John

igorpec

QuoteThe other can be mainline which is not well supported by sunxi maintainers.

Mainline support was done by sunxi, by broader community & hackers who are capable to understand how things works.

If you are using A20 board, start using mainline kernel, since it's in better shape and the only one, which has active support. We (Armbian) are probably the last, that are still doing some (minor) changes to this old 3.4 kernel which was abandoned for about two years ago.

More info:
http://linux-sunxi.org/Linux_mainlining_effort
https://www.armbian.com

Regarding your question, I think we fix this suspend / resume or at least we try to fix.
https://www.armbian.com/search_gcse/
linux for ARM development boards
www.armbian.com

alekata

Thanks you for advice, I will try both Armbian and mainline kernel with debian bootstraping and share my experience with you.
However I am afraid that not all drivers will work on my custom developed board since I need sound and video which are not supported in mainline (according to the sunxi documentation). in addition, in mainline there is no fex support anymore so I should perform additional effort for dts/dtsi configuration due to no or poor sunxi documentation on that side.

JohnS

What do you mean by no or poor documentation (& whose)?

John

alekata

I meant about overall sunxi SoC/sunxi mainline linux documentation (supported by sunxi) which is required to properly configure dtb. Fortunately there are dts for boards (olimex lime) and dtsi for platforms (sunxi 7) and it should be enough for fex equivalent configuration. Maybe I made wrong conclusion since there is at least fex guide.
Meanwhile, I have tried Armbian (kernel 4.7.3, debian 8.5) but i didn't have success with device suspending or hibernating. I tried pm-utils (pm-suspend, pm-hibernate) but without any effects.
systemctl hibernate/suspend returns error : "A dependency job for hibernate.target failed. See 'journalctl -xn' for details."

journalctl shows that Suspend or Hibernate has failed process failed to start :

-- Unit systemd-suspend.service has begun starting up.
Dec 31 00:06:30 lime systemd-sleep[1158]: Suspending system...
-- Subject: System sleep state suspend entered
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system has now entered the suspend sleep state.
Dec 31 00:06:30 lime systemd[1]: systemd-suspend.service: main process exited, c
Dec 31 00:06:30 lime systemd[1]: Failed to start Suspend.
-- Subject: Unit systemd-suspend.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-suspend.service has failed.


P.S.

I found that audio is not supported in Armbian (maybe it is disabled in dts as it is on mainline kernel dts). In general, audio is officially supported according to "Linux mainlining effort" merge list (since 4.4 kernel), but unfortunately CSI and camera are not supported yet.

igorpec

Audio is enabled only on some boards - Cubietruck, Banana, ... speaking blindly. Only analogue audio is done, called "codec" in dts. Check Cubietruck settings.

We also provide beta upgrades, so you can upgrade mainline up to latest stable, 4.8.15 ATM.

Suspend / resume should work but I don't recall on which kernel worked fine.

FEX is only Allwinner way of hw configuration while DTB is general, mainline.
linux for ARM development boards
www.armbian.com