Hacker News new | ask | show | jobs
by jokoon 1467 days ago
Why is battery life such a difficult thing to achieve? Is it hard to implement in a driver? Or is the battery just low quality?

I've heard energy management is often difficult to do right in Linux, but I just wonder why...

2 comments

As I understand it mobile OS’s have to wake up as little as possible and then race to sleep, because with everything lit up the battery drains quickly. They batch work from different processes together to avoid waking up hardware. For example, background network operations from different processes are grouped together to avoid turning on the modem too often. iOS is better at this than android (at the expense of developer flexibility), and android is better at it than more obscure mobile OS’s.
Oh ok, that's more clear.

So it happens at a higher level, in application management etc...

And then, why aren't those pinephone OS doing it better?

Because nobody invested half a billion dollars in development.
Some are doing it better, some are doing it worse. There are Pinephone supporting distributions that use suspend to RAM aggressively, using autosleep and wakelocks, and all this Linux stuff Android uses too. You're just assuming somthing that's not true in your question.
What do you mean by battery life? That's just usually a function of temperature, number of charge cycles, not overharging, etc. And the battery will last you for a long time. Ceratinly for a few years.
They mean how long a battery lasts until depletion, not how long it lasts until it's no longer functional.
Then, that's a function of device's power consumption, which is a function of many factors, which includes user behavior, too. It only makes to sense to talk about it with a particular usage in mind and not in general.

You can have Pinephone suspended for 7 days if you like, under certain circumstances. Or you can drain it 2.5h if you mean to compile Gentoo on it. And completely different SW optimizations would come into play depending on the scenario.

"Battery life" usually means how long will battery last, before you need to replace it.

> "Battery life" usually means how long will battery last, before you need to replace it.

No, it does not. "Battery life" means how long the device lasts on a fully charged battery before it needs recharging.

What you were thinking of is called "battery lifespan" or sometimes "battery longevity", or even "battery cycles".

People mean battery life for typical use, not putting your phone in a deep freezer or running a file server for your dorm.
Typical use for me is to touch my phone (not pp) once every 20 days to put it on the charger and don't toy with it or call at all, just receive an odd SMS or two for 2fa bank access.

If you'll play a game, it will matter whether the game consumes 30% or 290% of CPU time. It will matter if you use the phone mostly indoor, or outdoor, because backlight is a major power sink. It will matter if you need wifi or mobile internet, or whether your usecase is mostly uploading or downloading data, how much screen on time you'll want,...

It's nonsensical to ask for how long will phone run on a single charge without specifying what you'll be doing with it, because it can be anywhere between 7 days and 2-3 hours.

There's no such thing as a typical use.