Xbmc-live script not working anymore on minmal install?
#16
compudaze Wrote:I justed used my karmic mini cd in recovery mode to fix it so I wouldn't have to reinstall.

Sigh, now i feel pretty embarrased and stupid, never even thought of using the CD to boot into recovery mode, i just spent 4 hours of swearing at GRUB2 that didn't show boot menu when i held SHIFT (as it should according to the GRUB2-documentation) and then gave up :/ *hangs head*

On to yet another try i guess.
Reply
#17
xbmc-live.conf now looks for the "autostart" xbmc parameter. Without it xbmc-live.conf just exists. In other words to make XBMC auto-start you need to alter boot command line. Change the usual xbmc=noredir,nodiskmount to xbmc=noredir,nodiskmount,autostart and it'll be fine.

PS: just a reminder, for grub2 this is done in /etc/default/grub by setting/changing a value for GRUB_CMDLINE_LINUX_DEFAULT. Do not forget to "update-grub" after that.
Reply
#18
quietboil Wrote:xbmc-live.conf now looks for the "autostart" xbmc parameter. Without it xbmc-live.conf just exists. In other words to make XBMC auto-start you need to alter boot command line. Change the usual xbmc=noredir,nodiskmount to xbmc=noredir,nodiskmount,autostart and it'll be fine.

PS: just a reminder, for grub2 this is done in /etc/default/grub by setting/changing a value for GRUB_CMDLINE_LINUX_DEFAULT. Do not forget to "update-grub" after that.

Thanks. Worked like a charm.
Reply
#19
quietboil Wrote:xbmc-live.conf now looks for the "autostart" xbmc parameter. Without it xbmc-live.conf just exists. In other words to make XBMC auto-start you need to alter boot command line. Change the usual xbmc=noredir,nodiskmount to xbmc=noredir,nodiskmount,autostart and it'll be fine.

PS: just a reminder, for grub2 this is done in /etc/default/grub by setting/changing a value for GRUB_CMDLINE_LINUX_DEFAULT. Do not forget to "update-grub" after that.

That worked. Thanks!
Reply
#20
iamdb Wrote:That worked. Thanks!

Hey guys !

If you don't want to mess with boot parameters and you just want to use the script for your custom minimal install, i modified the script to just do the things without any boot parameters. This calls dismounter and setalsavolumes. Also i specificly added USB0 as the place for the remote to work for resume. You might have to change this number according to your remote setup. so here is my /etc/init/xmc.conf

Code:
# xbmc-minimal
#
# init XBMC environment and starts XBMC in fullscreen (if asked to do so)

description     "XBMC-minimal"
author          "Luigi Capriotti - Modified by alanwww1"

start on (filesystem and started hal)
stop on runlevel [06]

pre-start script
    if [ -f /home/xbmc/.xsession ] ; then
        rm /home/xbmc/.xsession
    fi
    if [ -f /tmp/noRestartXBMC ] ; then
        rm /tmp/noRestartXBMC
    fi
end script

script
    exec /usr/bin/runXBMC
end script

post-start script
        /usr/bin/setAlsaVolumes
        /usr/bin/diskmounter
        echo USB0 > /proc/acpi/wakeup
        echo -1 >/sys/module/usbcore/parameters/autosuspend
end script

pre-stop script
    touch /tmp/noRestartXBMC
end script

After that i made

Code:
sudo ln -s /lib/init/upstart-job /etc/init.d/xbmc

Of course you have to have Luigi's runXBMC, setAlsaVolumes, diskmounter scripts in the propper places. And ALL have to be set as executables.

This works really great.

Thanks Luigi for his great work. I never have figured out this startup thing on Karmic without his help.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#21
@alanwww1: pls check if the SVN version of xbmc-live.conf works for you regarding USB remote wakeup; I have included an automatic check&set if wakeOnUSBRemote is added to the xbmc parameters
Reply
#22
quietboil Wrote:xbmc-live.conf now looks for the "autostart" xbmc parameter. Without it xbmc-live.conf just exists. In other words to make XBMC auto-start you need to alter boot command line. Change the usual xbmc=noredir,nodiskmount to xbmc=noredir,nodiskmount,autostart and it'll be fine.

PS: just a reminder, for grub2 this is done in /etc/default/grub by setting/changing a value for GRUB_CMDLINE_LINUX_DEFAULT. Do not forget to "update-grub" after that.



Thanks, that was exactly what i was looking for! (well, the place for it, the autostart setting was new to me Tongue )

Working like a charm now.
Reply
#23
l.capriotti Wrote:@alanwww1: pls check if the SVN version of xbmc-live.conf works for you regarding USB remote wakeup; I have included an automatic check&set if wakeOnUSBRemote is added to the xbmc parameters

@luigi

I made a couple of test with the script. There are a few problems, with the wakeup part.

