this post was submitted on 06 Sep 2023
20 points (100.0% liked)

Android

9348 readers
1 users here now

A place to discuss anything related to Android or Android adjacent.


INFO:


Check Out Our Partner Communities:

!android@lemmy.world

founded 4 years ago
MODERATORS
 

How does sleep really work in the Android kernel?

I've been wondering about this for a while, but couldn't find anything about it. What exactly happens after the screen turns off? Does the kernel actually suspend and halt the CPU? If so, how are notifications received while sleeping? Is there a coprocessor involved?

I'm curious. It would be great if someone could point me towards some articles or videos about this.

@android@lemmy.ml @android@lemmy.world @android@lemdro.id @android@kbin.social #android #linux #kernel #sleep #suspend

you are viewing a single comment's thread
view the rest of the comments
[–] fell@ma.fellr.net 2 points 1 year ago (3 children)

@Lojcs You think so? It must do something on the hardware level. If you install something like @postmarketos and let the deivce just sit doing nothing with its screen off, the battery doesn't last nearly as long as with Android. There must be some trickery going on...

[–] Melody@lemmy.one 9 points 1 year ago

Your mobile device cannot sleep like your desktop can.

It can however, sleep it's own way. Typically this involves CPU throttling. Android does enter a "Deep Sleep" state, minimizing all power consumption, and even switching it's CPU to a completely idle state where it only periodically "wakes" to handle synchronization and other needed tasks.

https://developer.android.com/training/monitoring-device-state/doze-standby

[–] ReversalHatchery@beehaw.org 2 points 1 year ago

Earlier I've read that it only keeps a single CPU core as active, at least for most of the time sleeping. But take this with a grain of salt, it was long ago so I may misremembered it, and also it might have changed a lot since then, but afaik this was a technique they once used (and may still do)

Hi there! Your text contains links to other Lemmy communities, here are correct links for Lemmy users: !postmarketos@lemmy.ml