Power optimisations for a pocket computer?

After a few years of experimenting with Linux smartphones (Pinephone and Librem 5, each running various distros over that time) I’ve come to the conclusion that calling and texting (SMS & MMS) aren’t now and may not for a long time be reliable enough for me to use a Linux phone as my daily driver. While this makes me sad, I’m not interested in hashing out the various reasons for this or being persuaded to give it another try (for now, anyway). Instead I’m considering getting a basic feature phone for calling and texting, and using my Librem 5 as a pocket computer for everything else.

My question is what can I do to improve battery life given the situation described above? I understand I can’t uninstall Calls or Chatty since they’re deeply integrated into Phosh, but I assume if I can disable all services/daemons related to calls and messages I should be able to reduce the device’s power consumption and get more battery life out of it.

For the record, right now I’m running Mobian since PureOS Crimson is in limbo and I really wanted the newer versions of Phosh, etc., but the battery life isn’t dramatically worse than in Byzantium. Here’s what I’ve done so far:

The first thing I did of course is to turn off the hardware kill switch for the modem. I couldn’t figure out how to disable the daemons for Calls & Chatty (they show up in Htop, but I don’t see them listed as services in systemctl), so I just moved the binaries for those two plus callaudiod and mmsdtng out of usr/bin and rebooted, and they’re no longer showing up in Htop.I also moved ModemManager out of usr/sbin for the same reason (I saved all of these in my home directory in case I need to put them back).

Does anyone have any recommendations for other things I might disable or uninstall? I seem to recall that even in suspend one of the cores is still running to watch for incoming calls/messages. Is there any way to disable this so I can get more of a true suspend experience in terms of saving power? Or anything else I might try? Any advice from those who understand more about what’s going on “under the hood” would be much appreciated, thanks!

3 Likes

Get a power bank and tether it to the Librem 5.

One of the most power consuming parts of any mobile device, after modems, is the screen. You can set it’s brightness a little lower (in stead of full) and adjust the slider depending on your lighting conditions. You can also set your screen shutoff timers tight.

2 Likes

It wasn’t clear to me whether you still want to use mobile data. I wouldn’t necessarily attack ModemManager if you do still want mobile data. On the other hand, if you don’t want mobile data then you can in principle completely remove the modem card (with care!).

I don’t know about that but would that still be true if the cellular modem kill switch is in the OFF position? You can’t exactly watch for anything incoming if there is no modem to watch!

1 Like

Thanks @irvinewade . For now I’m just using it on wifi, but I may get a SIM card with a data plan at some point (it would certainly be more useful that way!).

As far as a core running during suspend, my concern is that it might still be turned on even if there’s nothing for it to listen to. But I don’t really know, so I’m hoping someone who understands suspend in mobile Linux might be able shed some light on the matter.

1 Like

I wrote about it elsewhere on the forums, but what I do with my L5 is this:

  • buy a bunch of extra L5 batteries from Purism
  • buy a bunch of cheap $10 Kastar universal chargers from online shopping, compatible with those batteries
  • buy a 3D print of the librem5 backplate that is more easily removable and doesnt tear after months of removing it daily (from some online 3D print fabricator, using the public/open Librem 5 designs from Putism)

After doing this, I have infinite battery. All the Androids are put to shame and I never have to charge my phone; instead I do a battery rotation process:

  • connect Librem 5 to charger
  • remove backplate
  • remove L5 battery while device is still on
  • unplug cheap universal charger
  • remove battery from charger
  • place charged battery from charger quickly in L5 (battery % in corner of screen shows low or half)
  • unplug L5 from power (L5 battery then jumps to showing actual %, which is now 90% again or whatever)
  • place old L5 battery on charger for later

The charges will charge more slowly than the L5 does on the same battery, probably to prevent any heat or issues. But if I have many chargers going in this way and rotate which one to use, I have infinite L5 energy as long as I switch every so often.

For me local time it is 4 PM. I am in an airport terminal writing this. In the morning I put in the current battery probably at 10am or so. Now that it’s been 5 hrs, I’m reaching 40% power, so that’s probably a good time for another battery swap.

But I have pseudo infinite L5 energy on my trip because it’s only about 9 or 10 hours until I get to where I’m going, and I have 4 more batteries which probably each have another 5 hours in them, or slightly less if I use the phone more - but it’s generally way overshot. Maybe in the airport I will battery swap without a wall adapter, which requires turning my phone off to take out the battery, but that’s fine for my use case.

For my cellular provider, I am riding the coattails of my life as a former Android user. My SIM card is from Google Fi, and was registered with some dead Android phone, and they still think that other phone is what I’m using so they let me data and text as much as I want on here on the L5. MMS is not working, so I have a browser cookie on the L5 that can pull up the Google Messages for Web, which has a duplicate of all my texts and messages, so I can do calling and texting from any (javascript enabled) browser. In practice, for a better calling experience, I usually make important calls with a laptop.

For me these together solve most of my issues, so I am going around with basically stock Byzantium as my phone. I masked the avahi service(s) because for my use cases its a waste of energy to always tell nearby devices on wifi about my device. I also disabled wifi mode in geoclue, which based on my rough estimation of trying to monitor we traffic, might have disabled the L5 from otherwise uploading the name of all nearby wifi access points and cell towers coupled with my device IP to an online service, sometimes as frequently as maybe every 5 seconds, at the discretion of geoclue which is installed (by 3 letter agencies?) on all linux distros by default or whatever. Of course, disabling this technology means my device may have a much poorer understanding of where I am on a map, because I would be constrained to 25 year-old one-way incoming GPS to determine where I am on a map, whereas for Android and iOS the location they provide can be much more accurate because it is two-way, sending identifiers of the device to the online service that sends back where you are using a singular understanding of the location of all devices, instead of GPS triangulation.

So, my intuition is that disabling that part of geoclue might save me some battery. I have frequented the same places often enough, and been a passenger in other cars often enough, that I did not myself bother to use my Librem 5 for maps and navigation almost at all.

But also, the “wifi” based two-way online service to find your location “better than GPS” was also shut down after some people talked about it on purism forums and listed how to disable it. So, what happens in your newer phosh? Is it off by default? Submitting all your personal info to a dead endpoint every 5 sec? I have no idea.

A lot of things like avahi that I personally decided are dumb for my uses, and that I turned off, are findable by using basic networking software tools for Linux to ask our device what it is doing, like ss or netstat or tcpdump or wireshark.

3 Likes

I’m back after reboot, with 99% battery life after typing that previous post here in the airport on my L5:

As another note - as you may see here - I consider my HKS’es to be ON switches not OFF switches. I turn all of them off, and then if I want something, I only turn on the switch for what I want.

It is entirely possible that this “on switch” style of use contributes to my battery life also. So for example, we know none of my energy is currently going to WiFi, nor to mic/camera, in any way. When I finish writing this post I will probably kill modem for a while.

Obviously if somebody was going out of their way to be easy to contact, keeping the modem on all the time, that would likely use more battery.

2 Likes