2019-01-13, 13:52
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
/var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
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