05-24-2022, 08:21 AM
Text messages are a bit different - the modem wakes the phone when they are received, so there's no need to poll. Periodic wakes have nothing to do with tow-boot (or any other bootloader) AFAIK, since the system is already booted. Wakes on RTC time can be scheduled, but mostly aren't at the moment. Something in the suspend process needs to be aware of when the phone next needs to wake (for alarm, polling stuff or whatever) and set the next wake time before the suspend happens. Once woken anything that needs to poll actually needs to do so without undue delay, while avoiding slowing things down if the phone has woken for a phone call, so there needs to be some awareness of the wake reason. Finally the suspending daemon needs to be aware of this and suspend again quickly once everything has been polled rather than waiting for a normal suspend timeout. So far as I know we have no APIs for any of this, or daemons that implement it.
https://gitlab.gnome.org/kailueke/wake-mobile is a proof of concept for the RTC wakes, and Birdie has taken the idea a bit further.
PmOS has an experimental daemon that can be used to schedule wakes, and patches to gnome-clocks so that wakes get set for alarms.
https://gitlab.com/seath1/waked
https://git.alpinelinux.org/aports/tree/...s?h=master
https://github.com/vkraven/rtcsyncwake-pinephone is something broadly similar with a kde leaning.
It's possible one of these could form the basis of something more general, but this will need work convincing various upstream projects to go with it if it's to be of any real use. You're either going to need apps to be aware of the API, or have a way that a separate daemon can prod them to poll, and be notified when they're done.
https://gitlab.gnome.org/kailueke/wake-mobile is a proof of concept for the RTC wakes, and Birdie has taken the idea a bit further.
PmOS has an experimental daemon that can be used to schedule wakes, and patches to gnome-clocks so that wakes get set for alarms.
https://gitlab.com/seath1/waked
https://git.alpinelinux.org/aports/tree/...s?h=master
https://github.com/vkraven/rtcsyncwake-pinephone is something broadly similar with a kde leaning.
It's possible one of these could form the basis of something more general, but this will need work convincing various upstream projects to go with it if it's to be of any real use. You're either going to need apps to be aware of the API, or have a way that a separate daemon can prod them to poll, and be notified when they're done.