Skip to content

Linux Hardware Core

Motherboard SoC Platform NPU
K1 RK3568 Rockchip 1 TOPS
K1B RK3568 Rockchip 1 TOPS
K1MINI RK3568 Rockchip 1 TOPS
K2B H618 Allwinner
K2C H618 Allwinner
K3 RK3562 Rockchip 1 TOPS
K3B RK3562 Rockchip 1 TOPS
K4B T113 Allwinner
K5C A133 Allwinner
K7 RK3576 Rockchip 6 TOPS
K7C RK3576 Rockchip 6 TOPS
K7S RK3576 Rockchip 6 TOPS
K8 RK3588 Rockchip 6 TOPS
K8D RK3588S2 Rockchip 6 TOPS
K9 T527 Allwinner 2 TOPS
K10B A733 Allwinner 3 TOPS
K11C RK3566 Rockchip 1 TOPS

CPU

CPU Information

# CPU architecture and model
cat /proc/cpuinfo

# Quick view (number of cores and model)
cat /proc/cpuinfo | grep "model name" | uniq
cat /proc/cpuinfo | grep "processor" | wc -l

# Use lscpu for detailed info
lscpu

CPU Frequency Scaling Governor

Tip

scaling_governor controls the CPU frequency scaling policy:
- performance – runs at the highest frequency, best performance
- powersave – runs at the lowest frequency, most power‑efficient
- ondemand – scales frequency on demand (default)
- conservative – smooth on‑demand scaling
- schedutil – scheduler‑driven scaling (newer kernels)

# View current frequency of all cores
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq

# View available frequencies for policy0
cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies

# View current governor for each core
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

# Set all cores to performance mode
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

# Set all cores to powersave mode
echo powersave | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

CPU Core Control

# Check online status of each core
cat /sys/devices/system/cpu/cpu*/online

# Disable a specific core (replace `cpu4` with the actual core number)
echo 0 > /sys/devices/system/cpu/cpu4/online

# Enable a specific core
echo 1 > /sys/devices/system/cpu/cpu4/online

CPU Usage

# Real‑time CPU usage
top

# Sort by CPU usage (highest first)
top -o %CPU

# htop (more intuitive, install with: apt install htop)
htop

GPU

GPU Utilisation

Tip

