paamaran
Posts: 4
Joined: Fri Dec 05, 2014 2:16 pm

Kodi 14.2 Shutdown Functions not available - Raspian

Thu Apr 23, 2015 6:51 am

Hi,

I have got the RPi 2 recently and installed Kodi 14.2 and I use Mimic Skin. I am facing one problem with respective to the shutdown functions.

In the "System -> Power Saving -> " The "Shutdown" function is showing as "?0?" instead of showing the shutdown functions like exit, suspend, shutdown etc.

How do I get it back.

The details of the RPi 2

Raspberry Pi OS Version : 3.18.7+ #755 PREEMPT armv6l GNU/Linux
Kodi Version: 14.2 Git:7cc53a9 (Compiled: Mar 29-2015)

Here with I have attached the Images for the same.
IMG_20150423_120323.jpg
Shutdown Function Screen
IMG_20150423_120323.jpg (30.69 KiB) Viewed 26723 times
IMG_20150423_120406.jpg
Shutdown Functions
IMG_20150423_120406.jpg (33.13 KiB) Viewed 26723 times
TIA

PAM

DirkS
Posts: 10014
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Thu Apr 23, 2015 9:11 am

Is it showing up correctly if you use the default skin

paamaran
Posts: 4
Joined: Fri Dec 05, 2014 2:16 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Thu Apr 23, 2015 3:09 pm

No. ie In the Default Skin also it is the same (Confluence).

Thank You for your responce.

Wrechid
Posts: 12
Joined: Thu Jan 30, 2014 1:09 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Thu Apr 30, 2015 3:03 am

I am having the same problem...

When I set the button to visible in the skin's DialogButtonMenu.xml by setting to "yes", the button becomes available in the power menu and when I click it kodi exits. But the raspberry does not reboot nor shutdown...

Any help is appreciated...

Wrechid
Posts: 12
Joined: Thu Jan 30, 2014 1:09 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Sat May 16, 2015 11:07 am

Ok 2 weeks later i figured it out, or at least i think... i should of included in my last post, i'm using the latest Raspbian build and installed Kodi from the repositories... After doing a lot of research, the problem seems to be user name related... When installing Kodi from the repositories, it creates a new user called "kodi" and runs using that name... Well I've still a lot to learn in the linux field, but during my research there's something called "polkit" (PolicyKit)... It appears that since the user kodi does not have the authority to reboot or power off the RPi the Media Center (Kodi) does not give the options in the shutdown menu... I stumbled across this site, http://www.forum-raspberrypi.de/Thread- ... own-dialog ...
I used the exact info, but change the "xbmc" user names to "kodi", rebooted and WaLaa it worked... :)

Create a file in, /var/lib/polkit-1/localauthority/50-local.d/
called "50-kodi.pkla"

Code: Select all

sudo nano /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
fill the file with the info below

Code: Select all

[Actions for kodi user]
Identity=unix-user:kodi
Action=Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.f?reedesktop.udisks.*
ResultActive=yes
ResultAny=yes
ResultInactive=no
save the file and set the owner and group to root

Code: Select all

sudo chown root:root /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
set the permissions

Code: Select all

sudo chmod 0644 /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
reboot...

Code: Select all

sudo reboot
good luck, hope this helps...

sakowiecki
Posts: 1
Joined: Fri Jan 08, 2016 11:07 am

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Fri Jan 08, 2016 11:12 am

It does help it works like a charm, thanks for this you just made my life whole lot easier!

msalmeida
Posts: 1
Joined: Tue Jan 19, 2016 9:49 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Tue Jan 19, 2016 9:58 pm

In Debian 8 polices has diferent names, you also must set this action -> org.freedesktop.login1.*

Here it is my policy, some actions came from previous post, should not be needed for Debian 8.

Code: Select all

