I am curious what fundamentally makes power management so difficult these days.
I know some of the effort is just inadequate driver support - the various modes can't be turned on properly because they're locked behind proprietary blobs which need to be reverse engineered.
But is their something else? What's the pathology that leads to issues in software?
There's no pathology, it's just really really hard. Any single component not sleeping properly and keeping the CPU, buses or radios active immediately ruins the battery life for everyone.
Power saving is all about racing towards that sweet idle state where every chip is clocked down and nothing radiates.
Which means that good power saving requires full vetting of every process on the system and making sure they all cooperate or, at least, are forced to sleep.
Android needed years to get into that state and developers/hackers are still sour about the restrictions it puts on them to keep battery life in check.
> Android needed years to get into that state and developers/hackers are still sour about the restrictions it puts on them to keep battery life in check.
True. In my experience, many desktop applications do not care about minimizing idle cycles or network activity. So you end up with your radios always active, or some persistent CPU activity. For example, if one were to use Element Desktop, Signal Desktop and Discord simultaneously on PPP (all electron apps), we're looking at ~20% CPU utilization, idle!
I always wondered what exactly it is that Electron apps are doing to use that much CPU when they're sitting in the background doing nothing, often not even being on screen. For something like chat I guess it could be polling (surely sockets are more popular now?), but it's not uncommon to see this behavior even in completely offline Electron apps. It seems like they're never truly idle.
I don't know, but I hope the efforts to drive application-level power management somehow lead to power management improvements when using gnome on a laptop as well.
For reference, macOS introduced some APIs intended to improve power management around 2016 when the fanless usb-c MacBook Air came out.
On the software side of things, for something like decade now macOS has also surfaced which programs are egregiously power hungry to the user. The most visible way is in the battery menubar item, and in the most extreme cases it'll even show a notification. Similarly Safari tells users when sites are being too voracious.
I think this sort of thing is probably more effective than many believe at helping curb lackadaisical attitudes towards resource consumption among devs, with how it turns users into squeaky wheels.
The power management model in phones is just radically different than desktops. Android can get a lot of battery life by suspending applications and tightly controlling application resource usage.
I know some of the effort is just inadequate driver support - the various modes can't be turned on properly because they're locked behind proprietary blobs which need to be reverse engineered.
But is their something else? What's the pathology that leads to issues in software?