-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Support]: hwaccel stopped working on raspberry pi after 5.15.61 kernel update #3780
Comments
It seems you're running on the RPi and using hwaccel. Have you tried it without hwaccel? |
That was it! I'm still thoroughly confused as to why this suddenly started happening. I even tried beta7/rc1 and they are no longer working either. My other 1080p Dahua also still works with hwaccel on... Is this a known thing that hwaccel sometimes just doesn't work on a rpi4? |
What is your GPU memory set to? Odds are you have another program using too much memory so the Pis GPU is starving and unable to process the frames. |
My This pi4 is solely being used for frigate. As I was typing this, one thing I remember did change recently is i ran a |
Maybe try increasing it to 512mb |
I was thinking the max was 256 for some reason. Tried bumping to 512 and rebooting, exact same behavior when hwaccel is on. I just looked at my
Could be the kernel or bootloader update? |
I don't know much about ffmpeg and hardware acceleration but I searched the raspberry pi kernel issues for the kernel version I just updated to ( |
ffprobe output for a camera that's currently working with hwaccel:
|
We've seen other users complain that the latest RPi kernel broke hwaccel as well |
Yeah same issue here sadly. :( Turning off hw Accel works for now but the poor thing is deffo working harder even with just two cameras setup. It happens with rc1 and rc2 for me. I'm using two different hikvision cameras sadly neither work. H264. If I find a better fix I'll be sure to share |
Same here. Fresh install of Raspberry Pi OS Lite 2022-09-06 with kernel 5.15.61-v8+ on a Raspberry Pi 4 Model B Rev 1.2 running docker and only green screen when using hwaccel_args: Just tried crzynik/frigate:ffmpeg-update and same result. Seems the issue has been identified: raspberrypi/linux#5150 |
and the fix is in... |
I'm experiencing this issue as well since updating the PI kernel and trying to figure out a solution. My understanding is that:
After looking at the fix that @idontcare99999 mentioned, I checked the official FFmpeg repo and it doesn't appear to contain the fix. Has anyone else managed to get hwaccel working again other than by downgrading to the previous kernel (which I'm not opposed to but have never done before)? |
Make sure you do a disk clone or otherwise full backup before messing with the kernel to save yourself many hours of work... Yeah, I'm a complete Linux newbie so I most likely did something very wrong, It'd be nice to get HWaccel working again but I do like having Home assistant and Frigate running ;). If anyone finds a way to downgrade the kernel please let me know. Thank you. Never again will I update without a full, tested backup. |
I used the following process to downgrade the kernel from 5.15.61-v8+ to 5.15.32-v8+ and hwaccel is working again:
|
Seems to affect Home Assistant OS (HASSOS) also (on Pi 4). Or at least this seems to be what i'm experiencing - new install, hwaccel has never worked. |
I am not sure if I should downgrade the kernel using Joe's instructions as kindly posted above or try to build the Pi specific FFMPEG build here in a test branch: raspberrypi/linux#5150 (comment) I am not sure how long we would have to wait for the next Pi ffmpeg update. Has anyone here tried to build this specific branch version? As of today hwaccel for Frigate on the Pi 4 fully updated still doesn't work unfortunately. For now I am making do without hwaccel but the Pi is certainly struggling even with just two cameras I'd imagine this would be a nightmare for people with more. I am not seeing too many people reporting this issue, I take it many are not updating their Pi's? :o I might give the |
I'm hoping I can wait it out... I have built the fixed ffmpeg inside a few different docker containers but could never get it to work within the frigate container. |
I'm surprised more people don't report this issue as well - anyone running HA on a Raspberry Pi via HA OS (So the most popular install type) would be experiencing this AFAICT. |
The same as well for Raspberry Pi OS and also DietPi OS too. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@sparkydave1981 make your own issue, that is unrelated to this one if it is not an RPi |
@blakeblackshear are you able to summarize what will resolve this issue, given your comment in the encoding issue that I linked to above yesterday, and you commented on as not related, a couple hours ago? Is https://trac.ffmpeg.org/ticket/10060 relevant to solving the issue we're experiencing and is it worded correctly? Thanks in advance |
A fix is already in progress #4955 |
Hello, |
It's fixed with the latest 0.12 beta builds :) |
Apologies for the confusion - I've read through this thread and various associated links and tickets here, and am unclear on the conclusion. Does 0.12 beta include a version of ffmpeg that works with newer kernels? Or do we still need to roll back the kernel? I've got 0.12 beta installed and am seeing the same issue (HAOS on a Raspi 4). Perhaps I'm not configuring things properly. |
This is fixed in 0.12. If you're having issues you should make a separate issue. |
Thanks, I've opened issue #5682 |
Does this issue still exist in Frigate 11.1? My RPI4 kernel is 6.19-v8+, default for the Raspberry PI OS Install currently |
Yes, 0.11 does not contain a fix |
thank you for the quick reply! ive been racking my brain for 2 weeks off and on trying to get frigate to work. the beta has a ton of ffmpeg errors on my new install, the non beta has no errors but cant record / green snapshots. this helps me try something else :) |
I'd suggest making a new support issue then, likely a configuration issue on the beta |
|
Checking in on this issue. I just installed Frigate 0.12.1 and hwaccel does not appear to be working (or at least not working as well as it used to). CPU usage for my cameras went from ~4.5% each to ~9% each. I am still running the older 5.15.32-v8+ kernel and wondering if I need to update to the latest to fix this. I see some conflicting reports about whether or not this fix is working. Can anyone confirm that they are running Frigate 0.12.1 on the latest PI kernel, and that their CPU usage is similar to what it was when running Frigate 0.11 and the older kernel? |
I just upgraded my kernel from 5.15.32-v8+ to 6.1.21-v8+. Interestingly, after doing that, Frigate 11.1 still runs fine with no CPU usage increase. So they must have changed something in the kernel between 5.15.61-v8+ and 6.1.21-v8+ that fixed the original issue. However, after installing Frigate 12.1, my ffmpeg CPU usage still doubles. Running 11.1, my usage is ~4.5% per camera. Running 12.1, usage is:
It seems like whatever ffmpeg build Frigate 12 is using doesn't get along well with my PI. |
Frigate 0.12.x uses a version of ffmpeg built specifically for the RPi from the rpi repo |
I did some testing by logging into the docker containers and running the same ffmpeg commands that Frigate is running. Frigate 0.11.1 (ffmpeg version n5.1-2-g915ef932a3-20220731 ) :
Frigate 0.12.1 (ffmpeg version 4.3.6-0+deb11u1+rpt1):
Notice the differences on the What was the reasoning for using the older ffmpeg version? Was it solely due to it being a special build for RPi? |
Then you can use the newer version of ffmpeg inside frigate 0.12, after all Frigate supports custom ffmpeg builds
The fact that hwaccel did not work at all for the vast majority of users, hence this issue existing and having ~150 comments |
If I remove |
maybe in your case, many other users have found it to greatly reduce CPU usage. Of course, it depends on the camera pixel format, your host driver / kernel, etc. The RPi decoder in general is not very robust |
I will try this next. I'm just attempting to help out the project and suggesting that maybe it's time to revisit ffmpeg 5.1 now that it appears something has changed in the kernel that fixed the original issue (at least for me). Hopefully others can run some tests as well to confirm.
Sure - I'm not suggesting that no one should use those parameters. But the preset specifically for the PI ( |
Can confirm, same here, no change |
Describe the problem you are having
Everything was working fine with my frigate setup. I've been using the 0.11 betas/rc's since the beginning. All of the sudden one of my cameras stopped working in frigate completely. Blue Iris was still working fine with it. VLC opened the configured URL no problem. I've issues once in a while in the past where I'd see events stop happening so I'd just bounce frigate and all would be well. This time, bouncing frigate and the rebooting the camera hasn't helped.
The really strange thing is that I can't think of anything that has changed. IIRC, the camera was working fine with 0.11RC2 for at least a few days before this randomly started happening. No matter what I tried I just get repeating
No frames received from driveway in 20 seconds
errors. I do have another camera that is the same brand but a little bit older model that continued to work fine. I removed it from the config since the issue with the one camera still occurs.Version
0.11.0-c461c9e
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
Debian
Install method
Docker Compose
Coral version
USB
Network connection
Wired
Camera make and model
Dahua IPC-T5442T-ZE
Any other information that may be helpful
No response
The text was updated successfully, but these errors were encountered: