Upstart script and ATVClient
#1
I set up an XBMC13.1/Trusty32bit on older Acer Revo Nvidia ION based system. As it was for a friend who was missing her Apple TV that passed on, I set up ATVClient with an Apple IR sensor from a MacBook pro and Apple Remote. For the most part when the Acer is hidden behind the TV she does not know the difference other than it is faster than the old Apple TV1

I did as indicated here http://teknogeekz.com/blog/?p=422 for the apple remote sensor

All worked perfectly until I added the generic upstart script like found in the first post here
http://forum.xbmc.org/showthread.php?tid=174854

Now after adding the upstart script ATV client works for the first 30 seconds when XBMC launches then after about 30 seconds, I can no longer control xbmc with Apple Remote

If I remove the upstart script all is fine, however I especially want xbmc to relaunch if it crashes.

Any idea what may be causing ATVClient to crap out after 30 seconds?

I am particularly curious as I have tested ATVClient on Raspberry Pi and had similar issues with both xbian and raspbmc. I can now suspect that it is an upstart script
Reply
#2
I'm using atvclient with tekno's init.d script without any problems. Maybe try that to determine whether it is you upstart script.
Perhaps you could post your upstart script if you think it is a problem.

edit

Oh.. it is you tekno.. sorry didn't read properly.. post your upstart and I'll try it out.

I'm using this upstart and it seems to be working fine on my macbook pro:

Quote:# xbmc standalone service

# starts XBMC on startup by using xinit.
# will try to auto respawn for 5 mins if it crashes
# launches xbmc in the "standalone mode" with no xcursor (cursor in xbmc still works)
# by default runs as xbmc, to change edit below.
env USER=xbmc

description "XBMC standalone service"
author "Matt Filetto"

start on (started dbus and started mountall and net-device-up IFACE!=lo)
stop on runlevel [016]

# tell upstart to respawn the process if abnormal exit
respawn
respawn limit 10 5

# nice level
limit nice 21 21

script
exec su -c "xinit /usr/bin/xbmc --standalone -- -bs -nocursor :0" $USER
end script
Reply
#3
I linked to the upstart script but here it is


Code:
description     "XBMC-barebones-upstart-script"
author          "Matt Filetto"

# if you use mysql you need to wait for your network device
# that means you should add 'and net-device-up IFACE!=lo' behind the udevtrigger

start on (filesystem and stopped udevtrigger)
stop on runlevel [016]

# tell upstart to respawn the process if abnormal exit
respawn
respawn limit 10 5
limit nice 21 21

script
exec su -c "xinit /usr/bin/xbmc --standalone -- /usr/bin/X -bs -nolisten tcp :0" $USER
# the following two are to get an idea, if you want to user a window manager
#   exec su -c "xinit /usr/bin/fluxbox :0" $USER
end script


If I remove the above upstart script all is good
Reply
#4
Hey tekno.. there is very little difference between the two scripts above. Yours works fine on my macbook pro running ubuntu 14.04.
Perhaps when you load X it is unbinding the atvclient from the device and using a different module in preference? Take a look in you X log?
You might also try lsusb to find the usb bus and device your IR receiver are is on, and look for a bound driver in /sys/bus/usb/devices/ or /sys/bus/usb/drivers/

I know on my laptop I had some trouble with the IR device being bound to the usbhid driver as a keyboard , which completely stuffed lirc and gave me dodgy keypress events for IR buttons.
Reply

Logout Mark Read Team Forum Stats Members Help
Upstart script and ATVClient0