[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*,org.freedesktop.login1.*
ResultActive=yes
ResultAny=yes
ResultInactive=no
Also you can check user policies typing this:

Code: Select all

sudo -ukodi pkaction

CyberMuz
Posts: 2
Joined: Sat Mar 19, 2016 9:08 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Sat Mar 19, 2016 9:17 pm

I can't get the shutdown buttons to appear on Kodi.
I have a fresh install of Rasbian (Raspbian Jessie Lite) and I installed Kodi from repository. I have created polkit file but the shutdown/restart functions still haven't appeared. What am I missing?

There is output of my sudo -ukodi pkaction

Code: Select all

[email protected]:~# sudo -ukodi pkaction
org.freedesktop.hostname1.set-hostname
org.freedesktop.hostname1.set-machine-info
org.freedesktop.hostname1.set-static-hostname
org.freedesktop.locale1.set-keyboard
org.freedesktop.locale1.set-locale
org.freedesktop.login1.attach-device
org.freedesktop.login1.flush-devices
org.freedesktop.login1.hibernate
org.freedesktop.login1.hibernate-ignore-inhibit
org.freedesktop.login1.hibernate-multiple-sessions
org.freedesktop.login1.inhibit-block-idle
org.freedesktop.login1.inhibit-block-shutdown
org.freedesktop.login1.inhibit-block-sleep
org.freedesktop.login1.inhibit-delay-shutdown
org.freedesktop.login1.inhibit-delay-sleep
org.freedesktop.login1.inhibit-handle-hibernate-key
org.freedesktop.login1.inhibit-handle-lid-switch
org.freedesktop.login1.inhibit-handle-power-key
org.freedesktop.login1.inhibit-handle-suspend-key
org.freedesktop.login1.power-off
org.freedesktop.login1.power-off-ignore-inhibit
org.freedesktop.login1.power-off-multiple-sessions
org.freedesktop.login1.reboot
org.freedesktop.login1.reboot-ignore-inhibit
org.freedesktop.login1.reboot-multiple-sessions
org.freedesktop.login1.set-user-linger
org.freedesktop.login1.suspend
org.freedesktop.login1.suspend-ignore-inhibit
org.freedesktop.login1.suspend-multiple-sessions
org.freedesktop.policykit.exec
org.freedesktop.policykit.lockdown
org.freedesktop.systemd1.bus-access
org.freedesktop.systemd1.reply-password
org.freedesktop.timedate1.set-local-rtc
org.freedesktop.timedate1.set-ntp
org.freedesktop.timedate1.set-time
org.freedesktop.timedate1.set-timezone

toreandreflo
Posts: 1
Joined: Sun Mar 20, 2016 4:19 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Sun Mar 20, 2016 4:21 pm

Do you have consolekit installed?
I had the same problem, and sudo apt-get install consolekit helped.

CyberMuz
Posts: 2
Joined: Sat Mar 19, 2016 9:08 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Sun Mar 20, 2016 9:49 pm

Thank you, installing consolekit solved the issue. :D

dreamlayers
Posts: 4
Joined: Wed Dec 23, 2015 2:20 am
Location: Canada
Contact: Website

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Mon Mar 21, 2016 3:33 am

Today I fixed the problem using this from http://www.penzin.net/kodi.html:

Code: Select all

cat <<EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*;org.freedesktop.login1.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
EOF
The only changes I see compared to the previous one which didn't work are the filename and ResultInactive=no changed to ResultInactive=yes.

LekkaBru.be
Posts: 1
Joined: Mon Mar 28, 2016 5:54 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Mon Mar 28, 2016 6:02 pm

Worked on Raspbian GNU/Linux 8 (jessie) and Kodi 15.2

I'm not sure about ResultActive, went with =yes and it's working, didn't try =no

Shutdown from inside Kodi is quite useful, Kodi folk should consider making that their default config for those of us auto-starting Kodi on boot.

HorstBaerbel
Posts: 4
Joined: Thu May 26, 2016 7:48 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Wed Jun 15, 2016 10:16 pm

Wrechid wrote:Ok 2 weeks later i figured it out, or at least i think... i should of included in my last post, i'm using the latest Raspbian build and installed Kodi from the repositories... After doing a lot of research, the problem seems to be user name related... When installing Kodi from the repositories, it creates a new user called "kodi" and runs using that name... Well I've still a lot to learn in the linux field, but during my research there's something called "polkit" (PolicyKit)... It appears that since the user kodi does not have the authority to reboot or power off the RPi the Media Center (Kodi) does not give the options in the shutdown menu... I stumbled across this site, http://www.forum-raspberrypi.de/Thread- ... own-dialog ...
I used the exact info, but change the "xbmc" user names to "kodi", rebooted and WaLaa it worked... :)

Create a file in, /var/lib/polkit-1/localauthority/50-local.d/
called "50-kodi.pkla"

Code: Select all

sudo nano /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
fill the file with the info below

Code: Select all

[Actions for kodi user]
Identity=unix-user:kodi
Action=Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.f?reedesktop.udisks.*
ResultActive=yes
ResultAny=yes
ResultInactive=no
save the file and set the owner and group to root

Code: Select all

sudo chown root:root /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
set the permissions

Code: Select all

sudo chmod 0644 /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
reboot...

Code: Select all

sudo reboot
good luck, hope this helps...
Thanks! This and installing consolekit helped.

SandmanSlim
Posts: 1
Joined: Fri Jan 06, 2017 6:21 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Fri Jan 06, 2017 6:52 pm

I am aware this is an old thread, but it was very helpful in solving the same issue in Kodi 15.2 and Raspbian Jessie.

As a WARNING to those who wish to upgrade to Kodi 16.1: This fix does NOT work with kodi 16.1, which I installed using the update method found here: https://mtantawy.com/quick-tip-how-to-u ... pberry-pi/

If anyone is aware of a fix to add the shutdown options with Kodi 16.1, your input would be very helpful and useful.

Currently reverting back to 15.2...