- I think we should clear the /tmp/xbmcliveParams file before adding the current parameters to it with echo. I found that sometimes with no proper quit or shutdown, this file starts to contain the kernel parameters multiple times. This way somehow the grep command is not working properly. At least for me.

- Starting up the system the first time, somehow echo part for USBx to /proc/acpi/wakeup part of the script does not run at all. Strangely if i ssh to the machine and sudo stop xbmc-live than sudo start xbmc-live than all ok. I made a lot of debug marks in the code and found out that somehow the script is not returning from the function "findUSBPort". I think that there is a process in boot time which is not finished in a time we call this function.

- I have a special configuration as i have imon vfd as my lcd display (which also has remote receiver capability) and MCE remote which i use for regular remote. In this case the script does not work ok, because it sets wakeup in /proc/acpi/wakeup for my imon (USB1) and not for my MCE remote (USB0). It is just a note. I think very few people are using two remote receivers.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#24
sry for this little OT
@alan i have the imon lcd (antec oem), mine is able to receive mce remote (attached docs say that Tongue). I've just bought mine mce remote (shipping atm) if u wonna i'll post the lirc config file when the remote arrive. So u don't need anymore 2 receivers.
Reply
#25
This same issue happened to me when i updated grub via apt-get. Thanks for the info.
Reply
#26
shassino Wrote:sry for this little OT
@alan i have the imon lcd (antec oem), mine is able to receive mce remote (attached docs say that Tongue). I've just bought mine mce remote (shipping atm) if u wonna i'll post the lirc config file when the remote arrive. So u don't need anymore 2 receivers.

Thx, but i have a pretty old, old one i tried several times, with irrecord and other stiff, but it was never working reliably.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#27
@luigi

I realized two very important things about the post-start part of your upstart script in the suspend part.

echoing /proc/acpi/wakeup file with USBx just TRIGGERS the specific port not SETS. I mean if you echo the USBx to an already enabled port than it DISABLES it. So there should be put an if part to the script which checks if it is already enabled or not. If we don't do this than when someone stops xbmc from ssh nad restarts it for some reason than suspend will not work. This works:
Code:
usbStatus=`cat /proc/acpi/wakeup | grep $usbport | awk {'print $3}'`
        if [ "$usbStatus" = "disabled" ]; then
        echo $usbPort > /proc/acpi/wakeup
        echo -1 >/sys/module/usbcore/parameters/autosuspend
        fi

The other thing i relized than if i put a sleep 2 line before this part
Code:
usbPort=$(findUSBPort "${lircDriver}")
Than all works fine, USB port number is well detected. sleep 1 or sleep 0 does not work. So i think we run this function BEFORE some important system process finished this is why the function can not detect the USB port number.

Cheers,

Alan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#28
Also i found that adding a condition to wait until job "udevtrigger" stopped this way,

Code:
start on (filesystem and started hal
    and stopped udevtrigger)

solves problems with too early usb port detection. So this case we don't need the ugly sleep line !

Also we can clear stopping usplash from the script if we modify /etc/init/usplash.conf this way:

Code:
stop on (starting-dm
         or stopped rc RUNLEVEL=[2345]
         or starting rcS
         or starting mountall-shell
         or starting xbmc)

Also we can fade out the boot splash elegantly putting this command in any of the boot scripts:

Code:
usplash_write FADEOUT

I am trying to figure out a way that after finishing usplash the screen does not go back to terminal for a sec than startx X. It would be good if there won't be a blinking cursor for a sec or two.

I tried delaying the stop of usplash process, this case it was booting beautifuly without any flash or blinking cursor, but this way if i turn back to any terminal with ctrl+alt+F1-F8 i just get a nice colorful garbage.

Anyone has any idea ?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#29
Did anyone get the xbmc-live service working on karmic? I got it to autostart via grub but when xbmc crashes it goes to the password prompt instead of restarting xbmc. Does anyone know how to fix this?

Thanks,

Dennis
XBMScript - Easy installation for Ubuntu Jaunty Jackalope (9.04)
Installing XBMC on Ubuntu can't get easier than this!
Before posting error/feature questions regarding XBMScript, read THIS
Run as root. Don't be a pussy
Reply
#30
flxfxp Wrote:Did anyone get the xbmc-live service working on karmic? I got it to autostart via grub but when xbmc crashes it goes to the password prompt instead of restarting xbmc. Does anyone know how to fix this?

Thanks,

Dennis

I'm wondering this too, have built myself an almost perfect minimal install, but as soon as XBMC crashes on karmic it just ditches me to the login screen and nothing else happens.

If anyone could help getting this working I'd be very greatful.

Followed the XBMCbuntu guide to the letter, so I'm thinking that it is not me who has done something wrong ?
Reply

Logout Mark Read Team Forum Stats Members Help
Xbmc-live script not working anymore on minmal install?0