Live (HDD install) - Resume from Standby
#1
I'm no noob in regards to XBMC - I've used the Xbox version since it's infancy, and installed in on countless Xboxes (I've been the go-to Xbox soft modder with all my friends and co-workers). The only reason the Atlantis release excites me is the fact you can play HD files and the possibility of finally being able to "power on" with a remote (the only two limitations that keep the Xbox version from perfection IMO).

I've been going back and forth between the WinXP and Live (installed to a dedicated HDD) for a while now. So far the Live version works best, as I have found that the video playback in the windows version to be intermittent (most videos will stop playing and go back to the main menu). The Live verison however, is flawless in this regard, and I find it to be smoother and more stable overall. However, I cannot figure out how to enable or configure a way to resume from standby using the MCE remote.

There are a few threads already with others asking the same question, but there have been no responses. I know that in XBMC live there the options for "hibernate" or "suspend" (which I assume is the same as standby). These options work, but they only way to resume the system is to press the power button. How do I configure this to occur with the remote (or any USB actvity)? In the Windows configuration, this is managed by Windows, and is configurable. I know that XBMC is running on Linux/Ubuntu (which I am not familiar with) - is there a way to configure wake from standby?

Thanks.
Reply
#2
http://forum.xbmc.org/showpost.php?p=233571&postcount=2

Quote:echo USBX > /proc/acpi/wakeup
were X is the number of your remote, how to find that number Im unsure, atlantis+1 will probably autodetect this and handle this atleast in standalone mode, if we can streamline it.

Cheers,
Tobias
If you have problems please read this before posting

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.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#3
Thank you Topfs2!

In case anyone wants some more info:

http://pmaster.no/howto/lirc_suspend_resume.txt
Reply
#4
SantzHex Wrote:Thank you Topfs2!

In case anyone wants some more info:

http://pmaster.no/howto/lirc_suspend_resume.txt


Can you let me know if resuming is working for you?

I'll try an installed-live CD if it does. Right now I'm using Ubuntu and it just doesn't want to wake without either the remote not working, screen not waking or machine freezing. It works maybe one out of 5 times without error.
Reply
#5
To be honest, I gave up on this version. I couldn't figure out how to get standby to work on Live. So I just went to the Windows version, with which I can get standby to work flawlessly. Maybe later on, when XBMC live has some more specific method of configuring standby, I will re-explore it.
Reply
#6
My HTPC uses a Microsoft MCE remote (model 1039) and an iMON LCD from an Antec Fusion Black. I can get XBMC Live (HDD install) to resume from standby by pressing the power button on my remote.

However, once XBMC restarts, it is completely unresponsive to commands from my remote, but it will respond to my USB keyboard and mouse. LIRC 0.8.3 seems to be working, and when i run irw, it echos the commands received from the remote. The only way I can get XBMC to respond to my remote again is to restart it using ctrl-alt-backspace. Did I forget to configure something?
Reply
#7
Here's the tail of my syslog from after XBMC resumes by pressing the power button on my remote. The error messages at the end repeat continuously.

