MilhouseVH / texturecache.py

Utility script to manage the XBMC texture cache
http://forum.xbmc.org/showthread.php?tid=158373
GNU General Public License v2.0
181 stars 34 forks source link

Turning off HDMI in different ways when started via command line or systemd. #26

Closed Katzekonig closed 9 years ago

Katzekonig commented 9 years ago

Most likely it's due to an error I've made in how I'm starting it with systemd but I wanted to get your opinion on it.

When started from command line it's using /opt/vc/bin/vcgencmd display_power 0 / 1 (As it should) texturecache.commandline.log

When started with systemd on OSMC it's using /opt/vc/bin/tvservice --off / --preferred texturecache.systemd.log

Here's my systemd config: texturecache.timer & texurecache.service

Let me know if you need any further info or if you'd like me to test anything. Glad to help out!

MilhouseVH commented 9 years ago

When started with systemd on OSMC it's using /opt/vc/bin/tvservice --off / --preferred texturecache.systemd.log

Your path when using systemd doesn't include /opt/vc/bin so the script can't find vcgencmd - in your log, see:

  "BIN_CECCONTROL": "", 
  "BIN_TVSERVICE": "/opt/vc/bin/tvservice", 
  "BIN_VCGENCMD": null, 

and BIN_VCGENCMD is null, ie. it can't be found so won't be called.

Either add @bin.vcgencmd=/opt/vc/bin/vcgencmd when calling the script, or fix your PATH environment variable by adding /opt/vc/bin so that the script can find the executable automatically.

Katzekonig commented 9 years ago

Thanks very much Milhouse! Great script you've made. Working perfectly on OSMC now and I've posted how I did it on OSMC.tv and Kodi.tv.