Pilotlight, a way to save power during long audio playback
#1
keeping the pilotlight lit, normally when listening to an audiobook or music playlist the Pinephone locks it's screen after a minute and suspends the OS after a few more minutes as set by the user.
This suspend action makes it possible to carry a pinephone all day ready ro receive incoming telephone calls and still have battery if the phone is not used for more than 45min to an hour a day.
Every time the system suspends the audio stream is killed, even after wakeup most of the time the audio playback app needs to be killed and restarted for it to output audio.
I want a way to keep a tightly controlled and minimized audio app running while using minimal CPU waste power, and without the bloat of the system processes.
I only want the pilotlight lit, not the whole furnace.

I have several ideas that might be able to be implemented with only scripts, but I will need a LOT of help making this work if I run into bugs.
The idea works like this:
1- when an audio app is running we get the audio pause/skip controls on the lockscreen, there are already processes which load when audio is started
2- when audio mode is detected a special suspend mode is activated or enabled
   A- an exception is made to the suspend mode script, perhaps an alternate suspend mode
       a- the process running the audio is moved to one awake cpu core and the lowest voltage and mhz possible is engaged, only enough to allow for the audio stream to continue
       b- if possible audio is buffered into hardware audio acceleration chip and even the audio app CPU is suspended until 10-20 sec before the buffer runs out,
       c- buffer refills, suspend special audio process, repeating
    B- when system is taken out of suspend the audio app and special settings for single CPU are ended

An alternative would be to add an audio buffer playback system to the programs running on the modem module, perhaps a virtual serial audio device fed over the data connection line.  The modem module has its own Android based no-GUI OS, memory, and CPU, it is always awake and waiting for incoming calls and texts, which results in it sending a de-suspend command to the Pinephone, as running its own OS processes.

Currently unless there is USB power in the Pinephone pro can get at most around two hours of audio playback even though the the screen is dark and locked as all processes continue to run at full power.
  Reply
#2
This article goes into how Maemo Linux (Nokia N900 and N9 Linux phones) vs android do power management.
https://felipec.wordpress.com/2012/01/04...s-dynamic/
we have an excellent operating system to crib hints from in Maemo, a fully Debian based pre-systemd gnu-linux OS, we can also learn from Jolla/Sailfish which is a linux phone company and OS started by foremer Nokia/Maemo team members as well as Maemo community members..
https://wiki.maemo.org/N900_Software_Power_management
http://maemo.org/community/maemo-users/p...anagement/
https://wiki.maemo.org/Documentation/Mae...Management
https://wiki.maemo.org/Make_your_battery_last_longer
Some of these are common sense though the Maemo team worked hard on dynamic scaling, verifying power usage of system programs, and generally keeping power waste to a minimum, to the point where dimming the screen and limiting Bluetooth, Wifi, nd modem made a big difference on battery life for a N900 user.
  Reply
#3
(01-09-2025, 03:33 PM)biketool Wrote: Some of these are common sense though the Maemo team worked hard on dynamic scaling, verifying power usage of system programs, and generally keeping power waste to a minimum, to the point where dimming the screen and limiting Bluetooth, Wifi, nd modem made a big difference on battery life for a N900 user.

Thank you! I am always looking for better ways to save battery life.
In Phosh, the standard settings will only let me set the screen timeout to 60 seconds. I found the gsettings and I set it to 30 seconds.

Code:
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 30
  Reply
#4
(01-09-2025, 04:02 PM)mikehenson Wrote: gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 30
[/code]

Nice, we need a new page on the wiki for power tweaks like this.
But the most important things are getting CPU scaling optimized beyond Debian AMD64 Laptop standard settings and universal use of video and audio hardware acceleration(setting up a hardware abstraction layer like the N900 had to force HW acceleration use); the hardware tools are already present for an Android equivalent or better power budgeting.  Once we are exploiting the hardware we have paid for as a standard in the mobile OSs these user level power budgeting tweaks will pay off, we know an Android user could get at least 8-12 hours of screen-on games and web browsing where we can get 45-75minutes to a dead battery,we can even get this on 12 year old hardware.
(edit)
more especially DSP(hardware multimedia acceleration)
https://wiki.maemo.org/Smartreflex
https://wiki.maemo.org/Documentation/Mae...dia_Domain
https://code.google.com/archive/p/gst-dsp
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with audio via bluetooth connect to car zkajdan 1 1,489 06-18-2024, 12:51 AM
Last Post: qcomment
Lightbulb Article: Experiments for super low PinePhone power consumption with Genode Surehand53 1 2,606 12-27-2022, 02:21 PM
Last Post: Samurai_Crow
  Most Power Efficient OS Image jwinarske 0 1,081 07-05-2022, 07:05 PM
Last Post: jwinarske
  Keyboard Case Power Management Daemon estokes 2 2,690 04-16-2022, 04:15 PM
Last Post: estokes
  No call audio despite confirmed capability GrapeJuice 1 1,815 02-07-2022, 05:19 PM
Last Post: gab
  Diagnosing power usage with ZZZtop biketool 1 2,203 10-21-2021, 01:23 PM
Last Post: tllim
  Reviewing our Forebearer's Work re:Power Consumption biketool 0 1,390 10-20-2021, 09:51 AM
Last Post: biketool
  Phosh - config within Settings does not save after reboot antitheos 0 1,736 09-24-2021, 04:30 PM
Last Post: antitheos
  PSA: WiFi driver is broken - Unload kernel module to save lots of power Trbl 3 4,811 06-23-2021, 02:28 AM
Last Post: Merc
Music Running textbased spotify client with a spotify daemon for native playback yeold 0 3,493 02-12-2021, 04:48 AM
Last Post: yeold

Forum Jump:


Users browsing this thread: 4 Guest(s)