Openelec freezing issue.
#31
Thanks for the info nabz but I have OE installed on the hard drive.

@ kreeturez glad to hear it worked for you on rPi....

Does anyone know the command to suspend OE? I would like to program one of the remote buttons to suspend my machine but I been looking all over and can not find how to write the command.
Reply
#32
pm-suspend
Reply
#33
I tired doing this to put my machine to sleep but it didn't work..

/storage/.config/.lircrc

Code:
# sleep
begin
    button = KEY_GREEN
    prog = irexec
    config = /storage/.config/sleep.sh
end

/storage/.config/sleep.sh

Code:
#!/bin/sh

pm-suspend
Reply
#34
What happens if you run pm-suspend from a terminal? Also are you trying to suspend a RPI?
Reply
#35
No I have a zotac. When i run pm-suspend from the terminal it works my machine goes into sleep mode.

This is how my .lircrc file looks.

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

# sleep
begin
    button = KEY_GREEN
    prog = irexec
    config = /storage/.config/sleep.sh
end
Reply
#36
Can you run sleep.sh from terminal? Maybe its not executable, run

chmod +x sleep.sh

Also why not put pm-suspend in .lircrc instead of the script?
Reply
#37
You were right it was not executable. After running chmod +x sleep.sh from the terminal my button now works. Thank you teeedubb.

Now that it is a executable will that change when openelec updates? Will have to pro form that command every time openelec updates?
Reply
#38
Nah it'll be fine, OE updates don't touch the things that are writable by the user, eg /storage/
Reply
#39
teeedubb is there a way i could add the kill all command to the sleep.sh file? Would this be the correct way of writing the code?

Code:
#!/bin/sh

#killall -9 xbmc.bin

sync
pm-suspend
Reply
#40
You need to remove the hash from in front of killall and I would run the killall command after pm-suspend - killing xbmc before suspending has given me problems before. Probably better to use a resume hook to kill xbmc though, there's an example of a resume hook on the first page.
Reply
#41
would this be correct?

Code:
#!/bin/sh

pm-suspend

[ "$1" = "resume" ] && sleep 2 && /usr/bin/irexec -d /storage/.config/.lircrc
Reply
#42
No, the resume hook isn't part of sleep.sh, its a separate file, the location where it should be placed is on the first page. Plus on the resume line delete everything after the first && and replace it with killall -9 xbmc
Reply
#43
gotcha thanks
Reply
#44
My suspend button has been working for about a week and now it stopped. Every time i try to put my machine to sleep using the button on the remote or even when i use suspend by pressing it on xbmc it does work.

When I press it looks like it goes into suspend for about a second but then it turns right back on. Has this happened to anyone before?
Reply
#45
Hey all, not sure what to put as button with the following irw return:

184 0 KEY_TEXT devinput
184 0 KEY_TEXT_UP devinput

This doesn't work:

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

Neither does this:

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

Sorry if this is a simple fix, I'm still learning and trying to soak all this info in.
Reply

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