Ticket #1822 (in_testing defect)

Opened 9 years ago

Last modified 8 years ago

2008.8 doesn't wake on alarm

Reported by: madjo Owned by: tick
Priority: high Milestone: Om2008.10
Component: Qtopia Version: Om2008.8
Severity: critical Keywords:
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible:

Description

I have my phone set as an alarm, but if I also set the phone to suspend after an x amount of time, the phone turns itself off, yet when the set time rolls past, the phone does nothing.
Only when I turn on the device itself the alarm goes off.

I have the 2008.8 image of 20080808 installed.

Change History

comment:1 Changed 9 years ago by zecke

  • Version changed from GTA02v5 to OM-2008.08
  • Milestone Om2008.8 deleted

What is the test case?

Did you set the time?
Did you set a timezone?
Which timezone?
What time?
What do you set the alarm to?
What is the output of date telling ou?
Is atd running on the system?

comment:2 Changed 9 years ago by wendy_hung

tested with Om 2008.8 image

steps:
1) set up time zone with the local time zone
2) set up alarm ringing 3mins later
3) set up suspend time 10sec.

current result:
1) if you are in other application than go to suspend, won't have any alarm.
2) at home screen, suspend 10sec., will wake up from suspend but no any tone or screen show up, 10 sec. later goes to suspend again.
3) if the "Setting" app still running in illume, won't have alarm as well

So far it's the result that i test, will keep an eye on this and notice any other stuff. Or tell me you need any info.

comment:3 Changed 9 years ago by zecke

Wendy do you have a test plan for this now? Local timezone is varying for people. So it is best to say what you use even the time..

I'm a bit confused with your results. Is the device waking up or not? Is it sometimes waking up? Is it a matter of suspending too early (before playing an alarm)? Is the alarm screen not put to foreground? Is the sound played at all?

comment:4 Changed 9 years ago by wendy_hung

Honestly, i don't have test plan to do it now. The local time zone is GMAT+8.
The device will wake up only when you close setting and you are at home screen. But when i set the suspend time too short like 10 seconds, it will wake up with no alarm then 10sec. later it sleep again, like some ghost wake it up.

The alarm sound did not play every time, especially in those "wake up by ghost" case, no any sounds...

comment:5 Changed 9 years ago by madjo

My situation
and no I don't have a testcase for it, but it's easy to reproduce (since it's constant for me)

1) time is set correctly. Currently the phone displays 0.12
2) timezone is set to Amsterdam (is that relevant, is the wake-on-alarm dependent on timezones?)
3) alarm is set to 06.30 (but set it to whatever you like or need to reproduce this quickly)
4) suspend is set to 30 sec
5) date says: "Sat Aug 16 00:12;30 CEST 2008"
6) Yes, atd is running.

Close the settings screen, so that you're back on the home screen (set to icons)
Now let the phone go to sleep and wait till the alarm time rolls by.
On my phone nothing happens, until I turn the phone back on. Only then the alarm sounds, and the screen is showing.

Again, the bug is that the device does not wake on alarm, when the alarm should go off. So in my case, I expected the device to wake up at 6.30 in the morning. Yet it didn't. but when I turned it on myself at 7.00, it sounded the chime, and it showed the alarm screen.

comment:6 Changed 9 years ago by Treviño

I've just tested alarm using the latest zecke packages. Here the alarm wake-ups the phone from suspend (I've made the phone sleeping manually by pressing the power menu) but it doens't ring.

So the bug should be "2008.8 doesn't ring on alarm".

comment:7 Changed 9 years ago by regina_kim

  • Owner changed from openmoko-devel to zecke
  • Priority changed from normal to high
  • Component changed from unknown to Qtopia
  • Severity changed from normal to critical
  • Milestone set to Om2008.9

comment:8 Changed 9 years ago by tick

I had set timezone, (Taipei)
And Alarm.

The following are what happened to me.

  1. everytime I reboot. my time messed up.
  2. my time is getting slower after one day
  3. my neo woke up from suspend when alarm time, but it does not ring.

I did not look into this problem, but I guess there are some issues in PMU RTC and CPU RTC sync.

comment:9 Changed 9 years ago by Treviño

Couldn't only be time problem? I was wondering that maybe the phone wake ups too late (at exact alarm time), so when the phone is resumed (few seconds after the time set the alarm software i.e.: alarm-time + resume-time) the alarm software doesn't ring at all since it's too late!

comment:10 Changed 9 years ago by Treviño

To prove what said above, I've tried to do this:

diff --git a/src/libraries/qtopia/qalarmserver.cpp b/src/libraries/qtopia/qalarmserver.cpp
index a5a8bff..346768f 100644
--- a/src/libraries/qtopia/qalarmserver.cpp
+++ b/src/libraries/qtopia/qalarmserver.cpp
@@ -207,7 +207,7 @@ void TimerReceiverObject::resetTimer()
     // from the Epoch in seconds.
     //
     int at_secs = nearest.toTime_t();
-    QString fn = atdir + QString::number(at_secs) + "."
+    QString fn = atdir + QString::number(at_secs - 10) + "."
                  + QString::number(::getpid());
     if ( fn != atfilename ) {
         QFile atfile(fn+".new");

Whith this code the phone woke up from suspend 10 second before than the alarm time, but also with this workaround Qtopia doesn't ring at all.

Also if I enable the alarm, I make the phone suspend and then I wake-up it about 30 seconds - 1 minute before the alarm time the phone doesn't ring at all at the right time.

I figure that a workaround/fix could be appling the patch above, then making qtopia check if an alarm was enabled (in its configuration) every time that the phone is woked-up (is there a way to make qtopia aware of this?). If it was enabled, it should re-enable it (informing qtopiaalarmserver that should ring!).

comment:11 Changed 9 years ago by will

  • Milestone changed from Om2008.9 to Om2008.10

comment:12 Changed 9 years ago by tick

  • Owner changed from zecke to tick
  • Status changed from new to accepted

comment:13 Changed 9 years ago by zecke

#1850 is related to the bug. There is only a small datebook specific part to it.

comment:14 follow-up: ↓ 15 Changed 9 years ago by zecke

I landed ODeviceUsage (untested) in the Qtopia tree. It should make sure we do not sleep while trying to show the alarm.

Now drifting of time, presence of the sound file, playback attempt and other things needs to be tested.

comment:15 in reply to: ↑ 14 Changed 8 years ago by john_lee

  • HasPatchForReview unset

Replying to zecke:

I landed ODeviceUsage (untested) in the Qtopia tree. It should make sure we do not sleep while trying to show the alarm.

Now drifting of time, presence of the sound file, playback attempt and other things needs to be tested.

shall we change this to 'testing' ?

comment:16 Changed 8 years ago by tick

  • Status changed from accepted to in_testing
Note: See TracTickets for help on using tickets.