ROCK 5B Debug Party Invitation

Display HDMI-IN content, some better results with GBM:

gst-launch-1.0 v4l2src device=/dev/video20 ! queue ! video/x-raw,format=BGR,width=1920,height=1080 ! glimagesink

Testing Sound (headphone Jack) output. DTS needs some adjustments.
Sound with wheezing (distorted sound with max volume) while playing MP3, AC3 Dolby Digital 5.1, and wav.

List of PLAYBACK Hardware Devices

card 0: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: rockchiphdmi1 [rockchip-hdmi1], device 0: rockchip-hdmi1 i2s-hifi-0 [rockchip-hdmi1 i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: rockchipes8316 [rockchip-es8316], device 0: fe470000.i2s-ES8316 HiFi es8316.7-0011-0 [fe470000.i2s-ES8316 HiFi es8316.7-0011-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

List of CAPTURE Hardware Devices

card 2: rockchipes8316 [rockchip-es8316], device 0: fe470000.i2s-ES8316 HiFi es8316.7-0011-0 [fe470000.i2s-ES8316 HiFi es8316.7-0011-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: rockchiphdmiin [rockchip,hdmiin], device 0: fddf8000.i2s-dummy_codec hdmiin-dc-0 [fddf8000.i2s-dummy_codec hdmiin-dc-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

MP3
wget https://file-examples.com/storage/fe7f2d366f62febc79635e7/2017/11/file_example_MP3_5MG.mp3

mpg123 file_example_MP3_5MG.mp3 
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
	version 1.25.13; written and copyright by Michael Hipp and others
	free software (LGPL) without any warranty but with best wishes


Terminal control enabled, press 'h' for listing of keys and functions.

Playing MPEG stream 1 of 1: file_example_MP3_5MG.mp3 ...

MPEG 1.0 L III cbr320 44100 stereo

Title:   Impact Moderato                 Artist: Kevin MacLeod                  
Album:   YouTube Audio Library
Genre:   Cinematic

[2:12] Decoding of file_example_MP3_5MG.mp3 finished.

AC3 (Dolby)
wget https://www.paolofiorani.it/TEST%20Audio/Ac3%20Dolby%20Digital%205.1Ch%20Sound%20Test.avi

ffplay -loop 2 -i Ac3\ Dolby\ Digital\ 5.1Ch\ Sound\ Test.avi 
ffplay version git-2022-05-25-73d7bc2 Copyright (c) 2003-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr --disable-libopenh264 --disable-vaapi --disable-vdpau --disable-decoder=h264_v4l2m2m --disable-decoder=vp8_v4l2m2m --disable-decoder=mpeg2_v4l2m2m --disable-decoder=mpeg4_v4l2m2m --disable-libxvid --disable-libx264 --disable-libx265 --enable-librga --enable-rkmpp --enable-nonfree --enable-gpl --enable-version3 --enable-libmp3lame --enable-libpulse --enable-libv4l2 --enable-libdrm --enable-libxml2 --enable-librtmp --enable-libfreetype --enable-openssl --enable-opengl --enable-libopus --enable-libvorbis --enable-shared --enable-decoder='aac,ac3,flac' --extra-cflags=-I/usr/src/linux-headers-5.10.66-rk3588/include
  libavutil      57.  7.100 / 57.  7.100
  libavcodec     59. 12.100 / 59. 12.100
  libavformat    59.  8.100 / 59.  8.100
  libavdevice    59.  0.101 / 59.  0.101
  libavfilter     8. 16.100 /  8. 16.100
  libswscale      6.  1.100 /  6.  1.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '5'.
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '5'.
Input #0, avi, from 'Ac3 Dolby Digital 5.1Ch Sound Test.avi':=0/0   
  Metadata:
    software        : Nandub v1.0rc2
  Duration: 00:00:48.62, start: 0.000000, bitrate: 2473 kb/s
  Stream #0:0: Video: msmpeg4v3 (DIV3 / 0x33564944), yuv420p, 576x432, 2013 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn
  Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s
  48.19 A-V:  0.021 fd=   0 aq=    3KB vq=   96KB sq=    0B f=0/0  

aplay
ChannelPlacement.zip (1.7 MB)
aplay -D sysdefault:CARD=2 ChannelPlacement.wav

– SOUND devices

 0 [rockchiphdmi0  ]: rockchip-hdmi0 - rockchip-hdmi0
                      rockchip-hdmi0
 1 [rockchiphdmi1  ]: rockchip-hdmi1 - rockchip-hdmi1
                      rockchip-hdmi1
 2 [rockchipes8316 ]: rockchip-es8316 - rockchip-es8316
                      rockchip-es8316
 3 [rockchiphdmiin ]: rockchip_hdmiin - rockchip,hdmiin
                      rockchip,hdmiin

Does anyone have a good alsa configuration to share?

First alsa config:

Card hw:2 'rockchipes8316'/'rockchip-es8316'
  Mixer name	: ''
  Components	: ''
  Controls      : 36
  Simple ctrls  : 36
Simple mixer control 'I2STDM Digital Loopback Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Mode1' 'Mode2' 'Mode2 Swap'
  Item0: 'Disabled'
Simple mixer control 'Playback Polarity',0
  Capabilities: enum
  Items: 'Normal' 'R Invert' 'L Invert' 'L + R Invert'
  Item0: 'Normal'
Simple mixer control 'Capture Polarity',0
  Capabilities: enum
  Items: 'Normal' 'Invert'
  Item0: 'Normal'
Simple mixer control 'ADC',0
  Capabilities: cvolume cvolume-joined
  Capture channels: Mono
  Limits: Capture 0 - 192
  Mono: Capture 192 [100%] [0.00dB]
Simple mixer control 'ADC Double FS Mode',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'ADC Soft Ramp',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'ALC Capture Attack Time',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 10
  Mono: 5 [50%]
Simple mixer control 'ALC Capture Decay Time',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 10
  Mono: 0 [0%]
Simple mixer control 'ALC Capture Function',0
  Capabilities: enum
  Items: 'Off' 'On'
  Item0: 'On'
Simple mixer control 'ALC Capture Hold Time',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 10
  Mono: 0 [0%]
Simple mixer control 'ALC Capture Max PGA',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 28
  Mono: 13 [46%]
Simple mixer control 'ALC Capture Min PGA',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 28
  Mono: 8 [29%]
Simple mixer control 'ALC Capture NG',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'ALC Capture NG Threshold',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 31
  Mono: 1 [3%]
Simple mixer control 'ALC Capture NG Type',0
  Capabilities: enum
  Items: 'Constant PGA Gain' 'Mute ADC Output'
  Item0: 'Mute ADC Output'
Simple mixer control 'ALC Capture Target',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 10
  Mono: 10 [100%]
Simple mixer control 'DAC',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 192
  Mono:
  Front Left: Playback 152 [79%] [-20.00dB]
  Front Right: Playback 152 [79%] [-20.00dB]
Simple mixer control 'DAC Double Fs Mode',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'DAC Notch Filter',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'DAC SRC Mux',0
  Capabilities: enum
  Items: 'LDATA TO LDAC, RDATA TO RDAC' 'LDATA TO LDAC, LDATA TO RDAC' 'RDATA TO LDAC, RDATA TO RDAC' 'RDATA TO LDAC, LDATA TO RDAC'
  Item0: 'LDATA TO LDAC, RDATA TO RDAC'
Simple mixer control 'DAC Soft Ramp Rate',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 4
  Mono: 0 [0%]
Simple mixer control 'DAC Stereo Enhancement',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'DAC Volume Control-LeR',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 1
  Mono: 0 [0%]
Simple mixer control 'Differential Mux',0
  Capabilities: enum
  Items: 'lin1-rin1' 'lin2-rin2' 'lin1-rin1 with 20db Boost' 'lin2-rin2 with 20db Boost'
  Item0: 'lin1-rin1'
Simple mixer control 'Digital Mic Mux',0
  Capabilities: enum
  Items: 'dmic disable' 'dmic data at high level' 'dmic data at low level'
  Item0: 'dmic disable'
Simple mixer control 'Enable DAC Soft Ramp',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'HP',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 4
  Mono:
  Front Left: Playback 4 [100%]
  Front Right: Playback 4 [100%]
Simple mixer control 'HPMixer Gain',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 7
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'Input PGA',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 8
  Mono: 10 [125%]
Simple mixer control 'LLIN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Left DAC',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Left Hp mux',0
  Capabilities: enum
  Items: 'lin1-rin1' 'lin2-rin2' 'lin-rin with Boost' 'lin-rin with Boost and PGA'
  Item0: 'lin1-rin1'
Simple mixer control 'MIC Boost',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'RLIN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Right DAC',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Right Hp mux',0
  Capabilities: enum
  Items: 'lin1-rin1' 'lin2-rin2' 'lin-rin with Boost' 'lin-rin with Boost and PGA'
  Item0: 'lin1-rin1'

I am using PulseAudio, changed alsamixer, now sounds is much better for MP3.

Here is my alsa:

asound.state.zip (1.6 KB)

pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 33
Server Protocol Version: 33
Is Local: yes
Client Index: 7
Tile Size: 65472
User Name: rock
Host Name: rock5b
Server Name: pulseaudio
Server Version: 13.99.1
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.platform-es8316-sound.stereo-fallback
Default Source: alsa_input.platform-es8316-sound.stereo-fallback
Cookie: 90c3:465f
1 Like

Can you use PipeWire instead of PulseAudio?

I really only have experience with Gentoo on x86_64, and had all sorts of audio issues with PA, but switching to PW fixed everything.

1 Like

Is PipeWire available on Ubuntu for arm64?

Yes, i will try it.

https://packages.ubuntu.com/focal/arm64/pipewire/filelist

Not sure i followed the recipe correctly (they all use ppa), looks like i missed something:

sudo apt-get update
sudo apt install pipewire (pipewire-audio-client-libraries not available)
Get:1 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 libpipewire-0.2-1 arm64 0.2.7-1 [81.4 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 pipewire arm64 0.2.7-1 [205 kB]
Fetched 286 kB in 2s (132 kB/s)
Selecting previously unselected package libpipewire-0.2-1:arm64.
(Reading database ... 128942 files and directories currently installed.)
Preparing to unpack .../libpipewire-0.2-1_0.2.7-1_arm64.deb ...
Unpacking libpipewire-0.2-1:arm64 (0.2.7-1) ...
Selecting previously unselected package pipewire.
Preparing to unpack .../pipewire_0.2.7-1_arm64.deb ...
Unpacking pipewire (0.2.7-1) ...
Setting up libpipewire-0.2-1:arm64 (0.2.7-1) ...
Setting up pipewire (0.2.7-1) ...
Created symlink /etc/systemd/user/default.target.wants/pipewire.service → /usr/lib/systemd/user/pipewire.service.
Created symlink /etc/systemd/user/sockets.target.wants/pipewire.socket → /usr/lib/systemd/user/pipewire.socket.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user mask pulseaudio
systemctl --user daemon-reload
systemctl --user --now enable pipewire (pipewire-pulse not available)
systemctl --user status pipewire.service
● pipewire.service - Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; vendor pr>
     Active: active (running) since Sun 2022-08-21 10:38:02 -03; 12min ago
TriggeredBy: ● pipewire.socket
   Main PID: 690 (pipewire)
     CGroup: /user.slice/user-1000.slice/user@1000.service/pipewire.service
             └─690 /usr/bin/pipewire

pactl info
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

1 Like

I want to know what desktop environment is this with such a low memory footprint

我想知道内存占用这么低的桌面环境是什么

Same symptom as overwriting the rootfs with /dev/uramdom. Everything slows down and then the install freezes/crashes (I sometimes do this for fun when phasing out server hardware).

I would believe you experienced a broken eMMC module where the flash controller did weird things. Most probably neither related to board nor software.

1 Like

@willy, may you check what kind of numbers you get with iperf3 (with PC as server and then with Rock5 as server)?

When I try this on my setup (10G switch with 2.5G/5G transceiver) I receive 2.5G on one direction and 1.3G on another

iperf3 logs

From Rock5 (iperf3 -c 192.168.1.38) to PC (iperf3 -s)

Connecting to host 192.168.1.38, port 5201
[  5] local 192.168.1.45 port 59722 connected to 192.168.1.38 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   289 MBytes  2.43 Gbits/sec    0    218 KBytes
[  5]   1.00-2.00   sec   290 MBytes  2.43 Gbits/sec    0    218 KBytes
[  5]   2.00-3.00   sec   288 MBytes  2.42 Gbits/sec    0    227 KBytes
[  5]   3.00-4.00   sec   288 MBytes  2.42 Gbits/sec    0    227 KBytes
[  5]   4.00-5.00   sec   288 MBytes  2.41 Gbits/sec    0    227 KBytes
[  5]   5.00-6.00   sec   288 MBytes  2.42 Gbits/sec    0    227 KBytes
[  5]   6.00-7.00   sec   288 MBytes  2.41 Gbits/sec    0    227 KBytes
[  5]   7.00-8.00   sec   289 MBytes  2.43 Gbits/sec    0    227 KBytes
[  5]   8.00-9.00   sec   286 MBytes  2.40 Gbits/sec    0    227 KBytes
[  5]   9.00-10.00  sec   288 MBytes  2.42 Gbits/sec    0    227 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  2.81 GBytes  2.42 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  2.81 GBytes  2.42 Gbits/sec                  receiver

From PC (iperf3 -c 192.168.1.45) to Rock5 (iperf3 -s)

----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.1.38, port 59368
[  5] local 192.168.1.45 port 5201 connected to 192.168.1.38 port 59369
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  46.4 MBytes   390 Mbits/sec
[  5]   1.00-2.00   sec   126 MBytes  1.05 Gbits/sec
[  5]   2.00-3.00   sec   206 MBytes  1.73 Gbits/sec
[  5]   3.00-4.00   sec  29.6 MBytes   248 Mbits/sec
[  5]   4.00-5.00   sec  91.6 MBytes   767 Mbits/sec
[  5]   5.00-6.00   sec   165 MBytes  1.39 Gbits/sec
[  5]   6.00-7.00   sec  93.3 MBytes   782 Mbits/sec
[  5]   7.00-8.00   sec  94.7 MBytes   795 Mbits/sec
[  5]   8.00-9.00   sec   242 MBytes  2.03 Gbits/sec
[  5]   9.00-10.00  sec   168 MBytes  1.41 Gbits/sec
[  5]  10.00-10.19  sec  46.0 MBytes  2.03 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.19  sec  1.28 GBytes  1.08 Gbits/sec                  receiver

Not sure which Desktop you are referring to but 290MB of total used memory is from CLI (no Desktop). The Desktop i have used is xfce4 with X11. Wayland seems to be twice faster than X11 for the hw accel but Gnome and Kde use a lot of memory, maybe twice as of xfce4.

I have a new 64GB eMMC installed and will rebuild everything. If that is what happened (and looks like), i will update here.

Building kernel natively … Pass OK

Ambient Temp… 12 ºC
1

2

3

4

How does /sys/module/pcie_aspm/parameters/policy look like?

If it’s powersave you know the reason

Hm, completely forgot about this one.

root@rock-5b:/mnt/md127# cat /sys/module/pcie_aspm/parameters/policy
[default] performance powersave powersupersave

Not like it helped in this case, but maybe it will solve my another problem

Sooo, you are not gonna cool the memory modules or power module or at least use fan cooler? You just use small passive heatsink for 12W cpu, and receive 85 degree on CPU\GPU temp. HMMMM, totally not overheat

For example - that is my setup for building kernel. And I still get 61 degree on it.

root@rock-5b:/mnt/md127# cat /sys/class/thermal/thermal_zone*/temp
65615
68384
68384
66538
62846
61000
62846
Photos


I measured 2.35 Gbps even with iperf3 pinned to a little core as such I would propose to repeat the test this time still with the PC as server and using iperf3 -R -c 192.168.1.38 on Rock 5B. This way retransmits are reported. If there are plenty of them I would check/replace the cable (TX/RX use different pairs).

Also removing the switch would be an idea. Just install avahi-autoipd avahi-daemon prior to this and access the other host not via an IP address but by it’s name (if your PC’s hostname is foobar then it can be accessed as foobar.local).

1 Like

I did not expect it would heat up like that, but it was one-time only to make sure eMMC would survive. I am glad it survived.:smile:

Ok, I think VCore is fixed.

cat /sys/class/regulator/regulator.??/name |grep vdd_cpu
vdd_cpu_lit_s0
vdd_cpu_big0_s0
vdd_cpu_big1_s0


root@rock5b:/home/rock# cat /sys/devices/platform/fd880000.i2c/i2c-0/0-0042/regulator/regulator.30/name
vdd_cpu_big0_s0
root@rock5b:/home/rock# cat /sys/devices/platform/fd880000.i2c/i2c-0/0-0043/regulator/regulator.31/name
vdd_cpu_big1_s0
cat /sys/kernel/debug/regulator/vdd_cpu_lit_s0/voltage
675000

htop

Welp, switched from windows to ubuntu. 14k retransmission surely explain why speed so low. I guess the problem with my setup

Not really possible, since I don’t have any 2.5G nic with me. That’s why I was asking for results from someone else.

Yes. So to be clear your PC has a 10GbE NIC and your switch is Nbase-T capable?

2.35 Gbit/sec in both directions even on a little core.

BTW: RealTek RTL8156B USB3 dongles work pretty well. With macOS even RTL8156 (without the B) but numerous people report problems with Linux (no idea about Windows, almost no use for this OS).

But as usual: ‘buy cheap, buy twice’.

Yes, that’s correct. I guess the transceiver is to blame here. Since I get the same picture even if I force it to 1G with PC to PC. Mikrotik with S+RJ10 is not best choice for 2.5G Ethernet

This is great news. Means its getting closer for us that pre-ordered months and months ago. Looking forward to the new chip and retiring my RK3399’s

More Ethernet basics (but I’ll leave that up to @willy to explain).

Anyway: it’s not an Rock 5B / RTL8125BG issue.

BTW: the amount of feedback from Radxa is overwhelming. But maybe all the important stuff happens in some closed/hidden Discord channel and they (together with those great Armbian guys babbling in their armbian-devel Discord crap channel that is not logged anywhere) simply laugh about everything that happens here ‘in the open’?

Yes, it’s not.

Btw, there should be link towards this closed channel somewhere?