From 017b75869185fc71030100e2fef0ffd9fbe28633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 2 Mar 2022 19:01:02 +0100 Subject: Install vcgencmd and fix user permission on Ubuntu The 64bit images are currently lacking vcgencmd, meaning that the PiSupport plugin can't check for undervoltage and overheat situations and will complain about this in the latest version as well, see feedback in #770. This should fix it by installing the package containing vcgencmd and making sure the base user is added to the video group as well. I was not able to test this in a build since I could not find documentation on which base image exactly to use and how to precisely run the 64bit build, but based on user feedback it should hopefully work. Still, please test in a build before merging. --- src/modules/octopi/start_chroot_script | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/octopi/start_chroot_script b/src/modules/octopi/start_chroot_script index 11b981b..4a2438c 100755 --- a/src/modules/octopi/start_chroot_script +++ b/src/modules/octopi/start_chroot_script @@ -158,6 +158,12 @@ popd usermod -a -G tty "${BASE_USER}" usermod -a -G dialout "${BASE_USER}" +# If building against Ubuntu, make sure vcgencmd is available and pi has the rights to use it +if [ "${BASE_DISTRO}" == "ubuntu" ]; then + apt-get -y --force-yes install libraspberrypi-bin + usermod -a -G video "${BASE_USER}" +fi + # store octopi commit used to build this image echo "$OCTOPI_COMMIT" > /etc/octopi_commit -- cgit v1.2.3