Kodi on freebsd 13.1 - i want to enable suspend
#1
Hallo to the community

Iam running Kodi with zero issues here on freebsd absolutely stable. I can suspend resume from xorg with no problem at all,as the acpi works!! But in Kodi there are only poweroff, reboot, exit buttons but no suspend button.

i edited /usr/local/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
and added :
[Actions for KODI users]
Identity=kodi:kodi
Action=org.freedesktop.upower.*
ResultAny=yes
ResultInactive=no
ResultActive=yes

Also i install doas and did the following :


permit persist :video #kodi user has to belong this group, or it does not have hw acceleration for graphics
permit nopass kodi as root cmd reboot
permit nopass kodi as root cmd shutdown

I cannot make it suspend though, any suggestions would be aprecciated.
Reply
#2
this is from kodi.log :

https://paste.kodi.tv/raw/lonuhivabu
Reply
#3
I've had a go at this but it turns into a rabbit hole where I end up in Gentoo forums referencing RedHat forums, but, I have SOME information that could possibly help you.

The reason the Suspend option does not show up in Kodi is due to the skin checking an internal system setting "System.CanSuspend" which is being set to false.

I searched around the google machine but no results for overriding from advancedsettings or some such method was found so I had a root through the Kodi source to find out how/where/when this is set.

Regarding LINUX alone:

The setting System.CanSuspend is being set from xbmc/powermanagement/PowerManager.cpp
That file is getting that information from xbmc/platform/linux/powermanagement/UPowerSyscall.cpp

Specifically this:

void CUPowerSyscall::UpdateCapabilities()
{
  m_CanSuspend   = CDBusUtil::GetVariant("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.UPower", "CanSuspend").asBoolean(false);
  m_CanHibernate = CDBusUtil::GetVariant("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.UPower", "CanHibernate").asBoolean(false);
}

Which of course leads to searching for information on the org.freedesktop.UPower which leads to a Gentoo forum which leads to a RedHat forum.

Ensue rabbit hole which cannot be followed any further and it's outside Kodi support perview anyhow.

So my recommendation is to find out more about the upower regarding your system, it's not necessarily a Kodi bug just that Kodi is being told by the system that it cannot be suspended so Kodi doesn't show the option.

I do have to note there are multiple files regarding multiple systems to find out about and manage power on different systems within the Kodi source so I could be way off on this but I don't believe so.

Personally I run debian so anything further would only provide fixes for debian and still be outside the scope of this forum.

Hope this information helps.
Reply
#4
Thank you for this ! I also believe it is upower thats not sending the correct info to kodi. Going to search more.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi on freebsd 13.1 - i want to enable suspend0