OpenELEC Testbuilds for RaspberryPi
(2013-03-09, 20:55)MilhouseVH Wrote:
(2013-02-27, 09:01)rbej Wrote: - remove "Suspend" and "Hibernate" from XBMC shutdown menu (taken from XBIAN)

I queried the addition of this change to the author of Confluence Modified which is great on the Pi, to see if he could also add it, and he replied that rather than hacking the skin with such a change, the skin should be querying XBMC to determine whether Suspend and Hibernate options are supported by the hardware and not displaying options that are not supported... so assuming this statement is true, then it suggests the Raspberry Pi is lying when it reports that it supports Suspend and Hibernate, does anyone know if this has been raised as an issue?

Edit: It's very true... these are the default visibility options for Suspend and Hibernate in Confluence:
Code:
<visible>System.CanSuspend</visible>
<visible>System.CanHibernate</visible>

so it would appear the Raspberry Pi is not being honest about it's Suspend and Hibernate capabilities. Investigating...

It turns out that the Raspberry Pi is using the default power interface, CNullPowerSyscall, and is getting all power options by default:
Code:
virtual bool CanPowerdown() { return true; }
virtual bool CanSuspend()   { return true; }
virtual bool CanHibernate() { return true; }
virtual bool CanReboot()    { return true; }

Rather than patch individual skins, it would be better/easier to patch the default power interface when building for the Pi, thus correctly disabling Suspend/Hibernate for all skins... the following patch achieves this:

Code:
diff --git a/xbmc/powermanagement/PowerManager.h b/xbmc/powermanagement/PowerManager.h
--- a/xbmc/powermanagement/PowerManager.h       2013-03-09 22:57:46.919080343 +0000
+++ b/xbmc/powermanagement/PowerManager.h       2013-03-09 22:58:08.775080999 +0000
@@ -32,8 +32,8 @@
   virtual bool Reboot()       { return false; }

   virtual bool CanPowerdown() { return true; }
-  virtual bool CanSuspend()   { return true; }
-  virtual bool CanHibernate() { return true; }
+  virtual bool CanSuspend()   { return false; }
+  virtual bool CanHibernate() { return false; }
   virtual bool CanReboot()    { return true; }

   virtual int  BatteryLevel() { return 0; }
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.


Messages In This Thread
MythTV PVR: No Video - by hkramski - 2012-11-13, 20:32
Cumulative Small Skip forward ... - by xandy - 2013-02-03, 15:46
RE: OpenELEC Testbuilds for RaspberryPi - by Milhouse - 2013-03-10, 00:57
:00 - by Koloss - 2013-07-14, 12:09
RE: :00 - by popcornmix - 2013-07-14, 12:28
Logout Mark Read Team Forum Stats Members Help
OpenELEC Testbuilds for RaspberryPi12