Start/Kill XBMC with the remote control doesnt work
#1
hey i followed the Start/Kill XBMC with the remote control and it doesnt really work.

I cant start XBMC once, and kill it. But then i cant start it again.
If i start it again manually, i cant kill it.
If i kill XBMC manually, i cant start it.

So i guess the script only works once? Smile

I use a Windows MCE remote on Karmic.
Reply
#2
anyone? Sad
Reply
#3
What motherboard are you using?
Don't be scared to ask questions. Odds are someone else is wondering the same thing.
Closet - Norco 4020 - Supermicro X8SAX - Intel i7-920 - Corsair HX1000 - Corsair XMS3 12GB - 10x1.5tb Raid 5 - 10x2tb Raid 5 - Openfiler VM inside Workstation Win7 x64
Living room - Silverstone ML02B-MXR - Gigabyte GA-E7AUM-DS2H - E8400 - OCZ Platinum Edition 4GB - Denon 3310CI
Bedroom - Antec Mini Skeleton - Zotac IONITX-B-E @ 1.92ghz - AVS Gear HA-IR01SV - A-DATA G series 4GB - Denon 2808CI
Reply
#4
Sorry for late reply but im been away for a long time...
Im using some Asus m-itx with Microsoft external USB IR reciver...
the remote does always work inside XBMC, just that the only work to start Once.

Since ive upgrade to karmic, the Kill function never works...
Reply
#5
I had almost same probs with MCE Remote v2 and its RC6 Reciever.

Solution: i used another USB Plugin right under the network plugin on my board and did the following: http://wiki.xbmc.org/?title=Enable_Wake-On-Device
But i didnt changed the rc.local file.

so now USB0 and USB2 are enabled and i can use the power button on my remote to wake up the box. before it works there was only USB0 enabled and that didnt work.
Reply
#6
heavydz Wrote:I had almost same probs with MCE Remote v2 and its RC6 Reciever.

Solution: i used another USB Plugin right under the network plugin on my board and did the following: http://wiki.xbmc.org/?title=Enable_Wake-On-Device
But i didnt changed the rc.local file.

so now USB0 and USB2 are enabled and i can use the power button on my remote to wake up the box. before it works there was only USB0 enabled and that didnt work.

Thanks for the info but the problem is to start / kill XBMC and not the computer Smile
thanks anyway...
Reply
#7
I'm having a very similar experience using an Asrock K10N78M. I launch XBMC from the mythtv frontend and have a script to kill xbmc linked to a button on my remote using irexec.

Upon first boot and subsequent launch of xbmc, pressing the TV/VIDEO button on my remote kills xbmc and starts mythwelcome. If I start up the frontend again and launch xbmc, pressing the TV/VIDEO button does nothing. A reboot seems to be the only thing fixing this.

kill script:
Code:
#!/bin/bash

XBMC=/usr/share/xbmc/xbmc.bin

if pidof -s $XBMC
then
  killall $XBMC
#  sleep 5
#  /usr/bin/shutdownvdr
else
  xinit /usr/bin/xbmc -fs --standalone &
fi
killall pidof mythwelcome mythfrontend.real
/usr/bin/mythwelcome
exit

This is just one problem plaguing my new system after upgrading. I also can't get video back after resuming from S3 and can't get xmacro to work so I can savestate and exit emulators using my remote.
Reply
#8
Lepy Wrote:I'm having a very similar experience using an Asrock K10N78M. I launch XBMC from the mythtv frontend and have a script to kill xbmc linked to a button on my remote using irexec.

Upon first boot and subsequent launch of xbmc, pressing the TV/VIDEO button on my remote kills xbmc and starts mythwelcome. If I start up the frontend again and launch xbmc, pressing the TV/VIDEO button does nothing. A reboot seems to be the only thing fixing this.

kill script:
Code:
#!/bin/bash

XBMC=/usr/share/xbmc/xbmc.bin

if pidof -s $XBMC
then
  killall $XBMC
#  sleep 5
#  /usr/bin/shutdownvdr
else
  xinit /usr/bin/xbmc -fs --standalone &
fi
killall pidof mythwelcome mythfrontend.real
/usr/bin/mythwelcome
exit

