Only "Suspend/Hibernate" no "shutdown"

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
neil.j1983 Offline
Donor
Posts: 589
Joined: Jun 2009
Reputation: 28
Post: #1
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...=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. Confused (this install i did it all before installing xbmc and xbmc-live, the only difference in terms of installed packages is the bold one)
(This post was last modified: 2010-06-15 09:53 by neil.j1983.)
find quote
keybaud Offline
Junior Member
Posts: 7
Joined: May 2010
Reputation: 0
Post: #2
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....
find quote
neil.j1983 Offline
Donor
Posts: 589
Joined: Jun 2009
Reputation: 28
Post: #3
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.
find quote
MacUsers Offline
Fan
Posts: 407
Joined: Jun 2009
Reputation: 0
Location: London, UK
Post: #4
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!!

MONEUAL 320B | ASUS P5Q-VM | Core2Duo E6320 | GeForce GT220 | Kingston KVR 800Mz HyperX DDR2 4GB (2 x 2GB) | UJ-120 BD-ROM | Pioneer VSX-920-K | KEF KHT3005SE-W | Panasonic TH-37PV500B | Ubuntu 10.04 | XBMCbuntu [ v10.0, r35648 ]
find quote
neil.j1983 Offline
Donor
Posts: 589
Joined: Jun 2009
Reputation: 28
Post: #5
thanks, I'm on 9.10 atm, but will undoubtedly upgrade when the next stable is upon us.
find quote
MacUsers Offline
Fan
Posts: 407
Joined: Jun 2009
Reputation: 0
Location: London, UK
Post: #6
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!!

MONEUAL 320B | ASUS P5Q-VM | Core2Duo E6320 | GeForce GT220 | Kingston KVR 800Mz HyperX DDR2 4GB (2 x 2GB) | UJ-120 BD-ROM | Pioneer VSX-920-K | KEF KHT3005SE-W | Panasonic TH-37PV500B | Ubuntu 10.04 | XBMCbuntu [ v10.0, r35648 ]
find quote
cejstrup Offline
Senior Member
Posts: 168
Joined: Mar 2008
Reputation: 0
Post: #7
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.*
(This post was last modified: 2010-06-15 00:28 by cejstrup.)
find quote
neil.j1983 Offline
Donor
Posts: 589
Joined: Jun 2009
Reputation: 28
Post: #8
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
find quote
sdsnyr94 Offline
Fan
Posts: 476
Joined: Aug 2009
Reputation: 2
Location: Greensboro, NC
Post: #9
Thanks Neil, I gave up on using suspend/resume until the next release... then read your post. This worked great.
find quote
lonerook Offline
Junior Member
Posts: 1
Joined: Jan 2011
Reputation: 0
Post: #10
Thank you very much, Neil, this helped me so much!
find quote