High CPU usage (99-100%) running music_demo on Toradex Verdin AM62

What do you want to achieve?

Reduce CPU usage of music_demo on the Toradex Verdin AM62 target board. On my Linux PC the same app uses ~5–6% CPU, but on the AM62 target it uses ~99–100% CPU.

What have you tried so far?

Built and ran the app on both platforms using the same LVGL demo. Compared CPU usage between the two. Haven’t yet changed any LVGL rendering/buffer configuration or SDL driver settings.

Code to reproduce

/* Using the standard music_demo from LVGL demos, unmodified */

/*You code here*/

Screenshot and/or video

Environment

  • MCU/MPU/Board: oradex Verdin AM62
  • LVGL version: Latest(master) Latest

Build commands (on Verdin AM62 toolchain):
source /opt/tdx-xwayland/7.6.1/environment-setup-aarch64-tdx-linux
cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)

Run command (on target):
XDG_RUNTIME_DIR=/run/user/0 WAYLAND_DISPLAY=wayland-1 SDL_VIDEODRIVER=wayland LIBGL_ALWAYS_SOFTWARE=1 ./music_demo