Rascas
Posts: 562
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Mon Jan 09, 2017 2:12 pm

This works for Kodi 16 and 17:

Code: Select all

[email protected]:/home/pi# cat /etc/polkit-1/localauthority/50-local.d/power.pkla
[Allow consolekit]
Identity=unix-group:plugdev
Action=org.freedesktop.consolekit*
ResultAny=yes
ResultInactive=no
ResultActive=yes

[Allow login1]
Identity=unix-group:plugdev
Action=org.freedesktop.login1*
ResultAny=yes
ResultInactive=no
ResultActive=yes

[Allow Upower]
Identity=unix-group:plugdev
Action=org.freedesktop.upower*
ResultAny=yes
ResultInactive=no
ResultActive=yes

[email protected]:/home/pi#
The user which will run Kodi must be part of the "plugdev" group. User "pi" is by default in Raspbian.
Last edited by Rascas on Mon May 01, 2017 1:26 pm, edited 1 time in total.

wakaru
Posts: 1
Joined: Sun Feb 19, 2017 9:54 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Sun Feb 19, 2017 10:02 pm

The solution offered in the previous post by Rascas did not work for me in Kodi 17
User running Kodi is "pi", and belongs to the " plugdev".
Also installed consolekit and I can confirm the daemon is active and running.
I am a bit lost, as all was working OK before the upgrade to Kodi 17 (from 16.1) and even shortly after, but somehow the PowerOff menu started showing the "Exit" option only, as opposed to "Shutdown/PowerOff".
Now I have to shut down the Pi through the commandline via SSH each time before being able to unplug physically the Pi after finishing using Kodi,which is the main use I make of it and it is really annoying.
Any help here will be very much appreciated.
Thanks in advance.

twojstary
Posts: 1
Joined: Mon Feb 27, 2017 11:21 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Tue Feb 28, 2017 7:03 am

I have managed to get the missing menu options working on Kodi 17.0.

Here's what you need to do:

1. Install policykit-1. Installing consolekit alone did not create the necessary directory structures under /etc/polkit-1. In fact, I have removed consolekit along with its depedencies:

Code: Select all

# sudo apt-get install policykit-1
2. Create the policykit rights file. Note at the Identity entry, unlike the posts above, I've used the pi group. Set this to a group that your kodi user is a member of.

Code: Select all

# sudo cat ] /etc/polkit-1/localauthority/50-local.d/50-kodi.pkla [[ EOL
[Actions for pi user]
Identity=unix-group:pi
Action=Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.f?reedesktop.udisks.*
ResultActive=yes
ResultAny=yes
ResultInactive=no
EOL
3. Verify the rights granting reboot & shutdown rights appear on your policy kit rights:

Code: Select all

# pkaction | egrep 'power-off|reboot'
org.freedesktop.login1.power-off
org.freedesktop.login1.power-off-ignore-inhibit
org.freedesktop.login1.power-off-multiple-sessions
org.freedesktop.login1.reboot
org.freedesktop.login1.reboot-ignore-inhibit
org.freedesktop.login1.reboot-multiple-sessions

bowlofred
Posts: 4
Joined: Wed Mar 15, 2017 7:37 am

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Wed Mar 15, 2017 7:43 am

I also had the items disappear shortly after going to 17. (Was working before with consolekit).

Installed policykit, but no changes to the menu.

Is there a log file somewhere that Kodi creates detailing why the menu options aren't being shown?

mskyaxl
Posts: 1
Joined: Sun Apr 02, 2017 8:17 pm

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Sun Apr 02, 2017 8:20 pm

bowlofred wrote:I also had the items disappear shortly after going to 17. (Was working before with consolekit).

Installed policykit, but no changes to the menu.

Is there a log file somewhere that Kodi creates detailing why the menu options aren't being shown?

org.freedesktop.login1.* was really important as mentioned before. Adding it fixed the problem for me (and also installing policykit-1)

User avatar
Niccolo
Posts: 19
Joined: Mon Dec 14, 2015 8:45 am
Contact: Website

Re: Kodi 14.2 Shutdown Functions not available - Raspian

Mon Dec 25, 2017 9:31 am

After a fresh install of 2017-11-29-raspbian-stretch-lite I can confirm the solution.
Install kodi and policykit-1 packages, create the file /etc/polkit-1/localauthority/50-local.d/50-kodi.pkla with the following contents ( :!: beware that there are errors in the same file in previous posts!):

Code: Select all

[Actions for kodi user]
Identity=unix-group:kodi
Action=org.freedesktop.upower.*;org.freedesktop.udisks.*;org.freedesktop.login1*
ResultActive=yes
ResultAny=yes
ResultInactive=no
This was sufficient for me: now I have Kodi running as "kodi" unprivileged user, starting kodi-standalone as a service (created a systemd unit file for this) and I have a full functional exit menu with reboot and poweroff. I don't have the consolekit package installed.

Return to “Troubleshooting”