Linux -  [SOLVED] Ubuntu 12.04 and Eden: poweroff/shutdown does not work
I cannot get poweroff/shutdown/reboot to work. I have googled the net and have tried:
* adding my xbmc user to the sudoer to allow shutdown/halt/reboot without password
* installed polkit and tried various custom configurations for my xbmc user

I have used successfully these two methods with other releases but this time nothing worked.

Some questions for the forum:
(1) some suggestions on how to make shutdown work?
(2) to help me find a solution does anyone know what mechansim does xbmc actually use to do shutdown?

Some more information regarding my installation:
* Ubuntu 12.04 64-bit server (so no window manager)
* ubuntu repository xbmc (installs Eden)

There are no ppa's in my sources - only standard Ubuntu.

xbmc is run as user xbmc with --standalone using xinit

Clicking on the "power button" on bottom left gives me the options (this is with no polkit installed):
* Exit
* Power off System
* Customer shutdown timer
* Reboot

Clicking on "Power off System" always leads to a restart of XBMC.

Here is a fragment of the xbmc.log
Quote:11:58:28 T:139829470410624 DEBUG: ExecuteXBMCAction : Translating XBMC.Powerdown()
11:58:28 T:139829470410624 DEBUG: ExecuteXBMCAction : To XBMC.Powerdown()
11:58:28 T:139829470410624 DEBUG: CAnnouncementManager - Announcement: OnQuit from xbmc
11:58:28 T:139829470410624 DEBUG: GOT ANNOUNCEMENT, type: 4, from xbmc, message OnQuit
11:58:28 T:139829470410624 NOTICE: Storing total System Uptime
11:58:28 T:139829470410624 NOTICE: Saving settings
11:58:28 T:139829470410624 NOTICE: stop all
11:58:28 T:139829470410624 DEBUG: NetworkMessage - Signaling network services to stop
11:58:28 T:139829470410624 NOTICE: ES: Stopping event server
11:58:28 T:139829470410624 DEBUG: CZeroconfAvahi::doRemoveService named: servers.airplay
11:58:28 T:139829470410624 DEBUG: CZeroconfAvahi::doRemoveService named: servers.airtunes
11:58:28 T:139829470410624 DEBUG: NetworkMessage - Waiting for network services to stop
11:58:28 T:139829470410624 NOTICE: stopping zeroconf publishing
11:58:28 T:139829470410624 NOTICE: Webserver: Stopping...
11:58:28 T:139829470410624 NOTICE: WebServer: Stopped the webserver
11:58:28 T:139829470410624 NOTICE: Webserver: Stopped...

Hm... You do realise that you have to configure the shut down-function to actually shut down, and not just quit? At least in a regular install of XBMC. Settings-> System -> Somewhere.
In the end I got it to work by fiddling with the/var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla file.

I needed to modify the recipe given at as follows:

Make sure the following packages are installed:
Quote:sudo apt-get install policykit-1 upower acpi-support

Now run "pkaction" which lists all of the available actions. Verify that the following are present:

Create a file /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla with the following contents:
Quote:[Actions for xbmc user]
A quick way of verifying whether <xbmc-user> is authorised or not is to run the following from a <xbmc-user> user terminal:
Quote:pkcheck --action-id org.freedesktop.upower.suspend --process <xbmc-pid>
pkcheck --action-id org.freedesktop.consolekit.system.stop --process <xbmc-pid>
If they both return with no errors then xbmc is authorised. Until I made the change to custom-actions.pkla these two commands returned "Not authorised".

To find out a bit more of what lies behind the custom-actions.pkla read:
Quote:man pklocalauthority
You do not need to make any changes to sudoer.
Thank U
Can anyone off any advice on this - I'm having the same issue with Fedora 17 I've added 'custom-actions.pkla' with the above described contents but no joy.

Many thanks.
The problem is, that policykit deprecated this config format. I've had the same problem just now as gentoo updated polkit. What you need now are actions.

Here is mine I hope it helps:

polkit.addRule(function(action, subject) {
    if (( ("org.freedesktop.udisks.") == 0) || ("org.freedesktop.upower.")== 0) || ("org.freedesktop.consolekit.")== 0) ) &&
        subject.user=="xbmc") {
        return polkit.Result.YES;

it is placed under
Hi all. I'm running xbmcbuntu on a zbox id80 and I've done the polIcykit, however my htpc, moreoftenthan not will freeze on the xbmc logo on shutdown.

Any suggestions would be greatly appreciated.
Thread Rating:
  • 1 Vote(s) - 5 Average

Logout Mark Read Team Forum Stats Members Help
[SOLVED] Ubuntu 12.04 and Eden: poweroff/shutdown does not work51