Linux Ubuntu 18.10, Kodi 18.0, no Suspend/Hibernate option in Power Options
#1
I am running Kodi 18.0 Nightly builds (from team-xbmc PPA) on Ubuntu 18.10. My Power Options in Kodi is missing Suspend and Hibernate. Full list: Exit, Power off system, Custom shutdown timer, Reboot, Inhibit idle shutdown.

The system boots directly to Kodi from a systemd service (see below) as user xbmc.

I have both consolekit and upower packages installed. If I remove either of them, I lose the ability to power off and reboot from Kodi. I have a PolKit custom-actions.pkla file  in place (see below), without which I also lose the ability to power off and reboot from Kodi.

S1/S3 is enabled from BIOS and I can suspend the system by running pm-suspend as root.

After some google-fu I suspect I should remove the consolekit and upower packages and replace them with something else, but right now I have no clue with what, nor how to proceed. What am I missing here?

/etc/systemd/system/kodi.service
Code:
[Unit]
Description = Kodi Media Center
After = systemd-user-sessions.service network.target sound.target

[Service]
User = xbmc
Group = xbmc
Type = simple
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :0 -nolisten tcp vt7
Restart = on-abort
RestartSec = 5

[Install]
WantedBy = multi-user.target

/var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
Code:
[Actions for xmbc user]
Identity=unix-user:xmbc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*,org.freedesktop.login1.*
ResultAny=yes
ResultInactive=no
ResultActive=yes
Reply
#2
Compare with that one: https://forum.kodi.tv/showthread.php?tid=231955 should work.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
(2019-01-13, 14:03)fritsch Wrote: Compare with that one: https://forum.kodi.tv/showthread.php?tid=231955 should work.

Thanks! Using your action list in the custom-actions.pkla file fixed the missing Suspend/Hibernate problem. Smile
Reply
#4
Here's the working pkla file.

/var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
Code:
[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower2.*;org.freedesktop.consolekit.system.*
ResultAny=yes
ResultInactive=no
ResultActive=yes
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu 18.10, Kodi 18.0, no Suspend/Hibernate option in Power Options0