HomeBridge and vcgencmd issue

Creating a bug report/issue

Yes, I have searched the existing open and closed issues

Required Information

  • G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=14
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘applied’
  • Distro version | bookworm 0
  • Kernel version | Linux DietPi 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | RPi 4 Model B (aarch64)
  • Power supply used | (EG: 5V 1A RAVpower)
  • SD card used | USB adapter w/ Samsung Pro Plus 128GB microsd

Additional Information (if applicable)

  • Software title | HomeBridge w/ Unifi Protect Plugin
  • Was the software title installed freshly or updated/migrated? Updated but issue has always been there
  • Can this issue be replicated on a fresh installation of DietPi? yes
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. Install Unifi Protect Plugin for HomeBridge on rpm
  2. Observe logs

Expected behaviour

  • no error would happen and hardware encoding should work

Actual behaviour

  • defaulting to software encoding

Log:

[7/25/2025, 11:27:17 PM] [UniFi Protect] Error running vcgencmd: Command failed: vcgencmd get_mem gpu
[7/25/2025, 11:27:17 PM] [UniFi Protect] Unable to probe the capabilities of your Homebridge host without access to 'vcgencmd'. Ensure that it is available in your path and correctly working.

I suspect that home bridge doesn’t have the required privileges to probe vcgencmd as the command also fails for my user account but works fine under sudo. Without hardware encoding the video stream is much slower to start and obviously uses more CPU resources.

Did you tried adding the user into video group?

I am embarrassed to admit but im unsure how to do that. Is Homebridge using its own user named “homebridge” and if so would it just be sudo usermod -a -G video homebridge ?

yes, the command added homebridge to the video group but I’m still getting the same error :frowning:

maybe @MichaIng has an idea

1 Like

Please do this:

cat << '_EOF_' > /lib/udev/rules.d/10-vc.rules
KERNEL=="vcio", GROUP="video", MODE="0660"
KERNEL=="vchiq", GROUP="video", MODE="0660"
SUBSYSTEM=="vc-sm", GROUP="video", MODE="0660"
KERNEL=="vcsm-cma", GROUP="video", MODE="0660"
_EOF_
chgrp video /dev/vcio
chmod 0660 /dev/vcio

We need to update our raspberrypi-sys-mods package :thinking:.

Ok so doing what you said plus adding “homebridge” to the video group did the trick! Thank you.

For those who stumble across this issue, run the commands in terminal that @MichaIng shared

cat << '_EOF_' > /lib/udev/rules.d/10-vc.rules
KERNEL=="vcio", GROUP="video", MODE="0660"
KERNEL=="vchiq", GROUP="video", MODE="0660"
SUBSYSTEM=="vc-sm", GROUP="video", MODE="0660"
KERNEL=="vcsm-cma", GROUP="video", MODE="0660"
_EOF_
chgrp video /dev/vcio
chmod 0660 /dev/vcio

and then do

usermod -a -G video homebridge

1 Like

Thanks for the udev rule, that fixed it for me and Octoprint.

I had manually changed perms on /dev/vcio but it didn’t survive a reboot…

Only difference from solution above is changing homebridge to octoprint on the usermod command.

Thanks again!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.