Closed wimb0 closed 10 months ago
This is most likely related to https://github.com/blakeblackshear/frigate-hass-addons/pull/122
Other users saw that it was still working as expected. Which addon variant are you running?
I am running the normal beta version, not full-access.
CC @felipecrs
@wimb0 what is your HAOS and Supervisor version?
Ops, got it. You are using Debian with Supervised.
I am not very sure how supervised installations work: is it possible to upgrade docker?
I believe you need Docker v23 at least. Please confirm the docker version you have as well.
Docker is already at the latest version:
That's weird. Docker's CAP_PERFMON
must not be working in your environment for some reason. It works for me though, using HAOS.
I don't mind reverting the PR above, but if I were you I would probably dig a little deeper to find out why it doesn't work.
Maybe there is a minimum systemd version required for this to work.
What is your Linux kernel version? Can you also check the systemd version?
Some more information is provided in https://github.com/intel/media-delivery/blob/3cef91ef32a5dcebb570ae5a3a4f82d339c6b105/doc/howto.rst#id2. There, docs still does not account to the fact that CAP_PERFMON is now supported.
PERFMON
is listed as a supported capability in Docker docs too: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities:~:text=listen%20to%20multicasts.-,PERFMON,-Allow%20system%20performance
FWIW, I dont run HAOS or the addon but I was unable to get CAP_PERFMON working with the intel gpu stats/docker and reverted back to running my container in privileged mode
Debian 12 Kernel 6.1.0-13-amd64 Docker v24 systemd 252 (252.17-1~deb12u1)
Snippet from my docker compose file, the cap_add is "valid" but I still don't get stats, I had to add privileged to get them working
frigate:
container_name: frigate
image: ghcr.io/blakeblackshear/frigate:dev-14c89c9
privileged: true
cap_add:
- CAP_PERFMON
Also if I do this it also works (without the privileged flag):
cap_add:
- SYS_ADMIN
@xconverge can you confirm the name of the capability with docker inspect? This is how it looks for me (HAOS), which is working:
First (with the snippet I sent unchanged) I saw
"CapAdd": [
"CAP_PERFMON"
],
so then I took the hint and changed my docker compose to "PERFMON" and now I get:
"CapAdd": [
"PERFMON"
],
and it still doesn't work
I also checked this
# capsh --print | grep cap_perfmon
Bounding set =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read,cap_perfmon,cap_bpf,cap_checkpoint_restore
What is your Linux kernel version? Can you also check the systemd version?
uname -a:
Linux optiplex 5.10.0-26-amd64 #1 SMP Debian 5.10.197-1 (2023-09-29) x86_64 GNU/Linux
systemd --version:
systemd 247 (247.3-7+deb11u4)
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified
@xconverge can you confirm the name of the capability with docker inspect? This is how it looks for me (HAOS), which is working:
I did inspect as well:
"CapAdd": [ "PERFMON" ], "CapDrop": null,
Debian 12 Kernel 6.1.0-13-amd64 Docker v24 systemd 252 (252.17-1~deb12u1)
HAOS is also systemd 252, so that must not be the problem.
@NickM-27 I am out of ideas. Here are the options, I believe:
Let me know if you'd like any action on my side.
let's revert for now
https://github.com/home-assistant/operating-system/discussions/2319#discussioncomment-5666111 https://github.com/blakeblackshear/frigate/pull/6166
This might explain it for me
# cat /proc/sys/kernel/perf_event_paranoid
3
Changing it to 2 did indeed work for me. I suspect this is what caught up @wimb0 system too!
home-assistant/operating-system#2319 (comment) #6166
This might explain it for me
# cat /proc/sys/kernel/perf_event_paranoid 3
Changing it to 2 did indeed work for me. I suspect this is what caught up @wimb0 system too!
Indeed, that works for me too.
What I did:
sudo sysctl kernel.perf_event_paranoid=2
(default was 3)
restart Frigate
@NickM-27 how about I add a note to the docs for this case (when running supervised but not HAOS), rather than reverting the PR?
I think that's fine, I'd suggest adding it to the hwaccel docs that already covers intel GPU stats
Maybe, if it is a default setting in HAOS, it should be added to the HA Supervised Install docs. I'll create an issue there, and see what they think about it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the problem you are having
Since updating from beta 3 to beta 4, the Intel GPU stats do not work anymore:
ERROR : Unable to poll intel GPU stats: Failed to initialize PMU! (Permission denied)
I am using the Frigate Beta (0.13.0) Addon on Home Assistant supervised on Debian.
Version
0.13.0-65E3E67
Frigate config file
Relevant log output
VAINFO for GPU
Frigate stats
No response
Operating system
Debian
Install method
HassOS Addon
Coral version
USB
Network connection
Wired
Camera make and model
Annke C500 and Reolink Doorbell
Any other information that may be helpful
No response