Jump to content

Latest librockchip-mpp1 causes segfault on mpv and vlc when on Wayland and liujianfeng1994 panfork driver


martivo

Recommended Posts

After upgrading today with "apt update && apt upgrade" I was no longer able to watch videos.

mpv player would Segfault, also tried vlc - not working either. Gnome desktop with wayland itself works, only video playback seems to be affected.

 

After rolling back the following packages in liujianfeng1994 repo it started to work again:

librockchip-mpp1:arm64
OLD: 1.5.0-1+git221020.d63affb~jammy
NEW, causes segfault: 1.5.0-1+git230210.c145c84~jammy 

The repository no longer has the old version, but I managed to get it back to 1.5.0-1+git221020.d63affb~jammy like this 
 

#Find the deb file from cache
find /var/cache/apt -name '*librockchip-mpp1*'
#Install it using dpkg, your version might differ
dpkg -i /var/cache/apt/archives/librockchip-mpp1_1.5.0-1+git221020.d63affb~jammy_arm64.deb


Syslog lines that appear when launching mpv and it sefaults(video will not play):

Feb 10 21:13:09 loovsys mpp[69636]: mpp_info: mpp version: unknown mpp version for missing VCS info
Feb 10 21:13:09 loovsys mpp[69636]: mpp_dma_heap: Assertion fd > 0 failed at heap_fd_open:136
Feb 10 21:13:09 loovsys mpp[69636]: mpp_dma_heap: os_allocator_dma_heap_open open dma heap type 0 failed!
Feb 10 21:13:09 loovsys mpp[69636]: mpp_allocator: mpp_allocator_get type 1 failed
Feb 10 21:13:09 loovsys mpp[69636]: mpp_dma_heap: Assertion fd > 0 failed at heap_fd_open:136
Feb 10 21:13:09 loovsys mpp[69636]: mpp_dma_heap: os_allocator_dma_heap_open open dma heap type 0 failed!
Feb 10 21:13:09 loovsys mpp[69636]: mpp_allocator: mpp_allocator_get type 3 failed
Feb 10 21:13:09 loovsys mpp[69636]: mpp_dma_heap: Assertion fd > 0 failed at heap_fd_open:136
Feb 10 21:13:09 loovsys mpp[69636]: mpp_dma_heap: os_allocator_dma_heap_open open dma heap type 0 failed!
Feb 10 21:13:09 loovsys mpp[69636]: mpp_allocator: mpp_allocator_get type 4 failed
Feb 10 21:13:09 loovsys mpp[69636]: mpp_buffer: Assertion p->allocator failed at get_group:902
Feb 10 21:13:09 loovsys mpp[69636]: mpp_buffer: Assertion p->alloc_api failed at get_group:903
Feb 10 21:13:09 loovsys mpp[69636]: mpp_buffer: Assertion p->allocator failed at get_group:902
Feb 10 21:13:09 loovsys mpp[69636]: mpp_buffer: Assertion p->alloc_api failed at get_group:903

 

Syslog lines that appear after rolling back the package and video plays again:

Feb 10 21:14:02 loovsys mpp[69759]: mpp_info: mpp version: unknown mpp version for missing VCS info
Feb 10 21:14:02 loovsys mpp[69759]: hal_h264d_vdpu34x: control info: fmt 0, w 800, h 600
Feb 10 21:14:02 loovsys mpp[69759]: mpp_buf_slot: set frame info: w  800 h  600 hor  800 ver  608
Feb 10 21:14:02 loovsys mpp[69759]: mpp_dec: setting default w  800 h  600 h_str  800 v_str  608



All packages that I upgraded during the upgrade.

#Not relevant at all
docker-compose-plugin:arm64 (2.15.1-1~ubuntu.22.04~jammy, 2.16.0-1~ubuntu.22.04~jammy), 
libpam-runtime:arm64 (1.4.0-11ubuntu2.1, 1.4.0-11ubuntu2.3), 
docker-ce-cli:arm64 (5:23.0.0-1~ubuntu.22.04~jammy, 5:23.0.1-1~ubuntu.22.04~jammy), 
armbian-config:arm64 (23.02.0-trunk.0232, 23.02.0-trunk.0250), 
less:arm64 (590-1build1, 590-1ubuntu0.22.04.1), 
docker-ce:arm64 (5:23.0.0-1~ubuntu.22.04~jammy, 5:23.0.1-1~ubuntu.22.04~jammy), 
firefox:arm64 (109.0.1+build1-0ubuntu0.22.04.1~mt1, 110.0+build1-0ubuntu0.22.04.1~mt1), 
libssl3:arm64 (3.0.2-0ubuntu1.7, 3.0.2-0ubuntu1.8), 
libpam-modules:arm64 (1.4.0-11ubuntu2.1, 1.4.0-11ubuntu2.3), 
openssl:arm64 (3.0.2-0ubuntu1.7, 3.0.2-0ubuntu1.8), 
armbian-plymouth-theme:arm64 (23.02.0-trunk.0232, 23.02.0-trunk.0250), 
libssl-dev:arm64 (3.0.2-0ubuntu1.7, 3.0.2-0ubuntu1.8), 

