• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 8
How to make XBMC shutdown Linux?
#31
darkscout Wrote:You may not have sudo installed.
(as root)
apt-get install sudo.

Sudoers shouldn't be blank by default.

Sorry there's a slight misunderstanding here. My sudoer wasn't blank.

my screen is though when i try to shutdown. All apart from a cursor in the middle.
Reply
#32
I also have this problem with natty minimal install. Installed by the xbmcbuntu instructions so I have xbmc-live installed but from the maverick repo.

In system settings -> power management the only two available options for shutdown is sleep and hibernate.

pkaction:
Code:
org.freedesktop.consolekit.system.restart
org.freedesktop.consolekit.system.restart-multiple-users
org.freedesktop.consolekit.system.stop
org.freedesktop.consolekit.system.stop-multiple-users
org.freedesktop.policykit.exec
org.freedesktop.policykit.lockdown
org.freedesktop.udisks.cancel-job-others
org.freedesktop.udisks.change
org.freedesktop.udisks.change-system-internal
org.freedesktop.udisks.drive-ata-smart-refresh
org.freedesktop.udisks.drive-ata-smart-retrieve-historical-data
org.freedesktop.udisks.drive-ata-smart-selftest
org.freedesktop.udisks.drive-detach
org.freedesktop.udisks.drive-eject
org.freedesktop.udisks.drive-set-spindown
org.freedesktop.udisks.filesystem-check
org.freedesktop.udisks.filesystem-check-system-internal
org.freedesktop.udisks.filesystem-lsof
org.freedesktop.udisks.filesystem-lsof-system-internal
org.freedesktop.udisks.filesystem-mount
org.freedesktop.udisks.filesystem-mount-system-internal
org.freedesktop.udisks.filesystem-unmount-others
org.freedesktop.udisks.inhibit-polling
org.freedesktop.udisks.linux-lvm2
org.freedesktop.udisks.linux-md
org.freedesktop.udisks.luks-lock-others
org.freedesktop.udisks.luks-unlock
org.freedesktop.upower.hibernate
org.freedesktop.upower.qos.cancel-request
org.freedesktop.upower.qos.request-latency
org.freedesktop.upower.qos.request-latency-persistent
org.freedesktop.upower.qos.set-minimum-latency
org.freedesktop.upower.suspend

Seems like xbmc thinks that there is no shutdown or reboot option?

Will try adding halt and reboot to sudoers file for xbmc user.
Reply
#33
Not sure what you are asking or pasting but
org.freedesktop.consolekit.system.stop
is shutdown. Normally the config of xbmc-live will setup the permission, but I have only checked it on Lucid.
Anyway, I think using Maverick package on Natty and then ask for support could be an issue.
Reply
#34
Hi again chaps,

A week later and this problem is still ongoing.

A big part of the issue is that all of the information about it, from the wiki to all the threads both here an elsewhere, is out of date.

Just for some clarity on the issue, both Natty an Maverick exhibit this problem, even with XBMC-Live.

I have googled my ass off and read every thread on this issue but everything is for karmic, Jaunty and Lucid.

Many people have this problem too by the looks. Lucid, which appears to be the last release of Ubuntu officially supported by XBMC only supports old hardware and isn't an option for a lot of us.

I'm sure a solution is out there, should we find it, someone needs to make an effort to update the Wiki - there's a whole new wave of potential XBMC devotees who need help and relevant guides on this.

I'm still working on this and will report anything i find. Vicious, let me know if you make any kind of breakthroughs will you?

Thanks.
Reply
#35
Thumbs Up 
ParkerXL Wrote:Hi again chaps,

A week later and this problem is still ongoing.

A big part of the issue is that all of the information about it, from the wiki to all the threads both here an elsewhere, is out of date.

Just for some clarity on the issue, both Natty an Maverick exhibit this problem, even with XBMC-Live.

I have googled my ass off and read every thread on this issue but everything is for karmic, Jaunty and Lucid.

Many people have this problem too by the looks. Lucid, which appears to be the last release of Ubuntu officially supported by XBMC only supports old hardware and isn't an option for a lot of us.

