• 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
XBMC on Pi: Add TV/monitor Power Save support when idle?
(2015-05-14, 20:47)vbat99 Wrote:
(2015-05-14, 20:28)Dec64 Wrote: Weird problem, my rpi2 wont come back on. As in HDMI. All i get is a black screen when, even after full reboots. If via SSH i type "vcgencmd display_power 1" it just returns display_power=0, seems it's stuck with HDMI disabled, anyway to fix this?

Had this myself on a Pi B twice, suppose you'd need logs to id what's going on....but the fault may not happen for a couple of days.

Weird i forced hotplug on and it seems to have fixed it for now..but will have to watch it.
Reply
(2015-05-03, 14:24)timker Wrote: Hi, I've created a screen saver addon which turns hdmi off and on for the raspberrypi

https://github.com/timker/kodi.screensaver.pimon


the zip is in the repo

I must be missing something here. I downloaded the zip and installed the pimon screensaver. It's active, but it doesn't have any configuration options, and just shows this rainbow cat character once it's activated. Is this supposed to be a joke, or what did I do wrong?
Reply
It does work. On livingroom Pi and Samsung TV, the display goes black, and Sammy tv goes to standby after 5 minutes.

On daughter's Pi and LG TV, she see's the rainbow Cat, but I believe the display goes blank after some time....actually, I'll have to check myself tonight to be sure.

But it does work, think it depends if your paused video, or at a menu.
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
So the reason it shows the Nyan Cat, is because i used the Nyan Cat screensaver as base
For some reason your system doesn't support the method i used to disable hdmi, so it will show that cat instead!
Pretty much the exact opposite of what you want.


Maybe your os version doesn't support it? what are you running?



(2015-05-27, 05:57)bmac88 Wrote: I must be missing something here. I downloaded the zip and installed the pimon screensaver. It's active, but it doesn't have any configuration options, and just shows this rainbow cat character once it's activated. Is this supposed to be a joke, or what did I do wrong?
Reply
(2015-05-27, 09:38)timker Wrote: So the reason it shows the Nyan Cat, is because i used the Nyan Cat screensaver as base
For some reason your system doesn't support the method i used to disable hdmi, so it will show that cat instead!
Pretty much the exact opposite of what you want.


Maybe your os version doesn't support it? what are you running?

Raspbmc - Working
OSMC RC3 - Not working.

Hmmm....Thanks for the info, was wondering why. I'll see if can get a log of the OSMC Pi sometime soon.
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
(2015-05-27, 20:01)vbat99 Wrote:
(2015-05-27, 09:38)timker Wrote: So the reason it shows the Nyan Cat, is because i used the Nyan Cat screensaver as base
For some reason your system doesn't support the method i used to disable hdmi, so it will show that cat instead!
Pretty much the exact opposite of what you want.


Maybe your os version doesn't support it? what are you running?

Raspbmc - Working
OSMC RC3 - Not working.

Hmmm....Thanks for the info, was wondering why. I'll see if can get a log of the OSMC Pi sometime soon.

Yes, I am using OSMC RC3. I am sad that this does not work for this OS. Sad
Reply
The screensaver is relying on the PATH variable to resolve the location of vcgencmd - see lines 43 and 49.

If the path for vcgencmd isn't already in the PATH variable then calls to vcgencmd will fail. Maybe the PATH variable for Raspbmc includes vcgencmd, while OSMC does not.

The addon could either search for vcgencmd and use the full path when calling vcgencmd or it can add the extra locations to the PATH variable during initialisation:

Code:
import os
...
os.environ["PATH"] += os.pathsep + '/opt/vc/bin'
in which case the existing calls should then work more reliably.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
where would I put this line in the screensaver.py file to make it work?
(2015-05-27, 20:33)Milhouse Wrote: os.environ["PATH"] += os.pathsep + '/opt/vc/bin'
Reply
(2015-05-27, 21:02)bmac88 Wrote: where would I put this line in the screensaver.py file to make it work?

Just make sure os.environ["PATH"] is updated once, before the first subprocess.call().

Adding it at line 58 before you create the Screensaver() object should be OK. Or alternatively, at line 43, inside the Screensaver.Init() method, before the call to subprocess.call().
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
(2015-05-27, 21:26)Milhouse Wrote:
(2015-05-27, 21:02)bmac88 Wrote: where would I put this line in the screensaver.py file to make it work?

Just make sure os.environ["PATH"] is updated once, before the first subprocess.call().

Adding it at line 58 before you create the Screensaver() object should be OK. Or alternatively, at line 43, inside the Screensaver.Init() method, before the call to subprocess.call().

I tried line 43 and it did not work adding just the quote above (I did not add the import os and ...) and it failed.
I reverted that change and simply changed both instances of vcgencmd to use the absolute path of /opt/vc/bin/vcgencmd (line 43 and 49) and it worked! It is now turning off HDMI after the specified time and it wakes up when pressing a key on the remote.

For anyone using OSMC RC3, this seems to be the simplest fix.
Reply
It's not going to work without the "import os" - you need to add both lines, the "import" at the top (line 25) and the second line at either line 43 or line 58.

However if you've got it working using an absolute path, timker should be able to fix it properly so that the addon works on all distributions (OpenELEC, Raspbmc, OSMC, Xbian, Raspbian etc.)
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
@timker
Interested in updating your screensaver per Milhouse suggestion for path to vcgencmd?
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
(2015-05-30, 09:52)vbat99 Wrote: @timker
Interested in updating your screensaver per Milhouse suggestion for path to vcgencmd?

Yeah I plan to do it, worked all weekend, so had no time yet.

Since i don't have access to any other kodi installations it would be if someone else tested, as I can't duplicate the issue.
Millhouses solution seems sensible though, so should be straight forward.
Reply
@timker

Happy to test with Raspbmc and OSMC RC3.

And take your time, I understand other commitments take priority. Cheers
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply
ok new version is up,

https://github.com/timker/kodi.screensaver.pimon

let me know how it goes Smile
Reply
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11

Logout Mark Read Team Forum Stats Members Help
XBMC on Pi: Add TV/monitor Power Save support when idle?1