You are not logged in.
Migrated my HTPC to systemd last night. So far so good, lirc still works, I found some Fedora xbmc service script that launches XBMC neatly. It looks good.
XBMC runs as my own user. However, whereas before I could suspend/shutdown/reboot just fine (through upower), that now does not work anymore. I have enabled (and started) the upower service:
$ systemctl list-units|grep -i upower
cpupower.service loaded active exited Apply cpupower configuration
upower.service loaded active running Daemon for power managementHowever, even with the upower service enabled all XBMC shows in the shutdown menu is a timer option and hibernate/suspend. The two last options definitely don't work. I have hit that button enough to know. Before, there were also restart/shutdown options visible. Those are gone. So all that's left is pushing the button on my HTPC to make it shut down.
XBMC service file:
[Unit]
Description = Starts instance of XBMC using xinit
After = syslog.target
[Service]
User = $user
Group = users
Type = simple
ExecStart = /usr/bin/xinit /usr/bin/xbmc-standalone -- :0
[Install]
WantedBy = multi-user.targetAny pointers?
Edit: NFS problem solved by enabling rpc-idmapd.service.
Last edited by .:B:. (2012-08-27 15:10:43)
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Arch is still using the outdated upower 0.17 package. The latest version is 0.18 and it adds proper support for systemd:
New Features:
- Use systemd if possible for suspend and hibernate (Matthias Clasen)
I have it installed and those work on XBMC just fine.
Offline
Thanks, I'll give that a shot.
Edit: no dice with 0.9.18. Do you use a service file for XBMC? If not, how do you launch it?
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I found some Fedora xbmc service script that launches XBMC neatly.
I guess that is your problem. There will be no proper user session created for your user if you launch XBMC from a service file (see also https://wiki.archlinux.org/index.php/Sy … rvice_file ).
For now, you have to use ck-launch-session from .xinitrc (or a display manager that supports CK). When polkit 107 hits the repos, you can (finally) get rid of consolekit.
Offline
Okay, thanks.
Edit: built and installed polkit 107. The options are back in the menu, and shutdown and reboot work. Will have to look into suspend/hibernate.
Last edited by .:B:. (2012-08-27 17:43:12)
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I was too quick: shutdown will just kill XBMC, nothing more. I tried using ck-launch-session in the service file, but to no avail. Guess it's back to the old .xinitrc way for now...
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I've not tried these, but you can try the XBMC files from Auke Kok.
Offline
Thanks Elfo, I'll have a look at those. Further inspection showed that the polkit service was actually failing. I just bumped the release from 105 and 107, built from ABS and installed 107. Turns out polkit needs its own user now (polkitd) and needs access to the root:root owned rules dirs as well. Fixed that one, but not getting any further.
Edit: there's a user-session-units package in the AUR (with deps) so I built and installed those. It works (XBMC autolaunches), and it seems like it's communicating with D-Bus, but no luck there (no suspend, no shutdown etc. and shutdown/reboot buttons are still gone):
23:12:09 T:140643986409344 DEBUG: DBus: Creating message to org.freedesktop.ConsoleKit on /org/freedesktop/ConsoleKit/Manager with interface org.freedesktop.ConsoleKit.Manager and method CanStop
23:12:09 T:140643986409344 DEBUG: DBus: Creating message to org.freedesktop.UPower on /org/freedesktop/UPower with interface org.freedesktop.UPower and method EnumerateDevices
23:12:10 T:140643986409344 INFO: Selected UPower and ConsoleKit as PowerSyscall
23:12:10 T:140643986409344 DEBUG: DBus: Creating message to org.freedesktop.ConsoleKit on /org/freedesktop/ConsoleKit/Manager with interface org.freedesktop.ConsoleKit.Manager and method CanStop
23:12:10 T:140643986409344 DEBUG: DBus: Creating message to org.freedesktop.ConsoleKit on /org/freedesktop/ConsoleKit/Manager with interface org.freedesktop.ConsoleKit.Manager and method CanRestart
23:12:10 T:140643986409344 DEBUG: DBus: Creating message to org.freedesktop.UPower on /org/freedesktop/UPower with interface org.freedesktop.DBus.Properties and method Get
23:12:10 T:140643986409344 DEBUG: Previous line repeats 1 times.
23:12:10 T:140643986409344 DEBUG: DBus: Creating message to org.freedesktop.UPower on /org/freedesktop/UPower with interface org.freedesktop.UPower and method EnumerateDevicesEdit: now it's not even starting anymore at boot, apparently it's waiting for some stuff to finish and bails out. God what an ordeal this is.
Last edited by .:B:. (2012-08-28 21:44:41)
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Hey,
probably someone find it useful:
xbmc.service
[Unit]
Description=xbmc
Requires=openbox.service
Wants=lircd.service tvheadend.service
After=openbox.service lircd.service tvheadend.service
[Service]
User=paul
Environment=DISPLAY=:0.0
#ExecStartPre=/usr/bin/amixer set Master 100
#ExecStartPre=/usr/bin/xrandr -s 1920x1080
ExecStart=/usr/bin/xbmc -fs --standalone
#Restart=always
[Install]
WantedBy=multi-user.targetopenbox.service
[Unit]
Description=openbox
[Service]
User=paul
ExecStart=/usr/bin/xinit /usr/bin/openbox-session
[Install]
WantedBy=multi-user.targettvheadend.service
[Unit]
Description=tvheadend
After=network.target
[Service]
EnvironmentFile=/etc/conf.d/tvheadend
PIDFile=/run/tvheadend.pid
ExecStart=/usr/bin/tvheadend $TVHEADEND_ARGS
[Install]
WantedBy=multi-user.target- Commented lines are only for my special purpose
- Variable User has to be replaced
- File lircd.service can be found in the wiki
Offline
I use following way:
- /etc/systemd/system/autologin.service
[Unit]
Description=Direct login to X
Documentation=man:mingetty(8)
After=systemd-user-sessions.service
Before=getty.target
[Service]
Restart=always
ExecStart=/sbin/mingetty --autologin xbmc tty7 linux
RestartSec=0
[Install]
WantedBy=graphical.target- ~/.bash_profile
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
export BROWSER=chromium
export DE=xbmc
export SDL_VIDEO_FULLSCREEN_HEAD=0
export XDG_CACHE_HOME=/dev/shm/$USER/.cache
[[ ! -f $XDG_CACHE_HOME ]] && mkdir -p -m 0700 $XDG_CACHE_HOME
[[ $(tty) = "/dev/tty7" ]] && exec xinit ~/.xinitrc -- /usr/bin/X -nolisten tcp vt08 &>/dev/null$ groups
disk network video audio optical storage power usersAlso you can use slim with autologin.
Last edited by unikum (2012-09-17 12:55:35)
Offline
Did anyone successfully used automount with xbmc and systemd? Using "ck-launch-session xbmc" in .xinitrc won't work (after adding user to storage group and using autologin like this https://wiki.archlinux.org/index.php/Sy … vice_file)
Offline
Did anyone successfully used automount with xbmc and systemd? Using "ck-launch-session xbmc" in .xinitrc won't work (after adding user to storage group and using autologin like this https://wiki.archlinux.org/index.php/Sy … vice_file)
1. This thread is about shutting down Arch via upower. Please do not hijack threads.
2. Don't use consolekit, use udisk.
Offline
I know the thread is already dead, but I fixed this like described here, maybe helps someone out:
https://wiki.archlinux.org/index.php/XB … nd_suspend
Offline