I'm sure a solution is out there, should we find it, someone needs to make an effort to update the Wiki - there's a whole new wave of potential XBMC devotees who need help and relevant guides on this.

I'm still working on this and will report anything i find. Vicious, let me know if you make any kind of breakthroughs will you?

Thanks.

Hi - just wanted to say thanks for a good post - I'm in that exact situation - new hardware, new ubuntu and an xbmc-install that can't shut down (I can shut down using terminal though)
Reply
#36
johnnyslogan Wrote:Hi - just wanted to say thanks for a good post - I'm in that exact situation - new hardware, new ubuntu and an xbmc-install that can't shut down (I can shut down using terminal though)

You're welcome. Still haven't found a solution yet. I would have slowly been going grey if i hadn't already pulled my hair out.

Remember to drop in with the solution if you find it.
Reply
#37
The 'valid' xbmc-live method is the editing of sudoers.

This is the xbmc-live postinst file.

How are you starting XBMC? This may explain why it just drops to terminal.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#38
darkscout Wrote:The 'valid' xbmc-live method is the editing of sudoers.

This is the xbmc-live postinst file.

How are you starting XBMC? This may explain why it just drops to terminal.

As far as i can tell without knowing anything about Ubuntu startups yet:

The XBMC-Live script edits the grub to set XBMC as the default, like so:

Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xbmc=autostart,noredir loglevel=0"

In my research I have seen others mention a .xinitrc file to edit, but i have no such file on my system in either Natty or Maverick installations.
Reply
#39
Interestingly, under Maverick, the problem still exists but exhibits a different symptom.

Now when i shutdown in Maverick, the screen goes black with the white mouse cursor as before, and then the TV blanks out. For a moment i thought it really had shut down, but a second later, XBMC reappeared - reloaded - without the system rebooting at all.

All options from the shutdown menu, power-off, restart, suspend, they all do this.

Here's the log from when i selected shutdown:

