OpenELEC Testbuilds for RaspberryPi
(2013-03-10, 01:18)sraue Wrote: will try this here on various systems with and without working upower, if it works i will report back so you can make a PR with this changes (or i help you with this) - nice find.

It works as a patch for a Pi, that's all I've tested with.

(2013-03-10, 01:16)sraue Wrote: the problem here is xbmc calls "upower" to get if suspend/hibernate is supported. because upower depends on consolekit, which depends (still) on x11 librarys we dont include upower (also because supend/hibernate is not supported). this also means xbmc shows this options which are set as default because xbmc dont get the requested info

The problem is there is no valid power management option for the Pi, so it always uses the default null provider.

Here is the code to determine a suitable option:
Code:
#if defined(TARGET_DARWIN)
  m_instance = new CCocoaPowerSyscall();
#elif defined(TARGET_ANDROID)
  m_instance = new CAndroidPowerSyscall();
#elif defined(_LINUX) && defined(HAS_DBUS)
  if (CConsoleUPowerSyscall::HasConsoleKitAndUPower())
    m_instance = new CConsoleUPowerSyscall();
  else if (CConsoleDeviceKitPowerSyscall::HasDeviceConsoleKit())
    m_instance = new CConsoleDeviceKitPowerSyscall();
  else if (CSystemdUPowerSyscall::HasSystemdAndUPower())
    m_instance = new CSystemdUPowerSyscall();
  else if (CUPowerSyscall::HasUPower())
    m_instance = new CUPowerSyscall();
#ifdef HAS_HAL
  else
    m_instance = new CHALPowerSyscall();
#endif
#elif defined(_WIN32)
  m_instance = new CWin32PowerSyscall();
#endif

  if (m_instance == NULL)
    m_instance = new CNullPowerSyscall();
[

None of the Linux tests are performed, not even HAS_HAL, so I'm guessing HAS_DBUS is not defined. On a Pi, m_instance is always NULL, so is assigned an instance of CNullPowerSyscall.

So the question becomes - maybe one for Popcornmix - does the Pi have any kind of power management interface, and if so should the above test be modified rather than patching the properties of the default?

Edit: On further investigation, _LINUX and HAS_DBUS are both defined, but HAS_HAL isn't, so none of the four conditions tested within __LINUX && HAS_DBUS evaluate to true on a R-Pi, thus explaining why m_instance is always null before being assigned the default instance.
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, 01:20
: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