Openelec freezing issue.
#16
Does the directory that the file is meant to be in exist?
Reply
#17
May I ask for some suggestions as well?

I have the occasional freeze on OE and want to assign a button on my IR remote to execute the killall command. This button (the RED button) is already assigned to some PVR action in XBMC, but since I have no PVR facilities connected, I would like to reassign this button.

My ~/.config/.lircrc looks like this:
Code:
begin
        button = KEY_RED
        prog = irexec
        config = /bin/killall -9 xbmc/bin &
end

And ~/.config/udev.rules.d/infrared.rules:
Code:
ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/irexec -d /storage/.config/.lircrc"

But somehow the order of processing gets in the way: pressing the button still triggers the PVR command in XBMC.
Reply
#18
Is irexec running? 'pidof irexec' to check. It should still work even if its assigned a button thought xbmc.
Reply
#19
Hi all,
I've followed your steps (also read at http://wiki.openelec.tv/index.php/Guide_...m_a_Remote) but irexec is not running after reboot. I cannot get its pid Sad so custom remote commands are not working. Any idea?

Thanks
Reply
#20
Hey nabz,
For whatever reason ir-exec wouldnt start via udev on ubuntu for me (sometimes i think that udev hates me :S) and irexec would randomly stop running so i wrote a script to check if its running, if its not it will start it. I run it via /etc/rc.local but you can do it via autostart.sh

Code:
#!/bin/bash
export DISPLAY=:0

while true; do
        if [[ ! $(pidof irexec) ]]; then
                (sudo -u xbmc irexec -d /home/xbmc/.lircrc )&
                (sudo /usr/bin/ir-keytable -c -D 1000 -P 125 -w /etc/rc_keymaps/rc6_mce -p NEC,RC-6,LIRC)&
                echo irexec not running, starting now...
        else
                echo irexec running.
        fi
sleep 1
done
Reply
#21
Hi teeedubb,
I'll try it.

Thanks again for your help.
Reply
#22
teeedubb i just bought a need htpc and was trying to program my remote button to kill all but it is not working. The difference with this htpc is that all the remote buttons are already assigned an action. I was trying to do what RonM was did and assign the red button KEY_RED for the kill all. I got it working for a day but when i turned on my htpc the following day it stopped working.
Reply
#23
How do i check to see if irexec is running? I am not familiar with how to use 'pidof irexec'
Reply
#24
Hi twistedNy,
If pidof doesn't show anything means it is not working. If irexec is working, pidof will show you its process ID
Reply
#25
Hi nabz,

I am not sure if I am doing it correctly. I am using putty and then entering pidof but it does not show anything. Is this the correct why to check if irexec is working? If yes how do i get irexec to work?
Reply
#26
UPDATE.

The only why i could get my remote to work is when I ssh using putty and type in irexec. I guess it starts irexec. The second i close putty I can not kill all with my remote. I tried using teeedubb's code above to auto start it but it is not working. I am not sure If I am putting autostart.sh in the right directory. I tired to add it to /etc/autostart.sh but it would not let me add a file to that directory. I read some where that you could also use the directory /storage but that didn't work.
Reply
#27
That code won't work in OE, change the two lines with 'sudo' to suit your system and to something which will run on OE... OE doesn't use sudo.
Reply
#28
thank you teedubb.

UPDATE..

For any one having the same issue with irexec not starting.

Create 'autostart.sh' in directory /storage/.config

Code:
#start IRexec
su -c '/usr/bin/irexec -d /storage/.config/.lircrc' -l root
Reply
#29
Hi again,
@TwistedNy: congratulations!

Also, if you have installed OE using an SD card (like me) and you get read-only random errors, just have to convert ext4 to btfrs. Check this :
http://wiki.openelec.tv/index.php?title=..._partition
Reply
#30
(2013-06-19, 13:51)teeedubb Wrote: First log in to you openelec machine using ssh.

http://wiki.openelec.tv/index.php?title=Ssh_commands

Create a irexec config:

nano /storage/.config/.lircrc

Paste in

Code:
begin
        button = KEY_BRL_DOT1
        prog = irexec
        config = /bin/killall -9 xbmc.bin &
end

Crtl + x to exit. Use the command irw to see what is being pressed and replace button field.

Create a udev rule to start irexec:

nano /storage/.config/udev.rules.d/infrared.rules

Code:
ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/irexec -d /storage/.config/.lircrc"


(2014-02-16, 03:28)TwistedNy Wrote: thank you teedubb.

1. Create 'autostart.sh' in /storage/.config

#start IRexec
su -c '/usr/bin/irexec -d /storage/.config/.lircrc' -l root


Confirmed under OE (running on a rPi) that this works great!

The directory:
/storage/.config/udev.rules.d/
...doesn't exist by default, so as suggested, a quick mkdir is all that's needed before creating the udev rule:
mkdir /storage/.config/udev.rules.d/


Like TwistedNy, I noticed IRexec wasn't being launched automatically so I followed his instruction above to autostart it - i.e.:
nano /storage/.config/autostart.sh

...and then pasting:
Code:
#start IRexec
su -c '/usr/bin/irexec -d /storage/.config/.lircrc' -l root

Working very well - thanks guys!
Reply

Logout Mark Read Team Forum Stats Members Help
Openelec freezing issue.1