Solved Shutdown does not work when Kodi autoboots with the Pi
#1
Hey guys!
I am working on getting a Raspberry Pi 3 with the Official 7" Display to work with Kodi 17.1 installed on Raspbian Jessie Light to put it in my current car project.
I decided to use a custom build instead of using something like OSMC because all of those versions were not able to shutdown the Display when shutting down the Pi (The Display always started showing white and black lines).
Now Jessie Light is installed and Kodi 17.1 itself is working just fine, but when I put Kodi in the autoboot, the shutdown button of the Estouchy skin is not shutting down the system as it is supposed to, but only stops Kodi. The option to set the button to shutdown under "Options>Power saving>Shutdown function" is even missing and only "Quit" and "Minimize" is available. If I start Kodi manually after the Pi boots up, The option "Shutdown" is there and is working correctly.
I put Kodi into autoboot by adding these lines into "rc.local" (also tried longer sleep times):
Code:
sleep 2
su pi -c 'kodi & '
I would really appreciate any help being it a different idea to put Kodi into autoboot, fixing the skin settings or maybe even telling me how install-ready versions like OSMC can turn the display off when shutting down the system!

Zurafta
Reply
#2
I suspect a permissions issue.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
Pretty sure OSMC will now turn the display off properly
If it doesn't, start a forum post on our forum and we will look in to it

Sam
Reply
#4
Since you are using Raspbian Lite, it might be a permissions issue indeed. Check the permissions part in this topic:
https://www.raspberrypi.org/forums/viewt...6&t=109088

PS: This isn't needed for Raspbian full version.
Reply
#5
(2017-04-30, 09:03)Sam.Nazarko Wrote: Pretty sure OSMC will now turn the display off properly
If it doesn't, start a forum post on our forum and we will look in to it

Sam

I tried multiple different versions of OSMC without success. Here is the link to my old post on the OSMC forum, but sadly nobody answered me: https://discourse.osmc.tv/t/raspberry-pi...down/35813

(2017-04-30, 11:40)rascas Wrote: Since you are using Raspbian Lite, it might be a permissions issue indeed. Check the permissions part in this topic:
https://www.raspberrypi.org/forums/viewt...6&t=109088

PS: This isn't needed for Raspbian full version.

Thanks! I'll have a look into that and post again if it worked!

Zurafta
Reply
#6
It's probably fixed in 4.9, which will land soon.
Reply
#7
(2017-04-30, 11:40)rascas Wrote: Since you are using Raspbian Lite, it might be a permissions issue indeed. Check the permissions part in this topic:
https://www.raspberrypi.org/forums/viewt...6&t=109088

PS: This isn't needed for Raspbian full version.
I executed the steps, without any success. I now tried using the full Raspbian image, but still Kodi does not shutdown the Pi when it is automatically starting. Tried adding it via rc.local and also using a systemd script, both with the same result.

(2017-04-30, 12:35)Sam.Nazarko Wrote: It's probably fixed in 4.9, which will land soon.

That's good to know. I guess 4.9 is the April/May release then? Or how do I know, which version will be 4.9?

Zurafta
Reply
#8
(2017-05-01, 00:35)Zurafta Wrote: I executed the steps, without any success. I now tried using the full Raspbian image, but still Kodi does not shutdown the Pi when it is automatically starting. Tried adding it via rc.local and also using a systemd script, both with the same result.

That's strange, it works fine here. Does it work in Estuary skin ? Do you have policykit-1 installed ? Also, what's in your systemd script ? Here is a working one:
https://www.raspberrypi.org/forums/viewt...5#p1121156
Reply
#9
(2017-05-01, 01:48)rascas Wrote: That's strange, it works fine here. Does it work in Estuary skin ? Do you have policykit-1 installed ? Also, what's in your systemd script ? Here is a working one:
https://www.raspberrypi.org/forums/viewt...5#p1121156

Policykit-1 is installed on the full Raspbian version and was also installed on the light version setup I tried before. I use exactly the systemd script you posted in that link. If I try it with Estuary, the only option available is "Exit", just like with the Power Saving options.

Zurafta
Reply
#10
Try this then:
https://www.raspberrypi.org/forums/viewt...9#p1095073

Be warned that every user in the plugdev group will be able to reboot and shutdown.
Reply
#11
(2017-05-01, 15:31)rascas Wrote: Try this then:
https://www.raspberrypi.org/forums/viewt...9#p1095073

Be warned that every user in the plugdev group will be able to reboot and shutdown.

Do I have to put this in the systemd script or what do I have to do with that?

Zurafta
Reply
#12
Create the file /etc/polkit-1/localauthority/50-local.d/power.pkla as root with the following content:

Code:
[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

Reboot when done.
Reply
#13
(2017-05-01, 16:32)rascas Wrote: Create the file /etc/polkit-1/localauthority/50-local.d/power.pkla as root with the following content:

Code:
[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

Reboot when done.

That's it, the shutdown button does now work properly. Thanks! Big Grin
The only other thing I noticed meanwhile is that you can see the console/the raspbian desktop in the background when Kodi dims the screen or when a video play back that would normally show black borders.

Zurafta
Reply
#14
Do you have plymouth (the initial splashscreen) enabled ? Since you are using systemd to start Kodi, you might need to disable it, to avoid that.
If it solves the problem, there are another ways to solve it, I don't use plymouth myself, we have to see what we can do in Raspbian packages.
Reply
#15
(2017-05-01, 21:29)rascas Wrote: Do you have plymouth (the initial splashscreen) enabled ? Since you are using systemd to start Kodi, you might need to disable it, to avoid that.
If it solves the problem, there are another ways to solve it, I don't use plymouth myself, we have to see what we can do in Raspbian packages.

The standard splash screen is disabled in raspi-config, however I am using a custom splashscreen using fbi.

Zurafta
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Shutdown does not work when Kodi autoboots with the Pi00