[solved] Suspend/Wake on Device issues
#1
Hola!

I have been having trouble getting my box to suspend consistently without waking up immediately. I've modified my /etc/default/grub file to include this line:

Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1 acpi_enforce_resources=lax"

...as per this article: http://wiki.xbmc.org/index.php?title=HOW...for_Ubuntu

I've also modded /etc/rc.local and it's correctly adding my USB devices to wakeup. When it suspends properly, it wakes up properly when I hit a button on my remote (shows up as a keypress in XBMC via Flirc). I can't figure out why sometimes it will suspend but most of the time it won't, and I've noticed some very strange patterns. For example, if I ssh into it and run 'sudo pm-suspend' it always suspends nicely and doesn't wake up until I hit a remote key, but if I make a bash script that contains only:

Code:
#! /bin/bash
sudo pm-suspend

...it suspends and then wakes up immediately. And if I use Adv. Launcher to launch that script, it doesn't suspend at all. I've modified sudoers so that pm-suspend doesn't require a passwd from user xbmc. Does anyone know how the suspend command works in XBMC? Is it using pm-utils? And if so, does anyone know why running the script above gives different results than just 'sudo pm-suspend' over ssh? I'm pretty baffled.
XBMCbuntu 11.0
Zotac ZBOX Blu-ray HD-ID34
URC RF-20 (configured with Flirc)
Reply
#2
look here..
http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug
Reply
#3
(2012-04-02, 23:55)thctlo Wrote: look here..

Thanks for the post! Unfortunately it didn't solve my issue. It sill either wakes up immediately, or once in a while hangs while trying to suspend (screen goes black, xbmc crashes but won't restart, I loose my ssh session, WoL doesn't work, and I can still hear the really noisy fans and drives).

The thing I find weirdest is that 'sudo pm-suspend' is almost 100% reliable but even a script that runs nothing but that line fails to put the box to sleep for good.

EDIT: in fact, Wake on LAN doesn't work when I have either of those scripts at /etc/pm/sleep.d/20_custom-ehci_hcd
XBMCbuntu 11.0
Zotac ZBOX Blu-ray HD-ID34
URC RF-20 (configured with Flirc)
Reply
#4
Well, I may be one step closer, though I'm embarrassed to admit my mistake... I think the reason pm-suspend was working from the command line every time was because I had recently used sudo every time. There was apparently a mistake in my sudoers file an pm-suspend was not working with NOPASSWD. Now that I fixed that, suspend behaves exactly the same way whether I enter the command, run the script, or launch the script using advanced launcher.

Also it now seems that fairly consistently, even with USB1 thru USB3 enabled, and regardless of which USB port the Flirc is in, if USB0 isn't enabled in wakeup, I can't wake the Zbox at all, but if it is enabled, it wakes up immediately. Also, if the Flirc is unplugged, the device stays asleep even with USB0 enabled.

Is it possible that all four USB ports are on USB0? And anyone have any other ideas for how to make it stay asleep until I press a button?
XBMCbuntu 11.0
Zotac ZBOX Blu-ray HD-ID34
URC RF-20 (configured with Flirc)
Reply
#5
Ok, so apparently every USB port on this thing is on hub 0, and that's th only one that needs to be enabled. I attached a normal USB keyboard and didn't have the problem with USB0 enabled in wakeup, so I checked the Flirc forums and Jason's released a newer version of his 'wake' beta firmware that seems to keep the Flirc from randomly waking the computer, and the wake command that I mapped wakes it up (though so does pretty much any other key as well). So I guess if you use Flirc, install fw_wake6.bin, then this guide should get you the rest of the way there.

http://wiki.xbmc.org/index.php?title=HOW...for_Ubuntu
XBMCbuntu 11.0
Zotac ZBOX Blu-ray HD-ID34
URC RF-20 (configured with Flirc)
Reply

Logout Mark Read Team Forum Stats Members Help
[solved] Suspend/Wake on Device issues0