Movie freezes


Almost everytime I watch a movie, I get a total freeze after 15-50 min in. So the movie keeps playing according to my remote (yatse), but the screen fully freezes. Only way to get out is to press stop. It takes 5 seconds or so and then the movie stops. Logs are provided:

Movie is about 47 minutes in. Time was 21.59h. Can anyone see what is the matter

I’m using a Pi4 4GB, and movies are on my modern PC. All connected to 1000mbit LAN.

I need to add that this only happens once during a movie. After that it’s all fine. Just had it happen again after just 4 minutes.

2022-02-24 21:59:06.738 T:1832     INFO <general>: CVideoPlayerAudio::Process - stream stalled
2022-02-24 21:59:17.725 T:1831    ERROR <general>: CDVDVideoCodecDRMPRIME::Reset - receive frame failed: Resource temporarily unavailable (-11)
Feb 24 21:59:20 osmc kernel: bcm2835_mmal_vchiq: timed out waiting for sync completion
Feb 24 21:59:20 osmc kernel: bcm2835-codec bcm2835-codec: bcm2835_codec_stop_streaming: Failed disabling i/p port, ret -62
Feb 24 21:59:22 osmc kernel: bcm2835-codec bcm2835-codec: bcm2835_codec_flush_buffers: Timeout waiting for buffers to be returned - 6 outstanding
Feb 24 21:59:22 osmc kernel: ------------[ cut here ]------------
Feb 24 21:59:22 osmc kernel: WARNING: CPU: 0 PID: 1831 at drivers/media/common/videobuf2/videobuf2-core.c:1956 __vb2_queue_cancel+0x230/0x2a8 [videobuf2_common]
Feb 24 21:59:22 osmc kernel: Modules linked in: md4 md5 cmac aes_arm64 xt_nat xt_tcpudp veth xt_conntrack xt_MASQUERADE nf_conntrack_netlink nft_counter xt_addrtype nft_compat nft_chain_nat nf_tables nfnetlink bridge nls_utf8 cifs libarc4 8021q garp stp llc bnep snd_soc_hdmi_codec brcmfmac brcmutil vc4 v3d cec drm_kms_helper gpu_sched hci_uart btbcm bluetooth ecdh_generic ecc cfg80211 bcm2835_v4l2(C) bcm2835_codec(C) bcm2835_isp(C) drm bcm2835_mmal_vchiq(C) rpivid_hevc(C) iptable_nat videobuf2_vmalloc nf_nat rfkill v4l2_mem2mem nf_conntrack nf_defrag_ipv6 i2c_brcmstb drm_panel_orientation_quirks vc_sm_cma(C) nf_defrag_ipv4 sg snd_soc_core iptable_mangle raspberrypi_hwmon videobuf2_dma_contig snd_compress iptable_filter videobuf2_memops videobuf2_v4l2 videobuf2_common overlay videodev snd_pcm_dmaengine snd_pcm snd_timer mc snd syscopyarea sysfillrect sysimgblt fb_sys_fops backlight uio_pdrv_genirq uio ip_tables x_tables ipv6
Feb 24 21:59:22 osmc kernel: CPU: 0 PID: 1831 Comm: VideoPlayer Tainted: G         C        5.10.78-2-osmc #1

First step I would try to play the file locally (e.g. USB Stick) to check if the issue persists.
Also does the issue happens at different points when playing the same file?

I’m testing now, but it’s of course time consuming. It does appear putting a movie on the /home/osmc/Movies folder, it keeps playing.

So let’s say locally it works. But I get a total freeze once while playing it from my server. What could be the cause? It usually only happens once. So even when I watch multiple series, it usually only happens on the first episode played.

From the logs it looks like a buffer issue?

Wait, I have a freeze now after 19min40 sec. Around 19.08h local time. Logs:

This seems to be similar to this unsolved issue

This bug goes in a similar direction

What you could try next time it hangs if a TV on/off also unfreeze it.

Had a freeze: logs:
Freeze was at 11.04h after about 20 minutes.

First I turned of the receiver, which is between my TV and pi. After I got an image I saw the movie advancing a few frames and then stopped again. I saw the movie running again in yatse. Then turned of the TV and back on. But that made no difference.

If I read correctly, the last topic says it should be fixed in a new kernel?

Looks like that, but that’s Kernel 5.15. OSMC is on 5.10

The 5.10 kernel is still being maintained, so it should be backported eventually.

Let’s hope it will be fixed soon.

Today was hell. I’ve had like 20 freezes in a few hours. I guess it was between 20.45h and 23.00h. Impossible to watch anything. I ended up streaming through yatse with the cast function to finish my series.

Is it possible to install the latest kernel?

You can do this – but it’s not supported in an official capacity.

Is there any update of OSMC planned soon with that kernel fix?

Been searching how to update the kernel to test if it works, but it says to use rpi-update. But that does not work obviously. Anyone smart enough to help me guide through a manual update of the kernel?

I tried copying the firmware files from this page: GitHub - raspberrypi/firmware: This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.. But then the Pi won’t boot.

In this state OSMC is unusable.

You can’t copy files over like that and expect things to work. I suspect you didn’t copy kernel modules over as well.

Yeah I expected it not to work, but I have no clue how I should do it.

The proper approach would be to bump the kernel version and build from source.