Kodi Community Forum
Only "Suspend/Hibernate" no "shutdown" - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Only "Suspend/Hibernate" no "shutdown" (/showthread.php?tid=75565)



Only "Suspend/Hibernate" no "shutdown" - neil.j1983 - 2010-06-13

Hi,

I have an asrock ion 330, working pretty much great. The problem I have is that in the power management of xbmc i can only select hibernate and suspend.

I can use the power button on the front of the box to shutdown, but I'd quite like to be able to do it from the couch (lazy i know!)

here is how I set up the box so far:

1. Install a 'command line install' from the karmic alternate install cd. only 1 user 'xbmc' but password is not 'xbmc'

2. apt-get update and then upgrade and then dist-upgrade

3. add repositories for nvidia, svn xbmc, and kitlaan's ppa (for bluez)

from memory i installed

xbmc (last svn just before the merge, sorry, I will find out the svn revision later today)
xbmc-live
xinit
x11-xserver-utils
python-software-properties
pkg-config
python-dbus
bluez (for my ps3 remote)
acpid (had to to get the power button to work)
nvidia-glx-256
nvidia-settings
libvdpau1
ssh
samba

I also install alsa 1.0.23 via the alsa upgrade script.

I tried

Code:
sudo apt-get install hal

sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.suspend
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.hibernate
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot-multiple-sessions
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions

which I think is for 9.04

So I tried everything in this thread:

http://forum.xbmc.org/showthread.php?tid=68495&highlight=hibernate

the

Code:
sudo apt-get install pm-utils policykit-1 devicekit-power

sudo nano /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla

[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.devicekit.power.*;org.freedesktop.consolekit.system.*
ResultActive=yes
ResultAny=auth_admin
ResultInactive=yes

made suspend/hibernate work. I just don't know how to get more of the options available

any help appreciated.

also for a debug log, would you want a bootup/attempt to scroll through the options? as it doesnt show as a glitch or error or crash I'm not sure what to get.



###################SOLVED!##############################


edit - if anyone finds this, I did solve it by doing the following:

sudo apt-get install hal policykit-1 devicekit-power acpid acpi-support pm-utils policykit

then:

sudo nano /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla

[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.devicekit.power.*;org.freedesktop.consolekit.system.*
ResultActive=yes
ResultAny=auth_admin
ResultInactive=yes

then:

sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.suspend
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.hibernate
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot-multiple-sessions
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions

no idea why it didnt and now it does. :S (this install i did it all before installing xbmc and xbmc-live, the only difference in terms of installed packages is the bold one)


- keybaud - 2010-06-14

Thanks for the post. XBMC used to shutdown correctly on my Revo, but it stopped recently and, as a complete novice, I've not been able to solve the problem until I came across this thread. Now it's fix, so all I have left to do is get the Power button on the remote to work, oh, and buy a new TV to plug it into....


- neil.j1983 - 2010-06-14

i can't really take any credit, as I didn't come up with any solutions

The only thing different compared to the other info i could find was the acpi-support.

but glad it could help.


- MacUsers - 2010-06-14

neil.j1983 Wrote:
Code:
sudo apt-get install pm-utils policykit-1 devicekit-power
Just a thing to remember here: devicekit-power has been obsoleted in Ubuntu v10.4; install "upower" instead. Run "pkaction" to check if you have these two:
Code:
root@htpc:~# pkaction | egrep 'stop|suspend'
org.freedesktop.consolekit.system.stop
org.freedesktop.upower.suspend
and then setting these options should do the job for you.
Code:
polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot
polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown
polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.suspend
polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions
Hope this helps. cheers!!


- neil.j1983 - 2010-06-14

thanks, I'm on 9.10 atm, but will undoubtedly upgrade when the next stable is upon us.


- MacUsers - 2010-06-14

neil.j1983 Wrote:thanks, I'm on 9.10 atm, but will undoubtedly upgrade when the next stable is upon us.
Oops!! sorry Neil, I yet to catch up with the code names. I mixed up "karmic" with "lucid". Sorry about that. Cheers!!


- cejstrup - 2010-06-15

Great, this solved my problem after upgrading just now Smile

However there is a small error in the config file.

There shouldn't be a whitespace in the last section of this line :

Action=org.freedesktop.devicekit.power.*;org.freed esktop.consolekit.system.*

It should be :

org.freedesktop.consolekit.system.*


- neil.j1983 - 2010-06-15

don't know why the second had the gap and the first didn't. As I was aware of the gap, I should've checked! thanks anyway


- sdsnyr94 - 2010-06-15

Thanks Neil, I gave up on using suspend/resume until the next release... then read your post. This worked great.


- lonerook - 2011-01-19

Thank you very much, Neil, this helped me so much!