root@eee-pc:/home/william# tail test.txt
sync() = 0
open("/sys/power/state", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb748f000
write(4, "mem\n", 4) = 4
close(4) = 0
munmap(0xb748f000, 4096) = 0
ioctl(3, PHN_GET_REGS or RTC_AIE_OFF, 0) = 0
close(3) = 0
exit_group(0) = ?
So this is a tail off an strace on an x86 wheezy install I've had for a
while.
root@eee-pc:/home/william# cat /sys/power/state
mem disk
As we can see here, the power states are different. However, since this is
an x86 system, we have a "proper" acpi setup.
root@eee-pc:/home/william# cat /proc/acpi/wakeup
Device S-state Status Sysfs node
POP4 S4 *disabled pci:0000:00:1c.0
POP5 S4 *disabled pci:0000:00:1c.1
USB0 S3 *enabled pci:0000:00:1d.0
USB1 S3 *enabled pci:0000:00:1d.1
USB2 S3 *enabled pci:0000:00:1d.2
EUSB S3 *enabled pci:0000:00:1d.7
. . . and I'm not sure how we "fix" this on an ARM system, which pretends
to have an ACPI capable BIOS.
On Tue, May 3, 2016 at 10:41 PM, William Hermans <[email protected]> wrote:
> So . . .
>
> ioctl(3, RTC_WIE_ON or RTC_WKALM_SET, {enabled=1, pending=0, {tm_sec=56,
> tm_min=20, tm_hour=5, tm_mday=4, tm_mon=4, tm$
> fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb6f0b000
> write(1, "rtcwake: wakeup from \"mem\" using"..., 71) = 71
> nanosleep({0, 10000000}, NULL) = 0
> sync() = 0
> open("/sys/power/state", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 4
> fstat64(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb6f0a000
> write(4, "mem\n", 4*<EOF>*
>
> rtcwake never finishes writing to /sys/power/state, which mean the file
> is never closed which means I bet the contents are not "mem".
>
> william@beaglebone:~$ cat /sys/power/state
> freeze standby mem disk
>
> Uh yeah, that looks borked . . .my first guess, this never gets changed,
> then rtcwake sees "freeze" and proceeds no further. Thus we're stuck in la
> la land while the board sleeps forever.
>
> Here is what I think I've noticed so far. Right after the board suspends
> to memory, I press the reset button on the beaglebone, and nothing happens.
> But after one minute, the reset button seems to work fine. Maybe I was not
> pressing the button just right, but I attempted several times before
> finally the board went into reset.
>
> Darren, do you think you can get an strace of rtcwake from your 3.14.x
> system ? If you can, then we should be able to compare the differences and
> probably figure out how to fix this mess. Just remember to use the -o(oh)
> option with strace to sent stdout to a file.
>
> root@beaglebone:/home/debian# *strace -o ./test.txt rtcwake -m mem -s 60*
>
> is how I've been running strace . . .
>
>
> On Tue, May 3, 2016 at 8:19 PM, William Hermans <[email protected]> wrote:
>
>> william@beaglebone:~$ uname -r
>> 4.4.8-ti-r22
>> william@beaglebone:~$ sudo su
>> root@beaglebone:/home/william# echo mem > /sys/power/state
>> bash: echo: write error: Invalid argument
>>
>> Not sure if this is helpful.
>> root@beaglebone:/home/william# lsmod
>> Module Size Used by
>> bnep 13053 2
>> rfcomm 53777 0
>> bluetooth 409531 10 bnep,rfcomm
>> rfkill 18154 2 bluetooth
>> nfsd 255636 2
>>
>> The board is an Element14 RevC. I do have a cicuitco A5A, but I really do
>> not want to mess with it just now . . . Robert would you like me to provide
>> any further information before I nuke this image ?
>>
>>
>>
>> On Tue, May 3, 2016 at 8:11 PM, William Hermans <[email protected]>
>> wrote:
>>
>>> Yeah I don't know . . . something seems to be terribly broken.
>>> william@beaglebone:~$ uname -r
>>> 4.1.22-ti-r59
>>> william@beaglebone:~$ sudo su
>>> root@beaglebone:/home/william# echo mem > /sys/power/state
>>> bash: echo: write error: Invalid argument
>>>
>>> Next up, I'm going ot attempt to get it working with the exact same
>>> kernel you use Robert.
>>>
>>>
>>> On Tue, May 3, 2016 at 8:05 PM, William Hermans <[email protected]>
>>> wrote:
>>>
>>>> Ah, ok my bad i missed it. You used a 4.4 regular ( non rt ) kernel.
>>>>
>>>> On Tue, May 3, 2016 at 8:03 PM, William Hermans <[email protected]>
>>>> wrote:
>>>>
>>>>> Robert, did you test "mem" on an rt kernel or regular ?
>>>>>
>>>>> On Tue, May 3, 2016 at 8:02 PM, Robert Nelson <[email protected]
>>>>> > wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, May 3, 2016 at 9:59 PM, William Hermans <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> root@beaglebone:/home/william# echo mem > /sys/power/state
>>>>>>> bash: echo: write error: Invalid argument
>>>>>>> root@beaglebone:/home/william# uname -r
>>>>>>> 4.1.22-ti-rt-r59
>>>>>>>
>>>>>>> Replacing "mem", with "disk" pretends to work, but it does not.
>>>>>>>
>>>>>>
>>>>>> Might be another rt bug? ;)
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> --
>>>>>> Robert Nelson
>>>>>> https://rcn-ee.com/
>>>>>>
>>>>>> --
>>>>>> For more options, visit http://beagleboard.org/discuss
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "BeagleBoard" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/beagleboard/CAOCHtYhVzANWEAg%2BNCDHyT9ESTMGiqLSGaQEPTWMiz-LH-or5Q%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/beagleboard/CAOCHtYhVzANWEAg%2BNCDHyT9ESTMGiqLSGaQEPTWMiz-LH-or5Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/CALHSORpFeKU3eubJhR3Auv8Lq3JDmd3cEeKiqRJDzZteyfSLLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.