10-21-2020, 07:12 AM
(10-21-2020, 03:43 AM)Kawayuppie Wrote:(07-24-2020, 09:33 PM)scott_VYuCAbn3k1NFK Wrote: The alarm doesn't wake the phone for me, if I set the alarm for more than the sleep time, it only goes off when I wake the phone manually.
I have been thinking about this. I think the "Clock app" will need to be modified to set a timer interrupt or similar so as to wake the phone in time to sound the alarm.
Preliminary testing using "rtcwake" does work a treat.
To test, set the alarm for some time, say a couple hours later, to be sure the pinephone is nicely asleep when the alarm is supposed to sound.
The set "rtcwake";
Code:
sudo rtcwake -m no -l -t "$(date -d 'today 16:00:00' '+%s')"
where -m no means dont suspend/sleep now, -l means local time, -t the time and date string when to wake up.
Note: kernel time needs to be same as local time, in the above example, or you will need to work out the difference.
Check this with;
Code:
sudo hwclock -r
Next steps will be to see if it will be possible to change the clock code or write a new clock program. Will be interesting how to handle multiple alarms.