Help Needed with S2RAM Issues with Mainline U-Boot on Khadas VIM3

Hi everyone.

I am working on a Khadas VIM3 and encountering issues with Suspend-to-RAM (S2RAM) functionality when using mainline U-Boot. Here’s the scenario:

  • On Vendor U-Boot (2015.01):
    Suspend-to-RAM works perfectly with the same kernel (6.1) and DTB.
  • On Mainline U-Boot (2024.01):
    Suspend-to-RAM succeeds, and after resuming the power consumption is noticeably lower. and the system becomes laggy and unresponsive.
  1. Setup:
  • Device: Khadas VIM3
  • U-Boot Version: Mainline U-Boot (2024.01)
  • Kernel version: 6.1
  • The same Device Tree Blob (DTB) and kernel are used for both vendor and mainline U-Boot.
  1. Observations:
  • Suspend-to-RAM works on the vendor-provided U-Boot.
  • On mainline U-Boot:
    • Suspend-to-RAM succeeds, and power consumption is noticeably lower.
    • Upon resuming, the system becomes laggy and unresponsive, indicating potential issues with the resume path.

Power Measurements (Wattage):

Before Suspend:

Idle (app open and running without interaction): 3.07W
Moving (interaction with the app, such as sliding): 3.22W

After Suspend:

Idle (app open and running without interaction): 2.87W
Moving (interaction with the app, such as sliding): 2.92W

Diagnostics Performed:

  1. Checked CPU Clocks: No visible anomalies yet.
  2. Checked DRAM Clocks: Configuration appears consistent.
  3. Checked CPU Online States: All CPUs seem to be online after resume.

Working setup:

  • U-Boot (2015.01) (Compiled with Fenix tool and extracted the .bin)
  • Kernel version: 6.1
  • Same DTB used in both setups

If I use the Vendor with the same configuration:
Kernel 6.1 and same DTB the S2RAM works like a charm. So, the problem has to be right in the U-Boot.

Initially, we are going to work with this U-Boot but, we required to use Mender, and we need to do this implementation on a newer U-Boot version.

Which system do you use? Android, Ubuntu, OOWOW or others?

Yocto, buildroot.

So, I have a few question to manage on how to solve this problem:

  • What could be causing the laggy performance after resume?
  • Has anyone successfully implemented Suspend-to-RAM on mainline U-Boot for the Khadas VIM3 or a similar device?

Thank you,
Franco

I noticed that when using the vendor’s U-Boot, it uses its own DTB file (kvims3.dtb), while the kernel uses the mainline DTB (meson-g12b-a311d-khadas-vim3.dtb).

It seems that I need to migrate from the vendor DTB to the mainline one. However, I’m unsure about where the U-Boot or the DTB handles the suspend/wake-up behavior. Could you provide any guidance on this?

Also, I’d like to point out that this issue occurs in the images provided by Khadas, where both the mainline kernel and mainline U-Boot are being used.

@numbqq, apologies for tagging you directly, but I believe you might be able to assist with this.

Thank you!

Hello @Veins_of_Games

Maybe the mainline u-boot missed some patches, but I have no idea what missed at this moment, you must use the mainline u-boot?

I want to integrate RAUC and for that we need A/B handling from the U-Boot. With vendor u-boot can I handle that?

Vendor u-boot also support A/B system.