#Might be relevant
xserver-xorg-core:arm64 (2:21.1.3-2ubuntu2.5, 2:21.1.3-2ubuntu2.7), 
librockchip-mpp1:arm64 (1.5.0-1+git221020.d63affb~jammy, 1.5.0-1+git230210.c145c84~jammy), 
xserver-common:arm64 (2:21.1.3-2ubuntu2.5, 2:21.1.3-2ubuntu2.7), 
xwayland:arm64 (2:22.1.1-1ubuntu0.4, 2:22.1.1-1ubuntu0.5), 
libpam-modules-bin:arm64 (1.4.0-11ubuntu2.1, 1.4.0-11ubuntu2.3), 
libpam0g:arm64 (1.4.0-11ubuntu2.1, 1.4.0-11ubuntu2.3), 
linux-dtb-legacy-rockchip-rk3588:arm64 (23.02.0-trunk.0232, 23.02.0-trunk.0248), 
linux-headers-legacy-rockchip-rk3588:arm64 (23.02.0-trunk.0232, 23.02.0-trunk.0248), 
armbian-bsp-cli-orangepi5:arm64 (23.02.0-trunk.0232, 23.02.0-trunk.0250), 
linux-image-legacy-rockchip-rk3588:arm64 (23.02.0-trunk.0232, 23.02.0-trunk.0248), 
linux-u-boot-orangepi5-legacy:arm64 (23.02.0-trunk.0232, 23.02.0-trunk.0250), 
armbian-firmware:arm64 (23.02.0-trunk.0232, 23.02.0-trunk.0250), 
linux-libc-dev:arm64 (23.02.0-trunk.0232, 23.02.0-trunk.0250), 

#Probably not relevant
libavdevice58:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207),
libpostproc55:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libavcodec58:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libavutil56:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libswscale5:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libavutil-dev:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libswresample3:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libavformat58:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libavformat-dev:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libavcodec-dev:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libswresample-dev:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207), 
libavfilter7:arm64 (7:4.4.2-0ubuntu0.22.04.1+rkmpp20221203, 7:4.4.2-0ubuntu0.22.04.1+rkmpp20230207)

 

Link to comment
Share on other sites

I have tracked down the issue to this commit https://github.com/rockchip-linux/mpp/commit/1cc1af1b08423364e7fa50c92fedcb983e2c01a7

Once this commit is applied the problem is created. I also took the latest develop branch and removed this specific commit, the video playback did not break and is working without issues. So it must be something related to this commit. I opened an issue there https://github.com/rockchip-linux/mpp/issues/356.

Link to comment
Share on other sites

@- How much memory does your board have? What udev rules are you using?

It would seem that the issue affects board with more than 4gb of memory. Also I was missing one udev rules line:
 

KERNEL=="system-uncached", MODE="0666", GROUP="video"


Did you have this line in udev rules?

But adding this line only removes the segfault and causes the video playback to lose hw acceleration. More details in the github issue. Just want to understand if it affects only boards with >4Gb of memory.

Link to comment
Share on other sites

  • martivo changed the title to Latest librockchip-mpp1 causes segfault on mpv and vlc when on Wayland and liujianfeng1994 panfork driver

The current quick fix/workaround  is to clone and build from fork of mpp. It has this commit in addition https://github.com/martivo/mpp/commit/38afa760be814dbbf32019b6c588be8304c1e486. Or keep the old version of mpp1.

git clone --branch force-dma32-fix https://github.com/martivo/mpp.git 
cd mpp/build/linux/aarch64
./make-Makefiles.bash
make -j4
cp mpp/librockchip_mpp.so.0 /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0

This fix is undone when librockchip-mpp1 package is updated, you might want to mask it. (sudo apt-mark hold librockchip-mpp1)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines