Hi everyone.
I have a problem with the suspend in the vim3, when I run systemctl suspend it get freeze and I have to restart the board to make it work again.
I already enable all modules from the kernel but, I think I’m missing something, maybe some config in the device-tree or u-boot.
I’m using Buildroot to create a custom minimal Linux version with kernel 6.3.
For testing purposes, I use the Ubuntu 24.04 Base Image, and the suspend functionality works perfectly there. This leads me to believe I might be missing something, possibly in the kernel configuration or the device tree source (DTS).
Hi @numbqq
I noticed in the downstream kernel that there is a configuration option, AMLOGIC_GX_SUSPEND, which is not present in the mainline kernel. Could this be the reason why suspend is not working correctly for me?
Additionally, to compile the downstream kernel (GitHub - khadas/linux: Linux kernel for Khadas VIMs & Edges) , branch khadas-vims-5.4.y should I use the Fenix tool, or can I compile it directly? I tried to do it using the Buildroot toolchain, but I encountered errors from drivers, so I am unsure how to compile this kernel directly.
It is easy to use fenix to build the kernel, anyway, you can build kernel directly, but you need to setup the toolchains. And you can follow the steps:
export PATH=$KERNEL_COMPILER_PATH:$PATH
make ARCH=arm64 CROSS_COMPILE="${KERNEL_COMPILER}" kvims_defconfig
make -j8 ARCH=arm64 CROSS_COMPILE="${KERNEL_COMPILER}" Image dtbs modules
Thank you @numbqq I have tried everything, but I am still unable to run the Khadas kernel on my Buildroot setup. I’m running out of options, and we really want to use the VIM3 in our product, as suspend functionality is crucial for our project. Do you have any suggestions on how to get suspend working?
Hi @numbqq
I was able to run Buildroot with the kernel khadas-vims-6.1.y and U-Boot 2021.04. Now, I have encountered a different error. I’m quite confident that I’m close to resolving the issue since I’m using the same kernel and U-Boot as the Ubuntu image (vim3-ubuntu-22.04-server-linux-6.1-fenix-1.4-221229.img) where suspend works perfectly.
I get this error, check:
# systemctl suspend
# [ 118.508183] PM: suspend entry (deep)
[ 118.594141] Filesystems sync: 0.085 seconds
[ 118.597255] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 118.599809] OOM killer disabled.
[ 118.603012] Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
[ 118.611279] meson-gx-mmc ffe03000.sd: missing suspend/resume ops for non-removable SDIO card
[ 118.744802] rtc-hym8563 4-0051: no valid clock/calendar values available
[ 118.747106] Disabling non-boot CPUs ...
[ 118.751271] psci: CPU1 killed (polled 0 ms)
[ 118.755435] psci: CPU2 killed (polled 0 ms)
[ 118.759479] psci: CPU3 killed (polled 0 ms)
[ 118.763578] psci: CPU4 killed (polled 0 ms)
[ 118.767977] psci: CPU5 killed (polled 4 ms)
bl30 get wakeup sources!
process command 00000006
bl30 enter suspend!
Little core clk suspend rate 1000000000
Big core clk suspend rate 24000000
store restore gp0 pll
suspend_counter: 1
Enter ddr suspend
DMC_DRAM_STAT11: 0x544
ddr suspend time: 2177us
alarm=0S
process command 00000001
cec ver:2018/04/29
CEC cfg:0x0000
use vddee new table!
customer pwrkeys for IR is NULL, use defaults!
The line [ 118.611279] meson-gx-mmc ffe03000.sd: missing suspend/resume ops for non-removable SDIO card seems to be the problem.
Do you have any idea on how to solve this or why I am encountering this error?
Ok guys I have bad news, it seems the wake up works well but, it laggy the complete system, I tried with the official Ubuntu images provided by Khadas and it have the same behavior, the wake up lag the complete system.