Nov 26 00:32:06 XBMCLive kernel: [ 217.567956] lirc_imon: imon_probe: found IMON device
Nov 26 00:32:06 XBMCLive kernel: [ 217.567960] lirc_dev: lirc_register_plugin: sample_rate: 0
Nov 26 00:32:06 XBMCLive kernel: [ 217.568068] lirc_imon: imon_probe: Registered iMON plugin(minor:0)
Nov 26 00:32:06 XBMCLive kernel: [ 217.568107] lirc_imon: imon_probe: iMON device on usb<2:3> initialized
Nov 26 00:32:06 XBMCLive kernel: [ 217.568246] PM: resume devices took 15.764 seconds
Nov 26 00:32:06 XBMCLive kernel: [ 217.568252] ------------[ cut here ]------------
Nov 26 00:32:06 XBMCLive kernel: [ 217.568254] WARNING: at /build/buildd/linux-2.6.27/kernel/power/main.c:176 suspend_test_finish+0x74/0x80()
Nov 26 00:32:06 XBMCLive kernel: [ 217.568256] Modules linked in: wmi video output sbs sbshc pci_slot container ac battery ipv6 af_packet psmouse serio_raw
pcspkr k8temp evdev lirc_imon lirc_dev snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy parport_pc snd_seq_oss parport snd_seq_midi snd_rawmidi
nvidia(P) snd_seq_midi_event agpgart snd_seq snd_timer snd_seq_device snd soundcore snd_page_alloc button i2c_nforce2 i2c_core shpchp pci_hotplug sr_mod cdro
m pata_amd sata_nv pata_acpi sg ata_generic libata dock ohci_hcd thermal processor fan fuse fbcon tileblit font bitblit softcursor ext3 ext2 jbd mbcache loop
nls_iso8859_1 nls_cp437 vfat fat squashfs unionfs usb_storage libusual sd_mod crc_t10dif scsi_mod uhci_hcd ehci_hcd usbhid hid usbcore [last unloaded: force
deth]
Nov 26 00:32:06 XBMCLive kernel: [ 217.568291] Pid: 5859, comm: pm-suspend Tainted: P 2.6.27-7-generic #1
Nov 26 00:32:06 XBMCLive kernel: [ 217.568294] [<c037c3f6>] ? printk+0x1d/0x1f
Nov 26 00:32:06 XBMCLive kernel: [ 217.568299] [<c0131de9>] warn_on_slowpath+0x59/0x90
Nov 26 00:32:06 XBMCLive kernel: [ 217.568304] [<c014d255>] ? sched_clock_cpu+0xd5/0x170
Nov 26 00:32:06 XBMCLive kernel: [ 217.568308] [<c014c0af>] ? down_trylock+0x2f/0x40
Nov 26 00:32:06 XBMCLive kernel: [ 217.568311] [<c01324c2>] ? try_acquire_console_sem+0x12/0x40
Nov 26 00:32:06 XBMCLive kernel: [ 217.568314] [<c024e580>] ? kobject_put+0x20/0x50
Nov 26 00:32:06 XBMCLive kernel: [ 217.568318] [<c015d204>] suspend_test_finish+0x74/0x80
Nov 26 00:32:06 XBMCLive kernel: [ 217.568321] [<c015d2f6>] suspend_devices_and_enter+0xe6/0x190
Nov 26 00:32:06 XBMCLive kernel: [ 217.568324] [<c015d571>] enter_state+0xd1/0x100
Nov 26 00:32:06 XBMCLive kernel: [ 217.568326] [<c015d625>] state_store+0x85/0xd0
Nov 26 00:32:06 XBMCLive kernel: [ 217.568329] [<c015d5a0>] ? state_store+0x0/0xd0
Nov 26 00:32:06 XBMCLive kernel: [ 217.568331] [<c024e444>] kobj_attr_store+0x24/0x30
Nov 26 00:32:06 XBMCLive kernel: [ 217.568333] [<c01ff4c7>] sysfs_write_file+0x97/0x100
Nov 26 00:32:06 XBMCLive kernel: [ 217.568336] [<c01b24c0>] vfs_write+0xa0/0x110
Nov 26 00:32:06 XBMCLive kernel: [ 217.568339] [<c01ff430>] ? sysfs_write_file+0x0/0x100
Nov 26 00:32:06 XBMCLive kernel: [ 217.568342] [<c01b2602>] sys_write+0x42/0x70
Nov 26 00:32:06 XBMCLive kernel: [ 217.568344] [<c0103f7b>] sysenter_do_call+0x12/0x2f
Nov 26 00:32:06 XBMCLive kernel: [ 217.568348] =======================
Nov 26 00:32:06 XBMCLive kernel: [ 217.568349] ---[ end trace bab3301456f449fd ]---
Nov 26 00:32:06 XBMCLive kernel: [ 217.568493] PM: Finishing wakeup.
Nov 26 00:32:06 XBMCLive kernel: [ 217.568494] Restarting tasks ... <3>lirc_imon: lcd_write: no iMON device present
Nov 26 00:32:06 XBMCLive kernel: [ 217.570119] lirc_imon: lcd_write: no iMON device present
Nov 26 00:32:06 XBMCLive kernel: [ 217.570174] lirc_imon: lcd_write: no iMON device present
Nov 26 00:32:06 XBMCLive kernel: [ 217.570229] lirc_imon: lcd_write: no iMON device present
Reply
#8
I am finally able to suspend and resume XBMC successfully by pressing the pc power button on my Microsoft MCE remote (model: 1039). My HTPC is an Antec Fusion Black with built in iMON LCD. I upgraded the kernel in my XBMC Live 8.10 installed to HDD to 2.6.27-7.

