8 ms·
> core features of a modern smartphone: consistent alarms For me personally, this is one thing missing from a modern smartphone. Many old-school GSM phones, wh
by nousermane 4y ago
> core features of a modern smartphone: consistent alarms
For me personally, this is one thing missing from a modern smartphone. Many old-school GSM phones, when completely turned off (but battery still inside), if there is an alarm programmed, will turn on automatically few seconds before the programmed alarm, just in time to sound on the dot.
Very useful, and exactly what I want, when I go to sleep. You can sort of approximate that with "do not disturb" mode, but that drains a bit of battery (and traffic in cell data plan) uselessly.
- bestouff 4y agoDid you know that this works on some modern smartphones ? At least my OnePlus 7TPro does wake up from an alarm when it's totally powered down.
- victornomad 4y agoIn my experience, this feature is common on Chinese android phones, but not on Pixel, Samsung, Sony...
- Grazester 4y agoI dont want my phone waking up no matter what when I power it down. I powered it down because I want it down.
- phh 4y agoMost smartphones do that, it's part of all SoC vendors' base code. However Google Pixels don't do that (which leads to no standard Android API available for that...)
- nequo 4y ago> You can sort of approximate that with "do not disturb" mode, but that drains a bit of battery (and traffic in cell data plan) uselessly. Airplane mode helps too I find.
- samuell 4y agoYep. Is what I always do now.
- megous 4y agoThis works on pinephone and pinephone pro, too. On Pinephone, the RTC(has alarm support) is in the SoC and is always powered by PMIC even when the phone is off. PMIC can be configured to power up on interrupt signal, and SoC can be configured to pulldown the interrupt line on RTC alarm. On Pro RTC is inside PMIC directly. HW can do it. Alarm app just has to use the HW correctly.
- julienpalard 4y agoTrue. There's a demo prooving it: https://wiki.mobian-project.org/doku.php?id=wake-mobile https://wiki.mobian-project.org/doku.php?id=wake-mobile (Tested on my PinePhone on Mobian: it works!)
- megous 4y agoYep, all the alarm clock program really needs to do for this to work, is to setup a timerfd with CLOCK_REALTIME_ALARM flag set. Then timer firing will wake the system. That's pretty much it. Standard Linux feature across all systems that support system suspend and RTC wakeup. man timerfd_create
- Arnavion 4y agoAnd for non-systemd systems like postmarketOS, there's waked that writes directly to the RTC dev node directly for the same effect. pmos also patches gnome-clocks to use waked.
- megous 4y agoThat's an "interesting" solution, since exactly what waked does is already done by kernel internally if you use timerfd, without the need for any special daemon. Any app that wants to be woken up at certain time can just register a timer for that time with the kernel. I wonder if waked writing directly to RTC doesn't break the kernel alarm functionality used by timerfd, but hopefully not https://gitlab.com/seath1/waked/-/blob/master/src/main.cpp#L39 https://gitlab.com/seath1/waked/-/blob/master/src/main.cpp#L... But why not, it's FOSS. :)
- BrandoElFollito 4y agoThis is the case for Xiaomi and I think for Samsung (I use both)
- londons_explore 4y agoI'm pretty sure the chipsets in a modern phone still support waking up at a given time even from 'off' state. Just no OS exposes an API allowing that to userspace.