I'm running Raspberry Pi OS bookworm on a Pi 5 with Kodi from the Raspberry Pi repo, all fully up to date. I'm seeing a new problem with playback of H.264 videos in Kodi. Output is an HDMI 1080p TV connected in the normal way. Unfortunately it has been about a week since I last did any video playback on Raspberry Pi OS, so the culprit could be anything that has been upgraded in that time window. The symptoms are that video playback stutters and suffer distortions, to the extent that it is unwatchable, and there are errors logged in dmesg like these:
The 1080p test videos from https://test-videos.co.uk/bigbuckbunny/mp4-h264 trigger the problem.
Playing back H.265 videos, which use the hardware accelerator built in the BCM2712, do not show the problem. I've only tested H.264 and H.265 videos.
I was able to work around the problem by increasing the CMA allocation to 128MB (default seems to be 64MB), by adding ,cma-128 onto the end of the dtoverlay=vc4-kms-v3d line in config.txt. Any ideas?
Code:
[ +0.000006] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +0.237510] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +0.246200] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +0.101497] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +0.103102] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +0.235899] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +0.096784] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +0.150137] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +0.149918] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +0.250249] cma: cma_alloc: linux,cma: alloc failed, req-size: 205 pages, ret: -12[ +9.194476] cma_alloc: 16 callbacks suppressed
Playing back H.265 videos, which use the hardware accelerator built in the BCM2712, do not show the problem. I've only tested H.264 and H.265 videos.
I was able to work around the problem by increasing the CMA allocation to 128MB (default seems to be 64MB), by adding ,cma-128 onto the end of the dtoverlay=vc4-kms-v3d line in config.txt. Any ideas?
Statistics: Posted by andrum99 — Sat Nov 30, 2024 10:18 pm