Mpp: error found on mpp initialization

Was trying to install Frigate in a new Rock5b blue version V1.46 2023 11 06 and realise the GPU Acceleration is not working.

I use the official build B39 Debian xfce

I have followed the guide https://wiki.radxa.com/Rock5/guide/rockchip-mpp and the test result is:

rock@rock-5b:~/mpp/build/linux/aarch64$ ~/mpp/build/linux/aarch64/test/mpi_dec_test -i ~/1080p.264 -t 7 -h 1080 -w 1920

mpp[10686]: mpi_dec_utils: failed to open input file /home/rock/1080p.264
mpp[10686]: mpi_dec_utils: cmd parse result:
mpp[10686]: mpi_dec_utils: input file name: /home/rock/1080p.264
mpp[10686]: mpi_dec_utils: output file name:
mpp[10686]: mpi_dec_utils: width : 1920
mpp[10686]: mpi_dec_utils: height : 1080
mpp[10686]: mpi_dec_utils: type : 7
mpp[10686]: mpi_dec_utils: max frames : 0
mpp[10686]: mpi_dec_test: mpi_dec_test start
mpp[10686]: mpi: mpp_create enter ctx 0xfffff6a34dc0 mpi 0xfffff6a34dc8
mpp[10686]: mpp_info: mpp version: fdeb8c37 author: Herman Chen 2024-02-07 docs: Update 1.0.4 CHANGELOG.md
mpp[10686]: mpi: mpp_create leave ret 0 ctx 0xaaaabb9ff580 mpi 0xffffbd818368
mpp[10686]: mpi_dec_test: 0xaaaabb9ff580 mpi_dec_test decoder test start w 1920 h 1080 type 7
mpp[10686]: mpi: mpp_init enter ctx 0xaaaabb9ff580 type 0 coding 7
mpp[10686]: mpp_dma_heap: os_allocator_dma_heap_open open dma heap type 0 system failed!
mpp[10686]: mpp_buffer: MppBufferService get_group failed to get allocater with mode 0 type 20001
mpp[10686]: mpp_buffer: mpp_buffer_group_limit_config input invalid group (nil)
mpp[10686]: mpp_dma_heap: os_allocator_dma_heap_open open dma heap type 0 system-uncached failed!
mpp[10686]: mpp_buffer: MppBufferService get_group failed to get allocater with mode 0 type 1
mpp[10686]: mpp_hal: mpp_hal_init hal h264d_rkdec init failed ret -1
mpp[10686]: mpp_hal: mpp_hal_init could not found coding type 7
mpp[10686]: mpp_dec: mpp_dec_init could not init hal
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp_time: mpp_clock_put invalid clock (nil)
mpp[10686]: mpp: error found on mpp initialization
mpp[10686]: mpi: mpp_init leave ctx 0xaaaabb9ff580 ret -1
mpp[10686]: mpi_dec_test: 0xaaaabb9ff580 mpp_init failed
mpp[10686]: mpi: mpp_destroy enter ctx 0xaaaabb9ff580
mpp[10686]: mpi: mpp_destroy leave ctx 0xaaaabb9ff580 ret 0
mpp[10686]: mpi_dec_test: test failed ret -1
mpi_dec_test[10686]: mpp_mem_pool: put_pool found 1 used buffer size 304
mpi_dec_test[10686]: mpp_mem_pool: put_pool found 4 used buffer size 224

And here’s sudo dmesg | grep mpp