The path for GPU utilisation varies by GPU model:
- Mali GPU (RK series): /sys/devices/platform/*gpu/utilisation
- PowerVR GPU (A733 etc.): /sys/kernel/debug/pvr/status (search for GPU Utilisation)

# Mali GPU
cat /sys/devices/platform/*gpu/utilisation

# PowerVR GPU (A733)
cat /sys/kernel/debug/pvr/status | grep "GPU Utilisation"

# Monitor in real time
watch -n 1 'cat /sys/devices/platform/*gpu/utilisation'
watch -n 1 "cat /sys/kernel/debug/pvr/status | grep 'GPU Utilisation'"

GLmark2 Performance Test

# Test GPU performance (requires a display)
export DISPLAY=:0
glmark2-es2

# Or use off‑screen mode (no display needed)
glmark2-es2 --off-screen

Tip

Surface Size: 800×600. The scores are for reference only; actual results may vary.

Rockchip

RK platforms also provide integrated test scripts:

$ ls /rockchip-test/gpu
gpu_test.sh  test_fullscreen_glmark2.sh  test_normal_glmark2.sh test_offscreen_glmark2.sh  test_stress_glmark2.sh

# Run off‑screen test
root@linaro-alip:/# source /rockchip-test/gpu/test_offscreen_glmark2.sh 
======================================================
    glmark2 2023.01
======================================================
    GL_VENDOR:      ARM
    GL_RENDERER:    Mali-G52
    GL_VERSION:     OpenGL ES 3.2 v1.g13p0-01eac0.0fd2effaec483a5f4c440d2ffa25eb7a
    Surface Size:   800x600 windowed
======================================================
                                  glmark2 Score: 1405 
======================================================

NPU

A733

# Check NPU device node
ls -l /dev/vipcore

# Check NPU frequency
cat /sys/class/devfreq/3600000.npu/cur_freq
cat /sys/class/devfreq/3600000.npu/available_frequencies

# Run NPU inference test (using a pre‑installed model)
vpm_run -s /aw-test/npu/vpm_run/a733_sample.txt -l 5 -d 0 --show_top5 1

Example output (A733 with VIP Lite driver 2.0.3.4):

init vip lite, driver version=0x00020003...
VIPLite driver software library version 2.0.3.4-AW-2025-05-16
vip lite init OK.                          ← NPU driver initialised successfully
input 0 dim 224 224 3 1, scale=0.003922   ← Input image: 224x224 RGB
prepare network 0: 1106 us.               ← Model load time: 1.1ms

task: 0, loop count: 1
run time for this network 0: 3446 us.
profile inference time=3144us, cycle=3112073  ← Single inference: 3.1ms
...                                             (5 loops total)
task 0, profile avg inference time=3144us    ← Average inference time: 3.14ms
vpm run ret=0                               ← Test passed

Rockchip

$ ls /rockchip-test/npu2
model  npu_freq_scaling.sh  npu_stress_test.sh  npu_test.sh

NPU frequency scaling test script (npu_freq_scaling.sh):

usage()
{
    echo "Usage: npu_freq_scaling.sh [test_second] [every_freq_stay_second]"
    echo "example: npu_freq_scaling.sh 3600 30"
    echo "means npu_freq_scaling.sh will run 1 hour and every cpu frequency stay 30s"
}

# Run frequency scaling for 60 seconds, changing every 10 seconds
$ ./npu_freq_scaling.sh 60 10

NPU stress test script (npu_stress_test.sh):

$ ./npu_stress_test.sh
Begin perf ...
   0: Elapse Time = 2.85ms, FPS = 351.12
   1: Elapse Time = 2.70ms, FPS = 370.37
...

---- Top5 ----
0.935059 - 156
0.057037 - 155
...

Note

Performance test data:
The lines after Begin perf ... show detailed performance metrics for multiple inference runs. Each entry includes the run index, the inference time (Elapse Time) and the frames per second (FPS).
Inference result data:
The ---- Top5 ---- section shows the top‑5 classification results by confidence score.

VPU

A733

Debug logging:

# Enable debug logging
export mpp_syslog_perror=1
echo 0x100 > /sys/module/sunxi_ve/parameters/debug

# Disable debug logging
export mpp_syslog_perror=0
echo 0x0 > /sys/module/sunxi_ve/parameters/debug

Verify hardware decoding environment:

# List registered OMX decoders
gst-inspect-1.0 | grep omx

# Check cedar_dev device nodes
ls -la /dev/cedar_dev* /dev/cedarx*

# Check sunxi_ve driver version
cat /sys/module/sunxi_ve/version

Expected output:

omx:  omxh264dec: OpenMAX H.264 Video Decoder
omx:  omxhevcvideodec: OpenMAX H.265 Video Decoder
omx:  omxmpeg2videodec: OpenMAX MPEG2 Video Decoder
omx:  omxmjpegvideodec: OpenMAX MJPEG Video Decoder
omx:  omxmpeg4videodec: OpenMAX MPEG4 Video Decoder
omx:  omxvp9videodec: OpenMAX VP9 Video Decoder

GStreamer hardware decoding test:

# H.264 hardware decode (fakesink just validates the pipeline)
sudo gst-launch-1.0 filesrc location=/usr/local/test.mp4 \
  ! qtdemux ! h264parse ! omxh264dec ! fakesink -v 2>&1 | head -20

# H.265 hardware decode
sudo gst-launch-1.0 filesrc location=/root/test.h265 \
  ! h265parse ! omxhevcvideodec ! fakesink -v

# Generate a decoded snapshot (videotestsrc → hardware encode → hardware decode → PNG)
gst-launch-1.0 videotestsrc num-buffers=30 ! videoconvert ! \
  video/x-raw,format=NV12,width=640,height=480 ! omxh264videoenc ! \
  h264parse ! qtmux ! filesink location=/tmp/test.mp4

gst-launch-1.0 filesrc location=/tmp/test.mp4 ! qtdemux ! h264parse ! \
  omxh264dec ! videoconvert ! pngenc ! filesink location=/tmp/vpu_snapshot.png

If vpu_snapshot.png is generated successfully, the H.264 hardware encode + decode pipeline is working. The image shows the output of the standard videotestsrc colour bars after being hardware‑encoded by omxh264videoenc and then hardware‑decoded by omxh264dec:

libcedarc encode/decode test:

# CedarC hardware decode
vdecoderdemo -i /root/test.h264 -codFmat 1 -n 60 -outFmat 6 -o /dev/null

# CedarC hardware encode
vencoderdemo -i /root/test_1920x1080_nv12.yuv -n 30 -f 0 \
  -o /root/enc_out.h264 -s 1920x1080 -d 1920x1080 -b 5000 -r 30

Chromium hardware acceleration:

The package chromium-browser-sunxi is pre‑installed:

# Check if installed
dpkg -l | grep chromium-browser-sunxi

# Launch Chromium (requires a graphical session)
export DISPLAY=:0
/usr/local/chromium/bin/chromium-browser --no-sandbox file:///usr/local/test.mp4

Test scripts:

# Menu mode
sudo bash /aw-test/chromium/chromium_test.sh

# Run directly
sudo bash /aw-test/chromium/test_chromium_with_video.sh

Note

  • Chromium must be run on a physical display or an SSH graphical session. ADB shell will fail because it lacks a D‑Bus session.
  • The system already executes xhost + via LightDM by default, so X access is open at boot.

Rockchip

Debug logging:

# Enable debug logging
export mpp_syslog_perror=1
echo 0x100 > /sys/module/rk_vcodec/parameters/mpp_dev_debug

# Example hardware encode/decode log after enabling
[  893.134037] rk_vcodec: 27b00100.rkvdec:0 session 3705:19 time: 1333 us hw 1312 us

# Disable debug logging
export mpp_syslog_perror=0
echo 0x100 > /sys/module/rk_vcodec/parameters/mpp_dev_debug

GStreamer hardware decoding test:

# H.264 hardware decode
sudo gst-launch-1.0 filesrc location=/usr/local/test.mp4 \
  ! qtdemux ! h264parse ! omxh264dec ! fakesink -v 2>&1 | head -20

# H.265 hardware decode
sudo gst-launch-1.0 filesrc location=/root/test.h265 \
  ! h265parse ! omxhevcvideodec ! fakesink -v

Tip

On Ubuntu, GStreamer hardware encoding/decoding may have compatibility issues. Run the fix script: source /rockchip-test/gstreamer/gstreamer_mpp_fix.sh. Debian systems are recommended instead.

mpi_enc_test hardware encoding:

# H.264 4096x2160 100 frames
mpi_enc_test -w 4096 -h 2160 -t 7 -o ./test.h264 -n 100
tail -f /var/log/syslog
# mpi_enc_test: chn 0 encode 100 frames time 3763 ms fps 26.57

# H.265 4096x2160 100 frames
mpi_enc_test -w 4096 -h 2160 -t 16777220 -o ./test.h265 -n 100
tail -f /var/log/syslog
# mpi_enc_test: chn 0 encode 100 frames time 4086 ms fps 24.47

mpi_dec_test hardware decoding:

# H.264 4096x2160 100 frames
mpi_dec_test -t 7 -i test.h264 -n 100
tail -f /var/log/syslog
# mpi_dec_test: decode 100 frames time 596 ms fps 167.53

# H.265 4096x2160 100 frames
mpi_dec_test -t 16777220 -i test.h265 -n 100
tail -f /var/log/syslog
# mpi_dec_test: decode 100 frames time 803 ms fps 124.47

Chromium hardware acceleration:

# Launch Chromium video test
source /rockchip-test/chromium/test_chromium_with_video.sh

# If hardware decoding is not used, run the fix script
source /rockchip-test/chromium/chromium_mpp_fix.sh

Tip

On Ubuntu, Chromium and GStreamer hardware encoding/decoding cannot be used simultaneously. Debian systems are recommended.

DDR

View Memory Information

# View total and used memory in human‑readable format
free -h

# View detailed memory info
cat /proc/meminfo

memtester Test

# Install memtester
apt install memtester

# Manually test 512 MB of memory for 2 passes
memtester 512M 2

# Use stress for memory stress testing
apt install stress
stress --vm 4 --vm-bytes 512M --timeout 60

A733

The A733 platform does not use the standard dmc devfreq interface. DDR frequency is managed automatically by the kernel. You can check the current frequency via the clock nodes:

# View DDR PLL frequency
cat /sys/kernel/debug/clk/pll-ddr/clk_rate

# Also check from clk_summary
cat /sys/kernel/debug/clk/clk_summary | grep ddr

DMC

DDR frequency and scaling:

Dynamic DDR frequency scaling is managed via the dmc (Dynamic Memory Controller) device:

# View current DDR frequency
cat /sys/class/devfreq/dmc/cur_freq

# View available frequencies
cat /sys/class/devfreq/dmc/available_frequencies

# View current governor
cat /sys/class/devfreq/dmc/governor

# Set to userspace mode for manual frequency control
echo userspace > /sys/class/devfreq/dmc/governor
echo 936000000 > /sys/class/devfreq/dmc/userspace/set_freq

# Restore automatic scaling (e.g. simple_ondemand)
echo simple_ondemand > /sys/class/devfreq/dmc/governor

DDR stress tests (/rockchip-test/ddr/):

# Automatically detect available memory and test half of it
$ /rockchip-test/ddr/memtester_test.sh

# 24‑hour stressapptest
$ /rockchip-test/ddr/stressapptest_test.sh

# DDR frequency scaling stability test
$ /rockchip-test/ddr/ddr_freq_scaling.sh

# All‑in‑one menu mode
$ /rockchip-test/ddr/ddr_test.sh

Core Temperature

The system divides thermal zones by hardware module:

# List zone names
cat /sys/class/thermal/thermal_zone*/type

# View temperatures (millidegrees Celsius; divide by 1000 for °C)
cat /sys/class/thermal/thermal_zone*/temp

# Monitor all zones in real time
watch -n 1 "cat /sys/class/thermal/thermal_zone*/temp"