Battery saving tips/tricks

I have an old thinkpad x230 (i5 2013 cpu or something, and a 180gb SSD) small FreeBSD install, with wayland/sway that oftentimes use to open librewolf or waterfox browser and read pdf from the internet.There is a blank screensaver after 5 minutes. Battery life with a new OEM 48000mWh battery is around 3 hours. How can i extend the battery life? Where are the main energy consumptions of the system? The base of the laptop is somewhat hot while i am literally doing nothing on the system.

PS: im baffled that a smartphone can go all day while laptop has only 3 hours battery time.
 
The display is the biggest battery drain. backlight(8) lets you control the backlight.

You can set the power profile with powerd(8). Edit powerd_enable and powerd_flags in /etc/rc.conf. See rc.conf(5).

andpm(4) or intpm(4) may be helpful.
 
In general since everything you do with the machine uses energy, there are two kind of things you need to discriminate:
1. Things you could do with less energy consumption.
Examples: Do you need a large DE? Do you need to do all compilation work everytime on this machine, or can it be done later, or outsourced to another machine? Reconsider your work style habits, and if you can change things, or not, like e.g. you run a browser with lots of add-ons, and many tabs open.
2. Find things consuming energy, but you don't use/need. E.g. is the camera switched off? Classic was Bluetooth. If you don't use it, switch it off in BIOS. This thing really sucks energy. So do W-LAN. Better was to attach your machine with a cable to your LAN.
(I use my laptop only for when I travel, and then almost always wire bound.)
Also GPS is a real juice sucker, which of course more concerns smarthphones.
You have to examine your machine: What you can strip down.

Anyway, every battery ages. After a couple of years it will not provide its nominal capacity anymore.
This was a point to run your machine on battery only if you must, but try to run it primarily on net power.
If you cannot do this, or don't want do it,
Since almost all today's machines have a built in battery you cannot replace, you either have to buy some external battery you can power your machine from like it was plugged to the net (don't know if there was any for latops like you get such for smartphones, and tablets), or you have to live with shorter battery powered usage time, or you need to buy a new one, looking for one with more battery capacitiy, and lower consumption (e.g. no fancy GPU, a 1.8GHz dual core instead a 4GHz eight core etc.)
 
There was a time about a decade ago when I was obsessing about reducing energy consumption of my laptop (because I wanted it to run on solar energy only). After applying what jwillia3 and Maturin mentioned (that should be the biggest objectives before anything else), I went the last mile by declaring war on bloat.

As Maturin justly put it, "everything you do with the machine uses energy". And "modern" software loves to do *a lot* of things. Standardizing on the simpler variants (i3 instead of Gnome or Plasma, CLI apps instead of web apps, UNIX tools instead of the last trendy tool, etc), you gain on simplicity, which translates to gain on performances, which translates to gain on energy.

And then, the next big step on debloating is to write your own software. Most programs you use to solve one of your problems has been written to solve dozens of other problems you don't have. This has a cost in energy. If you can write a program that solves the single one problem you have, it is usually a big win (for many reasons, including energy saving).

And finally, there is something to say about daemons. Daemons, even idling, consume RAM and CPU cycles, which consumes energy, and this adds up. Maybe instead of having ten programs running in the background, you could have only crond, calling the programs you need every now and then. Maybe instead of having 10 webapp backends running and waiting for connections, you could have one httpd daemon running and running CGI programs, existing only for the time they process a request. You probably have your own preferences regarding infrastructure and software architecture, but systematically asking yourself "how much energy is this going to consume?" is a good mindset to have. Also, wattmeters rock, but that's an other story. ^^
 
The base of the laptop is somewhat hot while i am literally doing nothing on the system.
This is an old machine, it is probably running hotter than it should due to thermal paste age. If you are comfortable opening it up, you could replace the thermal paste with fresh, and see if the temperature goes down. Lower temperature - less need for cooling, less energy spent.
 
I have an old thinkpad x230 (i5 2013 cpu or something, and a 180gb SSD) small FreeBSD install, with wayland/sway that oftentimes use to open librewolf or waterfox browser and read pdf from the internet.There is a blank screensaver after 5 minutes. Battery life with a new OEM 48000mWh battery is around 3 hours. How can i extend the battery life? Where are the main energy consumptions of the system? The base of the laptop is somewhat hot while i am literally doing nothing on the system.
Go into the bios and configure all the power options for "maximum battery life" when running on battery. That will probably run your cpu at 800 MHz all the time, but you should get longer battery life. There is also some freebsd tuning you can do, see https://wiki.freebsd.org/TuningPowerConsumption, though I don't know how much of that is still current in 15.0. Another trick is to reduce your screen brightness down to the minimum you need, the backlight chews up quite a lof ot power if you have the brightness turned up. As well as renewing thermal paste, try vacuuming the fan, just take the back off and run a vacuum cleaner nozzle on low suction over the fan to suck out the dust and improve airflow, if it hasn't been cleaned for a long time it might be clogged up with dust; in fact it's a good idea to try that before renewing the paste itself.

On linux you can run 'powertop' which will give you some idea of what in the system is chewing up the power, unfortunately I don't think there is a freebsd port of powertop available.
 
PS: im baffled that a smartphone can go all day while laptop has only 3 hours battery time.
Completely different CPU and machine architectures, optimised for different types of devices. Yes the phone's ARM chip will run all day, but just try compiling some code on it and see how it compares to your laptop's performance. You might as well say "it compiles in 3 minutes on the laptop, so why does it take half an hour on the phone?" I am only slightly exaggerating the performance difference...

And then you might say "why can't I have the best of both worlds, good performance AND long battery life" ... step forward the Apple M-series chips, Qualcomm Snapdragon-X, and some of Intel's latest mobile processors (cough). None of which are in your thinkpad X230.
 
Back
Top