1) I had the following repeated error messages in my syslog:

Nov 26 00:32:06 XBMCLive kernel: [ 217.570119] lirc_imon: lcd_write: no iMON device present
Nov 26 00:32:06 XBMCLive kernel: [ 217.570174] lirc_imon: lcd_write: no iMON device present
Nov 26 00:32:06 XBMCLive kernel: [ 217.570229] lirc_imon: lcd_write: no iMON device present
...

These errors were caused by LCDd not restarting after resume from suspend. This was solved by creating /etc/pm/sleep.d/07LCDd with the following lines

#!/bin/bash

. /usr/lib/pm-utils/functions

case "$1" in
hibernate|suspend)
/etc/init.d/LCDd stop
;;
thaw|resume)
/etc/init.d/LCDd start
;;
*)
;;

esac

exit $?

This script restarts LCDd during resume from suspend. No more annoying error messages!

2) I renamed /etc/pm/sleep.d/99lirc to /etc/pm/sleep.d/08lirc. This is because the hooks in /etc/pm/sleep.d are executed in alphabetical order during suspend, and in reverse alphabetical order during resume. The other hooks executed during suspend and resume are in /usr/lib/pm-utils/sleep.d, with one of those being 50modules. I wanted lircd to be killed before its modules, lirc_dev and lirc_imon, are unloaded by 50modules during suspend, and lircd to be started after lirc_dev and lirc_imon are loaded during resume.

I also changed the following line

thaw|resume)
/etc/init.d/lirc start

to

thaw|resume)
/etc/init.d/lirc restart

Apparently, lirc does restart properly during resume from suspend, and calling

/etc/init.d/lirc start

again generates the following error in /var/log/pm-suspend.log

* Starting remote control daemon(s) : LIRC
...fail!

The change in the script stops that annoying error message!

3) XBMC was completely unresponsive to commands from my remote, even though lirc 0.8.3 was working, and when i ran irw, it echod the commands received from the remote. This was solved by creating /etc/pm/sleep.d/06xbmc with the following lines

#!/bin/bash

. /usr/lib/pm-utils/functions

case "$1" in
hibernate|suspend)
/etc/init.d/xbmc stop
;;
thaw|resume)
/etc/init.d/xbmc start
;;
*)
;;

esac

exit $?

This script restarts XBMC during resume from suspend. I also edited /etc/init.d/xbmc, which had the following lines

stop)
killall Xorg xbmc

This was not working with XBMC 8.10 Live install because the distribution lacked the killall command.

(T: XBMCLiveCD)xbmc@XBMCLive:/$ sudo /etc/init.d/xbmc stop
[sudo] password for xbmc:
/etc/init.d/xbmc: line 91: killall: command not found

So I changed

stop)
killall Xorg xbmc

to

stop)
pkill xbmc
pkill Xorg

now

/etc/init.d/xbmc stop

works. This change allowed /etc/pm/sleep.d/06xbmc to properly stop Xorg and xbmc during suspend, and thus properly start them back up during resume, allowing my remote to control XBMC again!
Reply
#9
Hey Tim,

I have two cases one is a Silverstone lc16mr with the Imon internal I/R and vfd and the other is a Zalman HD-135 with the VLsystems ir/vfd.

I am wondering do you have a tut completed on how you got your Imon to work period, I would like to use the Zalman if possible. I see it is supported in 0.8.3 but I would like to get it working with the mce remote which I know you can do with the imon rcvr and the mce_usb2 remote file.

I have searched for a while to try and find a good resource for this with no luck.

So a simple how to on the imon and LCDd working would be great.

rgds,

Dave
Reply
#10
Is it possible to do something like this on usb-stick version?
Reply

Logout Mark Read Team Forum Stats Members Help
Live (HDD install) - Resume from Standby0