Open begasslmaier opened 5 years ago
I guess it depends on the platform, as I use it like this on LibreELEC:
LibreELEC (official): 9.0.2 (RPi2.arm)
kodi01:~ # which vcgencmd
/usr/bin/vcgencmd
And this is why we don't put an absolute path in the command.
Not adding the full path to the vcgencmd
command is the right call. The problem is that the environment variable PATH
seems to not have the correct value when the plugin runs. Not sure why or where is the right place to change that. On OSMC Released 2022-03-14 with a Pi 4 when I ssh the $PATH
includes: /usr/osmc/bin:/opt/vc/bin
while PATH
from inside the plugin python code does not include those.
Given OSMC is quite popular on RPi, consider altering PATH
to include those paths in the plugin code, something like:
import os
os.environ["PATH"] += ':/usr/osmc/bin:/opt/vc/bin'
A bit of a hack but I think it is worth it.
vcgencmd doesnt work anymore with newer Kernels see https://github.com/raspberrypi/firmware/issues/1740 https://forums.raspberrypi.com/viewtopic.php?t=331817
could u implement a replacement ? because right now there is now way in Kodi to turn HDMi off it seems
"Error 2 File not found" is reported. Changing screensaver.py to contain the full path "/opt/vc/bin/vcgencmd" makes it work, so this path might not be included in the command search path.