This is just one problem plaguing my new system after upgrading. I also can't get video back after resuming from S3 and can't get xmacro to work so I can savestate and exit emulators using my remote.
I dont use myth tv,
does your script work to kill xbmc?
Would this replace my current kill script? Could i just remove the myth lines or something?
Thanks!
Reply
#9
mac666 Wrote:I dont use myth tv,
does your script work to kill xbmc?
Would this replace my current kill script? Could i just remove the myth lines or something?
Thanks!

I launch XBMC from the mythtv frontend, and sometimes XBMC will error or I will want to close it quickly. The script is supposed to kill xbmc, then the mythtv frontend, and finally mythwelcome before launching mythwelcome again (a program to automatically shutdown/wake the machine to record programs)

You could try using the script by modifying the two lines before the last exit line.

Try deleting "killall pidof mythwelcome mythfrontend.real"
and replace "/usr/bin/mythwelcome" with "/usr/share/xbmc/xbmc.bin"

This will kill XBMC but then relaunch it! Try deleting both lines if you only want to kill XBMC

You could make another script to launch XBMC:

Code:
#!/bin/bash
/usr/share/xbmc/xbmc.bin

This would require two unused buttons on your remote with two separate irexec entries.

You could also check out this link for a more complex script that can use one button to kill/launch two separate programs. I used it for a while and it worked like a charm.

Though I'm still not sure why our scripts are only working once.
Reply
#10
The script will kill XBMC and start mythwelcome once.

After this, I must issue "/etc/init.d/gdm restart" in order for the script to work again.

Does this point to an irexec problem?
Reply
#11
try typing this when the remote is unresponsive
Code:
/etc/init.d/lirc restart
if that fixes it, then use it at the point when your remote becomes unresponsive in your script, otherwise you may need to go a bit more advanced.

Code:
lircDriver=$(dmesg | grep usbcore | grep -i 'lirc' | sed -e "s/.* \(lirc*\)/\1/" | head -n 1)
curl "[url]http://127.0.0.1:8080/xbmcCmds[/url] /xbmcHttp?command=ExecBuilt&Inparameter=LIRC.Stop"
/etc/init.d/lirc stop
rmmod $lircDriver
modprobe $lircDriver
/etc/init.d/lirc start
curl "[url]http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=LIRC.Start[/url]"
This will restart everything lirc related including XBMC's lirc interperater.
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#12
im really lost on what your are talking about im afraid.
I would like to guess its an irexec related issue... but i cant proove it.

Perhaps i should another remote, i cant wake my computer or anything with this one ( even after make the XBMC wiki guide)

i use the microsoft mce remote...
Reply
#13
Thanks outleradam, but neither of your suggestions work.

"/etc/init.d/lirc restart" was the first thing I tried, but it never restores button functionality. Whenever irexec stops working, issuing the command always gives me "fail" on stopping irexec.

Code:
* Stopping execution daemon: irexec                                                                                                                  [fail]
* Stopping remote control daemon(s): LIRC                                                                                                            [ OK ]
* Loading LIRC modules                                                                                                                               [ OK ]
* Starting remote control daemon(s) : LIRC                                                                                                           [ OK ]
* Starting execution daemon: irexec                                                                                                                  [ OK ]

I can't get your second command to execute successfully (because I don't have the web server enabled?). It errors on the curl lines...but running the commands and excluding the curl lines does not fix irexec (for XBMC or any other scripts) either.

"/etc/init.d/gdm restart" always fixes the problem and allows me to issue one irexec command. If I restart gdm then try restarting lirc, the stopping of irexec will give an "OK" message, but issuing another restart of lirc causes the stoppping of irexec to give another "fail"

I have a button linked to a script to kill emulators which used to work flawlessly, but it too has started to only work once, which leads me to believe that I fubared something somewhere. All other remote functionality works great though.

mac666, try issuing "cat /proc/acpi/wakeup" and post the output.
Reply
#14
I fixed my problem. Very stupid mistake on my part.

It seems my script was the culprit. At the end, I changed
/usr/bin/mythwelcome
to
/usr/bin/mythwelcome &

and it now seems I can use any irexec event or kill xbmc to my heart's content

I guess any time I pressed TV/VIDEO, irexec would execute /usr/bin/mythwelcome making mythwelcome take over the running irexec process. Using & causes mythwelcome to launch in the background preserving the irexec process.

I hope this can help you too, mac.
Reply

Logout Mark Read Team Forum Stats Members Help
Start/Kill XBMC with the remote control doesnt work0