[ 5.532958] mpp_service mpp-srv: 395062847 author: Stephen Chen 2024-01-17 Merge branch ‘Ken-Vamrs-linux-5.10-gen-rkr3.4’ into linux-5.10-gen-rkr3.4 (#268)
[ 5.532961] mpp_service mpp-srv: probe start
[ 5.534733] mpp_vdpu2 fdb50400.vdpu: Adding to iommu group 1
[ 5.534953] mpp_vdpu2 fdb50400.vdpu: probe device
[ 5.535061] mpp_vdpu2 fdb50400.vdpu: reset_group->rw_sem_on=0
[ 5.535067] mpp_vdpu2 fdb50400.vdpu: reset_group->rw_sem_on=0
[ 5.535186] mpp_vdpu2 fdb50400.vdpu: probing finish
[ 5.535404] mpp_vepu2 jpege-ccu: probing start
[ 5.535408] mpp_vepu2 jpege-ccu: probing finish
[ 5.535514] mpp_vepu2 fdb50000.vepu: Adding to iommu group 1
[ 5.535598] mpp_vepu2 fdb50000.vepu: probing start
[ 5.535690] mpp_vepu2 fdb50000.vepu: reset_group->rw_sem_on=0
[ 5.535694] mpp_vepu2 fdb50000.vepu: reset_group->rw_sem_on=0
[ 5.535820] mpp_vepu2 fdb50000.vepu: probing finish
[ 5.535932] mpp_vepu2 fdba0000.jpege-core: Adding to iommu group 5
[ 5.536077] mpp_vepu2 fdba0000.jpege-core: probing start
[ 5.536183] mpp_vepu2 fdba0000.jpege-core: attach ccu success
[ 5.536306] mpp_vepu2 fdba0000.jpege-core: probing finish
[ 5.536408] mpp_vepu2 fdba4000.jpege-core: Adding to iommu group 6
[ 5.536547] mpp_vepu2 fdba4000.jpege-core: probing start
[ 5.536730] mpp_vepu2 fdba4000.jpege-core: attach ccu success
[ 5.536848] mpp_vepu2 fdba4000.jpege-core: probing finish
[ 5.536953] mpp_vepu2 fdba8000.jpege-core: Adding to iommu group 7
[ 5.537094] mpp_vepu2 fdba8000.jpege-core: probing start
[ 5.537196] mpp_vepu2 fdba8000.jpege-core: attach ccu success
[ 5.537310] mpp_vepu2 fdba8000.jpege-core: probing finish
[ 5.537414] mpp_vepu2 fdbac000.jpege-core: Adding to iommu group 8
[ 5.537557] mpp_vepu2 fdbac000.jpege-core: probing start
[ 5.537668] mpp_vepu2 fdbac000.jpege-core: attach ccu success
[ 5.537793] mpp_vepu2 fdbac000.jpege-core: probing finish
[ 5.538158] mpp-iep2 fdbb0000.iep: Adding to iommu group 9
[ 5.538312] mpp-iep2 fdbb0000.iep: probe device
[ 5.538440] mpp-iep2 fdbb0000.iep: allocate roi buffer failed
[ 5.538535] mpp-iep2 fdbb0000.iep: probing finish
[ 5.538769] mpp_jpgdec fdb90000.jpegd: Adding to iommu group 4
[ 5.538981] mpp_jpgdec fdb90000.jpegd: probe device
[ 5.539230] mpp_jpgdec fdb90000.jpegd: probing finish
[ 5.539591] mpp_rkvdec2 fdc30000.rkvdec-ccu: rkvdec-ccu, probing start
[ 5.539651] mpp_rkvdec2 fdc30000.rkvdec-ccu: probing finish
[ 5.539739] mpp_rkvdec2 fdc38100.rkvdec-core: Adding to iommu group 12
[ 5.540010] mpp_rkvdec2 fdc38100.rkvdec-core: rkvdec-core, probing start
[ 5.540132] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_a is not found!
[ 5.540149] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_h is not found!
[ 5.540173] mpp_rkvdec2 fdc38100.rkvdec-core: Looking up vdec-supply from device tree
[ 5.540178] mpp_rkvdec2 fdc38100.rkvdec-core: Looking up vdec-supply property in node /rkvdec-core@fdc38000 failed
[ 5.540184] mpp_rkvdec2 fdc38100.rkvdec-core: no regulator, devfreq is disabled
[ 5.540236] mpp_rkvdec2 fdc38100.rkvdec-core: core_mask=00010001
[ 5.540239] mpp_rkvdec2 fdc38100.rkvdec-core: attach ccu as core 0
[ 5.540382] mpp_rkvdec2 fdc38100.rkvdec-core: sram_start 0x00000000ff001000
[ 5.540385] mpp_rkvdec2 fdc38100.rkvdec-core: rcb_iova 0x00000000fff00000
[ 5.540387] mpp_rkvdec2 fdc38100.rkvdec-core: sram_size 491520
[ 5.540390] mpp_rkvdec2 fdc38100.rkvdec-core: rcb_size 1048576
[ 5.540394] mpp_rkvdec2 fdc38100.rkvdec-core: min_width 512
[ 5.540422] mpp_rkvdec2 fdc38100.rkvdec-core: probing finish
[ 5.540495] mpp_rkvdec2 fdc48100.rkvdec-core: Adding to iommu group 13
[ 5.540726] mpp_rkvdec2 fdc48100.rkvdec-core: rkvdec-core, probing start
[ 5.540845] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_a is not found!
[ 5.540860] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_h is not found!
[ 5.540883] mpp_rkvdec2 fdc48100.rkvdec-core: Looking up vdec-supply from device tree
[ 5.540888] mpp_rkvdec2 fdc48100.rkvdec-core: Looking up vdec-supply property in node /rkvdec-core@fdc48000 failed
[ 5.540894] mpp_rkvdec2 fdc48100.rkvdec-core: no regulator, devfreq is disabled
[ 5.540932] mpp_rkvdec2 fdc48100.rkvdec-core: core_mask=00020002
[ 5.540948] mpp_rkvdec2 fdc48100.rkvdec-core: attach ccu as core 1
[ 5.541122] mpp_rkvdec2 fdc48100.rkvdec-core: sram_start 0x00000000ff079000
[ 5.541125] mpp_rkvdec2 fdc48100.rkvdec-core: rcb_iova 0x00000000ffe00000
[ 5.541127] mpp_rkvdec2 fdc48100.rkvdec-core: sram_size 487424
[ 5.541130] mpp_rkvdec2 fdc48100.rkvdec-core: rcb_size 1048576
[ 5.541134] mpp_rkvdec2 fdc48100.rkvdec-core: min_width 512
[ 5.541164] mpp_rkvdec2 fdc48100.rkvdec-core: probing finish
[ 5.541354] mpp_rkvenc2 rkvenc-ccu: probing start
[ 5.541358] mpp_rkvenc2 rkvenc-ccu: probing finish
[ 5.541483] mpp_rkvenc2 fdbd0000.rkvenc-core: Adding to iommu group 10
[ 5.541670] mpp_rkvenc2 fdbd0000.rkvenc-core: probing start
[ 5.541685] mpp_rkvenc2 fdbd0000.rkvenc-core: link mode task capacity 8
[ 5.541836] mpp_rkvenc2 fdbd0000.rkvenc-core: attach ccu as core 0
[ 5.541958] mpp_rkvenc2 fdbd0000.rkvenc-core: probing finish
[ 5.542026] mpp_rkvenc2 fdbe0000.rkvenc-core: Adding to iommu group 11
[ 5.542257] mpp_rkvenc2 fdbe0000.rkvenc-core: probing start
[ 5.542272] mpp_rkvenc2 fdbe0000.rkvenc-core: link mode task capacity 8
[ 5.542440] mpp_rkvenc2 fdbe0000.rkvenc-core: attach ccu as core 1
[ 5.542571] mpp_rkvenc2 fdbe0000.rkvenc-core: probing finish
[ 5.543117] mpp_av1dec: Adding child /av1d@fdc70000
[ 5.543193] mpp_av1dec: register device av1d-master
[ 5.543211] mpp_av1dec av1d-master: av1_iommu_of_xlate,784
[ 5.543275] mpp_av1dec av1d-master: Adding to iommu group 15
[ 5.543507] mpp_av1dec av1d-master: probing start
[ 5.543741] mpp_av1dec av1d-master: probing finish
[ 5.543775] mpp_service mpp-srv: probe success

and uname -a

Linux rock-5b 5.10.110-29-rockchip #395062847 SMP Mon Jan 22 08:42:41 UTC 2024 aarch64 GNU/Linux

you should add your /dev/dma_heap/* devices to video group and add the current user to video group.
i think it was not mentioned in that tutorial

you can refer to those udev rules