[Asrock] Resume suspend mode, is it possible with IR?
#16
I made a quick PoC python script to get you the thing you should echo to /proc/acpi/wakeup

http://pastebin.com/m283ec8ad

So if you download that and do python thescriptyoudownloaded.py
You should get for example USB0

This is a PoC script that is now rewriten to bash by lcappriotti and should hopefully work great and will be included in XBMC Live camelot.

P.S it works only on mce remote but expanding it shouldn't be to hard.
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
#17
jonassw Wrote:If you're using Karmic Koala, try to do:
cat /proc/acpi/wakeup
It should return something like this:
Code:
Device  S-state   Status   Sysfs node
SMB0      S4     disabled  pci:0000:00:03.2
USB0      S4     enabled   pci:0000:00:04.0
USB2      S4     disabled  pci:0000:00:04.1
NMAC      S5     disabled  pci:0000:00:0a.0
PBB0      S4     disabled  pci:0000:00:09.0
HDAC      S4     disabled  pci:0000:00:08.0
XVR0      S4     disabled
XVR1      S4     disabled
P0P5      S4     disabled
P0P6      S4     disabled
P0P7      S4     disabled
P0P8      S4     disabled
P0P9      S4     disabled

If everything is disabled, then:
su -s
echo USB0 > /proc/acpi/wakeup
to toggle one of the USB devices. You might want to try all of them if there are several, since you'll need to toggle the one thats the actual remote control.

I had this exact issue when I upgraded Jaunty to Karmic. Everything was disabled by default, and thus the system didn't Wake-On-USB.

I am using Jaunty.
With lsusb, I determined that my dongle is on USB2, I enabled it using your commands above and it worked, xbmc resumed!!

A couple of problems now though, the remote will not control XBMC after it resumes and when I enable USB2 it does not stay enabled after a reboot.

Why do I have to enable USB2, I have a keyboard connected as well and even with everything set as disabled, the keyboard still resumes the asrock?
Reply
#18
brownstein Wrote:I am using Jaunty.
With lsusb, I determined that my dongle is on USB2, I enabled it using your commands above and it worked, xbmc resumed!!

A couple of problems now though, the remote will not control XBMC after it resumes and when I enable USB2 it does not stay enabled after a reboot.

Why do I have to enable USB2, I have a keyboard connected as well and even with everything set as disabled, the keyboard still resumes the asrock?

The echo to acpi/wakeup will be reset every boot, so you need to put it in for example /etc/rc.local

Sometimes you need to restart lirc on resume, XBMC Live have some alterations to make this happen.
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
#19
brownstein Wrote:I am using Jaunty.
With lsusb, I determined that my dongle is on USB2, I enabled it using your commands above and it worked, xbmc resumed!!

A couple of problems now though, the remote will not control XBMC after it resumes and when I enable USB2 it does not stay enabled after a reboot.

Why do I have to enable USB2, I have a keyboard connected as well and even with everything set as disabled, the keyboard still resumes the asrock?
Hmm, yes so does mine. I just didn't notice because I hardly ever reboot my system.

Thats pretty odd. Maybe we have to add these commands to some rc.local script or something.

Someone with more Linux experience might be able to shed some light on this. Funny thing is that this wasn't an issue before I did my do-distribution-upgrade.

Edit:
Oh topfs2 already said that it needs to be added to rc.local.
Reply
#20
topfs2 Wrote:The echo to acpi/wakeup will be reset every boot, so you need to put it in for example /etc/rc.local

Sometimes you need to restart lirc on resume, XBMC Live have some alterations to make this happen.

Sorry, bit of a linux noob,

do I just add "echo USB2 > /proc/acpi/wakeup" to my rc.local? Do I have to uncomment any other lines? Does this look ok?

rc.local
Code:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo USB2 > /proc/acpi/wakeup

exit 0

Also, do you have any suggestions for having lirc working in XBMC after resume? I have read a little on the forums about that problem but I am not sure which remedy I should use. I am guessing I need to add a script somewhere for resume?

Thanks
Reply
#21
brownstein Wrote:Sorry, bit of a linux noob,

do I just add "echo USB2 > /proc/acpi/wakeup" to my rc.local? Do I have to uncomment any other lines? Does this look ok?
Yup, thats it!

I just did it on my ASRock 1 minute ago, and it now suspends and resumes complete as planned, and it works when rebooted and such.
Reply
#22
brownstein Wrote:Also, do you have any suggestions for having lirc working in XBMC after resume? I have read a little on the forums about that problem but I am not sure which remedy I should use. I am guessing I need to add a script somewhere for resume?
I remember reading something about /etc/lirc/hardware.conf having some settings to ensure that it works on resume, but I'm really not sure.

This is the contents of mine:
Code:
REMOTE="Windows Media Center Transceivers/Remotes (all)"
REMOTE_MODULES="lirc_dev lirc_mceusb"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb"
REMOTE_LIRCD_ARGS=""
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
START_LIRCD="true"
START_LIRCMD=""
LOAD_MODULES=""
LIRCMD_CONF=""
FORCE_NONINTERACTIVE_RECONFIGURATION="false"

If that is not the case, then maybe somewhere in the fabled /etc/apm/resume.d folder (seems like some symlink jazz like the rc.d stuff)
Reply
#23
Ok, add the wakeup line to rc.local like I did above. Now follow the guide here there is one significant error in the guide though.

You want to scroll down until you get to the part titled "S3 resume combo Close button fix", the first bullet says "Using your SFTP client, create the file /etc/pm/resume.d/99lirc-resume.sh", the correct placement of the file you create is in /etc/pm/sleep.d/99lirc-resume.sh

Everything works great now! Thanks for the help guys. long live XBMC!
Reply
#24
I thought I had it, it appears that I now suffer from the instant resume after suspend, the asrock appears to suspend but it immediately wakes up right after.

Tried adding the usbcore.autosuspend stuff to my grub file with no change.

I was on nvidia 185 drivers, tried upgrading to the latest with no change.

frustrating... that is the only problem I am finding with the linux version so far is that there are sooo many little tweaks you have do to it and so much reading when you are new to it. Sometimes it is fun, and sometimes you want to smash your head against a wall!

any thoughts?

....Bueller?
Reply
#25
brownstein Wrote:the first bullet says "Using your SFTP client, create the file /etc/pm/resume.d/99lirc-resume.sh", the correct placement of the file you create is in /etc/pm/sleep.d/99lirc-resume.sh
Thank you for pointing that out. Resume.d was for the old-school /etc/acpi. I screwed up when I wrote that. Changed.
Reply
#26
I want to add that this guide I wrote should resolve all your issues

http://wiki.xbmc.org/?title=Create_a_resume_script
Reply
#27
thanks, that is a great tutuorial, however, it does not solve my latest issue about the asrock resuming from suspend immediately after suspending.
Reply
#28
Check your bios to make sure you have S3 enabled. What version of ubuntu are you using?
Reply
#29
remove that wakeup script and try my method.
Reply
#30
outleradam Wrote:Check your bios to make sure you have S3 enabled. What version of ubuntu are you using?

Thanks outleradam,
Using Jaunty, S3 is enabled, well it is set to AUTO, only other option is DISABLED.

Will try removing the resume script and trying your method when I get home. I didn't see a difference between the resume script I used and the one that your method produces. Can you point out what will be done differently?
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
[Asrock] Resume suspend mode, is it possible with IR?00
This forum uses Lukasz Tkacz MyBB addons.