PINE64
Is there a smart-wake yet? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: Is there a smart-wake yet? (/showthread.php?tid=17757)



Is there a smart-wake yet? - DrPlamsa - 12-28-2022

Hello all!

I've been fiddling with the PP on and off since September 2020, and all in all it's been a great learning experience. Very empowering for folks like me who like to imagine a better way for smartphones to be.

I've found that what was holding back my use of the PP for a daily driver was a lack of a smart-wake. I had to choose between poor battery life (handset on, not suspended) or no notifications (suspended). I am aware that the phone can wake from suspend upon incoming call or text, a feature called crust. This is great but, as of the last time I checked, did not work for arbitrary push notifications such as emails, chats, or timers. 

In summer of 2021 I hacked together a solution which wakes the PP up for one minute out of every 15 or so to check for notifications. It works fine (really saves on battery), but isn't well-integrated or well-supported. Here's the thread: https://forum.pine64.org/showthread.php?tid=14564

So, do we have this feature yet? Last time I was actively following development was around 7 months ago.

Thanks all!


RE: Is there a smart-wake yet? - treebeard - 12-28-2022

The phone will wake on incoming SMS/MMS.  I think the closest you can get right now timer-wise is the "community" modem firmware has some capability to wake the phone at specified times.  Waking on incoming email seems like a tough ask.  It seems like your email provider would need a way to ask your cell provider to wake you.  Maybe your email could be rigged to send you an SMS under certain conditions?

Edit 1: on second thought, maybe by "chats" you meant IRC/matrix/xmpp etc. Then I think it would be similar to the incoming email problem.


RE: Is there a smart-wake yet? - DrPlamsa - 12-29-2022

Thank you @treebeard! I'll continue using my solution then, which just wakes the phone for 1 minute out of every 15 when in suspend mode. That should be a good balance between battery life and immediacy of notifications.


RE: Is there a smart-wake yet? - jsch - 12-30-2022

https://github.com/cparich/sleepwalk2 was mentioned on #mobian:matrix.org


RE: Is there a smart-wake yet? - DrPlamsa - 12-30-2022

(12-30-2022, 01:15 AM)jsch Wrote: https://github.com/cparich/sleepwalk2 was mentioned on #mobian:matrix.org

Really fantastic resource! Thanks a bunch @jsch. I'll give it a try.


RE: Is there a smart-wake yet? - treebeard - 12-30-2022

(12-29-2022, 10:46 AM)DrPlamsa Wrote: Thank you @treebeard! I'll continue using my solution then, which just wakes the phone for 1 minute out of every 15 when in suspend mode. That should be a good balance between battery life and immediacy of notifications.

I should have read that old thread before responding - that's a nice bit of hackery.  I suspect it's possible to add timers & services to the modem's community firmware to periodically check for email etc and wake the phone accordingly.  That would stretch battery life further and could provide more immediacy but would certainly be a bit more work.  It seems like an interesting challenge.


RE: Is there a smart-wake yet? - DrPlamsa - 12-31-2022

Ok, I'll close this out with a summary. No well-integrated, complete solution exists, but many partials are available. I'm surprised that there's been so little apparent effort, as without it you have to choose between either a 2 hr battery life or limiting yourself to only call and SMS notifications.

A proof of concept for waking the phone using systemd timers is here: https://gitlab.gnome.org/kailueke/wake-mobile
Inspired by this, I put together a solution which wakes the phone for 1 minute out of every 15 here: https://forum.pine64.org/showthread.php?tid=14564
Here's an abandoned-looking attempt for PmOS: https://gitlab.com/seath1/waked
Another abandoned-looking attempt: https://github.com/vkraven/rtcsyncwake-pinephone
A script called "sleepwalk" is available from this guy's github which does something similar: https://github.com/milky-sway/pinephone-scripts
And finally, this is a refined version of "sleepwalk": https://github.com/cparich/sleepwalk2