Solved Suspend / Hibernate menu options missing on openSUSE 13.2
#1
Hi kodi-folks,

I am experiencing exactly the same problem that was already posted here: http://forum.kodi.tv/showthread.php?tid=212880.

However, this thread was marked as solved :-( I guess uninstalling upower did the trick, but no further explanation was given there. Unfortunately, uninstallung upower is not an option for me as several packets depend on it in my installation of openSUSE 13.2. Does anybody know of any tweaks that might bring back these options?

Currently, I am running XBMC 13.2, but KODI 14.0 exposes the same behaviour.

I also have difficulties to debug that issue properly. I already set debug output to the highest level as pointed out here: http://kodi.wiki/view/Log_file/Advanced#...everything. But it is still hard to find out which PowerSyscall actually is used by XBMC. The only hint I find in the debug log is this message by UPower: "UPower: Received an unknown signal NameAcquired", but I miss the Info "Selected UPower as PowerSyscall". So, I suspect it ended up using CConsoleUPowerSyscall as this class derives from CUPowerSyscall but its constructor does not call the base class constructor. And probably CConsoleUPowerSyscall uses the hibernate and suspend methods of CUPowerSyscall, but these are no longer provided by upower.

AFAIK, hibernate and suspend is handled by logind in openSUSE 13.2 (I am not really sure about this, all of this is pretty ... ähm ... confusing), but XBMC should be able to use logind. When I look into the implementation of the PowerManager.cpp, I find the following code snippet:

Code:
void CPowerManager::Initialize()
{
#if defined(TARGET_DARWIN)
  m_instance = new CCocoaPowerSyscall();
#elif defined(TARGET_ANDROID)
  m_instance = new CAndroidPowerSyscall();
#elif defined(TARGET_POSIX)
#if defined(HAS_DBUS)
  if (CConsoleUPowerSyscall::HasConsoleKitAndUPower())
    m_instance = new CConsoleUPowerSyscall();
  else if (CConsoleDeviceKitPowerSyscall::HasDeviceConsoleKit())
    m_instance = new CConsoleDeviceKitPowerSyscall();
  else if (CLogindUPowerSyscall::HasLogind())
    m_instance = new CLogindUPowerSyscall();
  else if (CUPowerSyscall::HasUPower())
    m_instance = new CUPowerSyscall();
#if defined(HAS_HAL)
  else if(1)
    m_instance = new CHALPowerSyscall();
#endif // HAS_HAL
  else
#endif // HAS_DBUS
    m_instance = new CFallbackPowerSyscall();
#elif defined(TARGET_WINDOWS)
  m_instance = new CWin32PowerSyscall();
#endif

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

So, I guess CLogindUPowerSyscall() implements support for logind but CConsoleUPowerSyscall is preferred if it is available. Maybe, removing ConsoleKit helps (I don't know - I still have to try this), but are there any other ways to guide XBMC when choosing the PowerSysCall if there are multiple of them available? Is there something I can change in my (openSUSE) system configuration (besides removing ConsoleKit or upower) to influence XBMC here?

BTW: Is there something like the about:config page in Firefox for XBMC where all settings can be dumped?

Well, thanks for reading! I hope, someone out there could shed some light on this.

Ciao, Rosepeter
Reply
#2
Big Grin 
Hi,

(2015-01-09, 19:00)Rosepeter Wrote: So, I guess CLogindUPowerSyscall() implements support for logind but CConsoleUPowerSyscall is preferred if it is available. Maybe, removing ConsoleKit helps (I don't know - I still have to try this), but are there any other ways to guide XBMC when choosing the PowerSysCall if there are multiple of them available? Is there something I can change in my (openSUSE) system configuration (besides removing ConsoleKit or upower) to influence XBMC here?

I want to let you know that uninstalling ConsoleKit solved my problems and the Suspend/Hibernate menu items showed up again :-)

Maybe, it makes sense if CUPowerSyscall::HasUPower() also checks if CanHibernate and CanSuspend are available. Otherwise using upower for the power stuff seems not to be very helpful.

How can I mark such a thread as solved?

Ciao, Rosepeter
Reply

Logout Mark Read Team Forum Stats Members Help
Suspend / Hibernate menu options missing on openSUSE 13.20