Segmentation fault while playing x265 videos

The issue you are currently experiencing with OSMC

/usr/bin/mediacenter exits with the following error when playing x265-encoded files.
x264 video files can be played witout any issues.

Dec 25 15:58:45 osmc mediacenter[548]: /usr/bin/mediacenter: line 149:   576 Segmentation fault      sudo -u osmc LIRC_SOCKET_PATH=/var/run/lirc/lircd $KODI --standalone -fs
Dec 25 15:58:45 osmc mediacenter[548]: Kodi exited with return code 139 after 0 hours, 3 minutes and 56 seconds
Dec 25 15:59:05 osmc mediacenter[548]: Starting Kodi...

Full grab-logs output: https://paste.osmc.tv/axacequjob.vhdl

What you were doing when this issue occurred

Playing an x265 encoded video file via vanilla OSMC UI in a RaspberryPi 4.

I have tried a couple of different x265 video files, they all fail with the same error. Adding mediainfo output here:
File 1: https://paste.osmc.tv/ajutufitic.coffee
File 2: https://paste.osmc.tv/iwogowukuq.coffee

Whether you can replicate this issue on demand. If you can, then please provide some steps on how an OSMC developer can reproduce the same issue.

Play via OSMC UI any file encoded with x265 codec.

The device you are currently running OSMC on

Raspberry Pi 4 Model B Rev 1.2

What peripherals are attached to the device?

Infrared USB remote.

Has this issue been introduced by a new version of OSMC? When did the issue first appear and can you recall a time when it was not present?

This problem started after the latest apt dist-upgrade which, incidentally, upgraded to a new version of the Linux kernel:

Start-Date: 2022-12-25  03:01:06
Commandline: /usr/bin/apt-get-real dist-upgrade -y --no-install-recommends
Install: rbp464-image-5.15.83-1-osmc:arm64 (5.15.83-1-osmc, automatic)
Upgrade: mediacenter-addon-osmc:armhf (3.0.759, 3.0.760), rbp464-kernel-osmc:arm64 (3.9.242, 3.9.256), libksba8:armhf (1.5.0-3+deb11u1, 1.5.0-3+deb11u2)
End-Date: 2022-12-25  03:01:29

For reference, the previous Linux kernel version was 5.10.78-7-osmc. x265 video playback worked fine with that version.

Kodi crashes when trying to load (?) the x265 kernel module:

[...]
Dec 25 15:58:44 osmc kernel: rpivid feb10000.codec: rpivid_h265_start: (1920x1088)
Dec 25 15:58:44 osmc kernel: rpivid feb10000.codec: rpivid_h265_stop
Dec 25 15:58:45 osmc sudo[576]: pam_unix(sudo:session): session closed for user osmc
Dec 25 15:58:45 osmc mediacenter[548]: /usr/bin/mediacenter: line 149:   576 Segmentation fault      sudo -u osmc LIRC_SOCKET_PATH=/var/run/lirc/lircd $KODI --standalone -fs
Dec 25 15:58:45 osmc mediacenter[548]: Kodi exited with return code 139 after 0 hours, 3 minutes and 56 seconds

Cheers.

You can try and update to the latest and greatest first.

  1. Login via the command line
  2. Run the following command to add the staging repository:
    echo 'deb http://apt.osmc.tv bullseye-devel main' | sudo tee /etc/apt/sources.list.d/osmc-devel.list
  3. Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
  4. Your system should have have received the update.

Please see if the issue is resolved.

I also recommend you remove /etc/apt/sources.list.d/osmc-devel.list after updating.

This will deactivate the staging repository. You can do so with the following command:
sudo rm /etc/apt/sources.list.d/osmc-devel.list.

Please note that we will automatically disable this update channel after 14 days on your device in case you forget to do so to ensure that your system reverts to the stable update channel.

Thanks for the quick reply.

deb http://apt.osmc.tv bullseye-devel main was already present in /etc/apt/sources.list.

Followed your instructions anyway (including the deletion of the file at the end).

The only change I noticed was:

Unpacking rbp4-mediacenter-osmc (19.5.0-13) over (19.5.0-12)

Unfortunately the behavior has not changed. I’m getting the exact same error (Segmentation fault) when trying to play x265 videos :frowning_face:, x264 ones work fine.

I’d suggest a fresh install – I can’t reproduce this on the latest version of OSMC with staging loaded.

Sam

For the record, manually reverting to the previous kernel version did the trick and x265 videos can be played again. Just download the .deb file from the repo and install it via dpkg -i rbp464-image-5.10.78-7-osmc_5.10.78-7-osmc_arm64.deb.

Note this is a workaround for those who do not want to or cannot do a fresh install.

Is there any progress on this? I think I am feeling the same when trying to playback Disney+. This is on a fresh install with ~/.kodi salvaged from another installation. I posted the details in another thread, Pi booting so far then black screen - #11 by NickH.

Compared to this post, I am already running kernel version 5.10.78-7-osmc so there is no point trying to revert to it.

There will be open testing of Kodi 20.1 soon and that comes with a newer ffmpeg version that works with the newer kernel. It seems to be working fine for HEVC including HDR10 with my RPi 4.