Code:
00:43:25 T:140494902941760 M:3858427904   DEBUG: OnKey: 61453 pressed, action is Select
00:43:25 T:140494902941760 M:3858427904   DEBUG: ExecuteXBMCAction : Translating ActivateWindow(ShutdownMenu)
00:43:25 T:140494902941760 M:3858427904   DEBUG: ExecuteXBMCAction : To ActivateWindow(ShutdownMenu)
00:43:25 T:140494902941760 M:3858427904   DEBUG: Activating window ID: 10111
00:43:25 T:140494902941760 M:3858427904   DEBUG: Checking if window ID 10111 is locked.
00:43:25 T:140494902941760 M:3858427904   DEBUG: ------ Window Init (DialogButtonMenu.xml) ------
00:43:25 T:140494902941760 M:3858427904    INFO: Loading skin file: DialogButtonMenu.xml
00:43:29 T:140494902941760 M:3858440192   DEBUG: SDLKeyboard: scancode: 36, sym: 13, unicode: 13, modifier: 0
00:43:29 T:140494902941760 M:3858440192   DEBUG: OnKey: 61453 pressed, action is Select
00:43:29 T:140494902941760 M:3858440192   DEBUG: ExecuteXBMCAction : Translating XBMC.Shutdown()
00:43:29 T:140494902941760 M:3858440192   DEBUG: ExecuteXBMCAction : To XBMC.Shutdown()
00:43:29 T:140494902941760 M:3858440192   DEBUG: CAnnouncementManager - Announcement: ApplicationStop from xbmc
00:43:29 T:140494452283136 M:3858440192   DEBUG: Thread 140494452283136 terminating (autodelete)
00:43:29 T:140494439671552 M:3858440192   DEBUG: Thread 140494439671552 terminating (autodelete)
00:43:29 T:140494466176768 M:3858440192   DEBUG: Thread 140494466176768 terminating (autodelete)
00:43:29 T:140494902941760 M:3858440192  NOTICE: Storing total System Uptime
00:43:29 T:140494902941760 M:3858440192  NOTICE: Saving settings
00:43:29 T:140494902941760 M:3858567168  NOTICE: stop all
00:43:29 T:140494902941760 M:3858567168   DEBUG: NetworkMessage - Signaling network services to stop
00:43:29 T:140494902941760 M:3858567168  NOTICE: ES: Stopping event server
00:43:29 T:140494902941760 M:3858567168   DEBUG: CZeroconfAvahi::doRemoveService named: servers.jsonrpc
00:43:29 T:140494902941760 M:3858567168   DEBUG: NetworkMessage - Waiting for network services to stop
00:43:29 T:140494902941760 M:3858567168  NOTICE: stopping zeroconf publishing
00:43:30 T:140494487156480 M:3858567168   DEBUG: Thread 140494487156480 terminating
00:43:30 T:140494565283584 M:3858567168  NOTICE: ES: UDP Event server stopped
00:43:30 T:140494565283584 M:3858567168   DEBUG: Thread 140494565283584 terminating
00:43:30 T:140494902941760 M:3858567168  NOTICE: stop dvd detect media
00:43:30 T:140494590334720 M:3858567168   DEBUG: Thread 140494590334720 terminating
00:43:30 T:140494902941760 M:3858567168  NOTICE: stop sap announcement listener
00:43:30 T:140494902941760 M:3858567168  NOTICE: clean cached files!
00:43:30 T:140494902941760 M:3858567168  NOTICE: unload skin
00:43:30 T:140494902941760 M:3858567168    INFO: Unloading old skin ...
00:43:30 T:140494902941760 M:3858567168   DEBUG: CGUIAudioManager::DeInitialize
00:43:30 T:140494902941760 M:3858612224   DEBUG: ------ Window Deinit (Home.xml) ------
00:43:30 T:140494902941760 M:3858612224   DEBUG: ------ Window Deinit (Pointer.xml) ------
00:43:30 T:140494902941760 M:3858612224   DEBUG: ------ Window Deinit (DialogMuteBug.xml) ------
00:43:30 T:140494902941760 M:3858612224   DEBUG: Cleanup - Closed bundle
00:43:30 T:140494902941760 M:3858612224  NOTICE: stop python
00:43:30 T:140494902941760 M:3862040576  NOTICE: stopped
00:43:30 T:140494902941760 M:3862040576  NOTICE: destroy
00:43:30 T:140494902941760 M:3862040576    INFO: ADDON: cpluff: 'An unreleased information object was encountered at address 0x2799450 with reference count 1 when destroying the associated plug-in context. Not releasing the object.'
00:43:30 T:140494902941760 M:3862040576    INFO: ADDON: cpluff: 'An unreleased information object was encountered at address 0x27940d0 with reference count 1 when destroying the associated plug-in context. Not releasing the object.'
00:43:30 T:140494902941760 M:3862040576    INFO: ADDON: cpluff: 'An unreleased information object was encountered at address 0x272e460 with reference count 1 when destroying the associated plug-in context. Not releasing the object.'
00:43:30 T:140494902941760 M:3862040576    INFO: ADDON: cpluff: 'An unreleased information object was encountered at address 0x271b8e0 with reference count 1 when destroying the associated plug-in context. Not releasing the object.'
00:43:30 T:140494902941760 M:3862040576    INFO: ADDON: cpluff: 'An unreleased information object was encountered at address 0x27a8f30 with reference count 1 when destroying the associated plug-in context. Not releasing the object.'
00:43:30 T:140494902941760 M:3862040576  NOTICE: unload sections
00:43:30 T:140494902941760 M:3862040576   DEBUG: SECTION:UnloadAll(DLL: special://xbmcbin/system/libcpluff-x86_64-linux.so)
00:43:30 T:140494902941760 M:3862040576   DEBUG: Unloading: libcpluff-x86_64-linux.so
00:43:30 T:140494902941760 M:3862040576   DEBUG: SECTION:UnloadAll(DLL: special://xbmcbin/system/ImageLib-x86_64-linux.so)
00:43:30 T:140494902941760 M:3862040576   DEBUG: Unloading: ImageLib-x86_64-linux.so
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 0 --> 0 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 1 --> 0 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 2 --> 14 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 3 --> 0 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 4 --> 7 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 5 --> 0 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 6 --> 0 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 7 --> 0 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 8 --> 0 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: object 9 --> 0 instances
00:43:30 T:140494902941760 M:3862040576   DEBUG: CAnnouncementManager - Announcement: Shutdown from xbmc

I really can't see any problems in the log itself.
Reply
#40
I managed to get this to work in Maverick!

The Key was altering the Suedoers file as required and instructed by Darkscout, then simply installing upower.

I will be posting a full guide as soon as i can get it all together and make sure it works completely.

Once ive done that, im going to reinstall Natty and writing up a guide for that as well, hopefully we can get the Wiki updated.

Can anyone edit the Wiki?
Reply
#41
ParkerXL Wrote:As far as i can tell without knowing anything about Ubuntu startups yet:

The XBMC-Live script edits the grub to set XBMC as the default, like so:

Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xbmc=autostart,noredir loglevel=0"

In my research I have seen others mention a .xinitrc file to edit, but i have no such file on my system in either Natty or Maverick installations.

Ignore what it does to grub. That's just for the init scripts. The core gold is making sure that xbmc is added to groups sudo and possibly powerdev.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#42
darkscout Wrote:Ignore what it does to grub. That's just for the init scripts. The core gold is making sure that xbmc is added to groups sudo and possibly powerdev.

Yep, it does that.

I've found that the powerdev group apparently no longer exists in later versions of ubuntu, everything is done by upower now.

The biggest issue ive had, and probably everyone else struggling with this, is that there is so much out of date information still around, from as far back as 2009, that it's very misleading and confusing,

The solution itself was in fact relatively simple, it was just lost in a lot of misinformation, but the info you gave was solid, i just had to find the missing piece.

another red herring was someone had guided me to unstable versions of XBMC, these dont work well with upower, once i went back to official, things worked better.

I still dont know if this solution works for Natty, but Maverick is definitely solved - working on putting everything together now.
Reply
#43
The link that darkscout posted uses uid 1000 and my xbmc user's uid is 1001.
I don't know if that script is the actual one used in my install, I will have to check.
The script adds the xbmc user if it doesn't exist but at one point, as far as I can tell, it sets the variable 'xbmcUser' to the username of uid 1000?
Don't know if that is a problem since I have theese lines in my sudoers file:
Code:
Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/reboot, /sbin/halt # XBMC
Cmnd_Alias MOUNT_CMDS = /bin/mount, /bin/umount # XBMC
xbmc ALL=(ALL) ALL # XBMC
xbmc ALL=NOPASSWD: SHUTDOWN_CMDS, MOUNT_CMDS # XBMC

My /var/lib/polkit-1/localauthority/50-local.d/20-xbmclive.pkla:
Code:
[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*
ResultActive=yes
ResultAny=auth_admin
ResultInactive=yes

ck-list-sessions says that the xbmc X session isn't local:
Code:
unix-user = '1001'
realname = 'XBMC'
seat = 'Seat1'
session-type = ''
active = FALSE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = ''
remote-host-name = ''
is-local = FALSE
on-since = '2011-05-24T19:09:24.142196Z'
login-session-id = ''
Could that be one of the problems? Will also try substituting 'ResultAny=auth_admin' to 'ResultAny=yes' and see if that helps.
Still think that it's strange that xbmc only allows suspend and hibernate as shutdown options.
Reply
#44
Vicious Wrote:The link that darkscout posted uses uid 1000 and my xbmc user's uid is 1001.

That doesn't matter. It's just a script to show what XBMC-Live is doing behind the scenes to make this work.

-

How are you launching XBMC?
su xbmc -c startx?
In Upstart, in Init.d?
Some other method?
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#45
Quote:The core gold

and the edit of polkit-1 permissions was important at least in previous versions.
The version you link to is different from the one I looked at last in the way that it seem to overide *....

Quote:cat > /var/lib/polkit-1/localauthority/50-local.d/20-xbmclive.pkla
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 8

Logout Mark Read Team Forum Stats Members Help
How to make XBMC shutdown Linux?0