H265 (HEVC) doesn't decode on 5.10 anymore on Raspberry Pi 4

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
Akrai
Posts: 27
Joined: Fri Jun 19, 2020 9:43 am

H265 (HEVC) doesn't decode on 5.10 anymore on Raspberry Pi 4

Post by Akrai »

So like a month ago or so, there was a kernel update in my raspberry pi 4, and since then i was unable to play any hevc video on it.

I'll leave here my research,
https://forum.kodi.tv/showthread.php?tid=360345
https://github.com/raspberrypi/linux/issues/4112

But long story short, the kernel changed some memory allocation settings. Now, the dev says that in RPi 4 it should still work by changing a setting. And before trying it out, I was wondering if anybody else here tried, and I searched but I couldn't find anybody with the same issue, which surprises me as playing HEVC on a raspberry pi 4 is, i think, very common...

So anyway I just wanted to know if any other person out there with a RPi 4 has run into this trouble and how did you fixed it, and also to know if this solution proposed by the dev:
hevc should still work on Pi4. You may need to increase cma memory allocation.
e.g. remove the gpu_mem setting from config.txt and add a cma setting to the fkms overlay. e.g.

Code: Select all

dtoverlay=vc4-fkms-v3d,cma-256
Should work or if, as it seems this is gonna be a permanent situation, if the dietpi devs should make some aditional settings in the scripts to take this into account for this distro

Thanks!
User avatar
Joulinar
Posts: 5087
Joined: Sat Nov 16, 2019 12:49 am

Re: H265 (HEVC) doesn't decode on 5.10 anymore on Raspberry Pi 4

Post by Joulinar »

Hi,

yesterday there was a new kernel 5.10.17 released by Raspberry OS devs. Maybe you can try it out

We had a similar report on this post, viewtopic.php?p=31382#p31382
There it was already find to downgrade kernel to 5.10.10

For the vc4-fkms-v3d this can be set using dietpi-config. However cma-256 would need to be added manually.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Akrai
Posts: 27
Joined: Fri Jun 19, 2020 9:43 am

Re: H265 (HEVC) doesn't decode on 5.10 anymore on Raspberry Pi 4

Post by Akrai »

Joulinar wrote: Thu Mar 04, 2021 9:17 pm yesterday there was a new kernel 5.10.17 released by Raspberry OS devs. Maybe you can try it out
Hi, I just upgraded and tested it and it still crashes, so it looks like for now this situation is somewhat permanent in the short term... If I add the cma-256 parameter, which value should i give it? And also, could it conflict with dietpi scripts which handles this file?
User avatar
Joulinar
Posts: 5087
Joined: Sat Nov 16, 2019 12:49 am

Re: H265 (HEVC) doesn't decode on 5.10 anymore on Raspberry Pi 4

Post by Joulinar »

did you tried to downgrade kernel to 5.10.10

Usually updating config.txt should be fine. I'm not sure on the value to be used for cma. Maybe RPi dev could give a hint.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply