Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
I’m a MacBook user and I’ve been very happy with AlDente. It took some reading to understand all the features but I really believe it’s made a difference in the health of my battery.
Thanks for sharing. Now I know why my battery never charges over 80% unless I force it
When connected to the outlet it will be running solely on outlet power just by default, you don't need to do anything specific.
Edit: Now that I re-read this OP, it sounds more like you want to stop the battery from charging when connected to AC.
That’s… not true.
It will still run through the converters and boards inside the laptop since it runs on DC and the power from the outlet is AC. Depending on how it’s setup, the current very well could go through the battery instead of bypassing it before it reaches the laptop from the converters.
Basically you don’t know unless you try. Some laptops work when you remove the battery and some don’t. Just like phones or any other electronic.
Current can't go through a battery, only in or out.
When connected to AC it will be running off AC, and also charging the battery.
That's not entirely true. A battery can definitely be part of a running circuit and current definitely goes through it, otherwise it wouldn't be usable.
It can be part of a circuit, but charge either goes in or comes out, it can't do both at the same time.
I'm sorry but you're mixing concepts. Electrical charge: measured in Coulombs, physicaly either electrons or gaps. Current: movement of electrical charge. Battery charge: chemical capacity to generate a voltage differential. Voltage differential: the potential energy difference that pushes charges through a circuit.
Electrical charges need to move through a battery for it to do useful work. If the battery is causing the movement (current), it is depleting its chemical charge. If the battery is not pushing the electrons, it's likely being chemically charged (the complexities of which are beyond a lemmy comment). In both cases, the battery is part of the circuit that is conducting electrical charge. If there are no parallel paths and you remove the battery, the circuit ceases to exist and so does the current.
It's also going to charge the battery.
Some laptops allow for controlling level kf charge. For example I keep my battery at 65% to prolong its life. If its supported, you should be able to set it through /sys/class/power_supply/bat0/charge_level
~~i dont rember file name and path exactly but shouldnlook like this~~
Edit: Correct filename is /sys/class/power_supply/BAT0/charge_control_end_threshold
I do the same. My laptop had a weird bug where it would reset that value to 100 every reboot, so I made a systemd service to write it at every boot.
my laptop does reset it every reboot.
If you are using KDE, you can just use KDE's battery manager to set it there.
otherwise, your solution is good too.
Even in KDEs battery manager, I was having the same issue.
Correct, but the laptop will be running off AC.
But the concern is about the battery, so that's kinda moot.
You are not wasting charge cycles by leaving the battery plugged in. it is not being held at optimal charge for storage but it will last a lot longer plugged in.
It would be the worlds stupidest engineer that would design a power circuit attached to a potential class d fire hazard that had access from anything other that possibly contact pads on the controller itself. If i were a bad actor and the os has a way to access the charging circuit i would firebomb your house by telling the controller the battery is empty and have it over charge. This would be bad.
Note: I see that apple may have done the dumb and i am facepalming
There are a number of commands an operating system can safely give to the charge controller. Examples include:
- Run the device from external power; do not charge the battery
- Limit/taper charge to X percent/voltage (assuming X is under the maximum)
- Limit the charge rate to (something under the maximum)
Lower-level control could potentially allow extremely dangerous operations like unbalancing the cells or overcharging the battery, which would be bad.
The bottom is quite easy to take off, just some screws around the perimeter and you’re in. You can unplug the battery pretty easily but it’s harder to remove as it’s glued down. Also I’m pretty sure MacBooks severely underclock the processor if there’s no battery so your performance may suffer. Been through the same thing with my 2013 MacBook Pro. It’s a Linux mint server now.
I’m not 100% sure but which power source you are using, and whether or not the battery seems more like a BIOS or SMC thing, so I’m not sure if even Linux would be able to access it. I could also be totally wrong
If you use Gnome, this is what I use: https://maniacx.github.io/Battery-Health-Charging/ You find it also in the extensions. It is really great.
The case may be closed but you could open it and disconnect the battery. That model is a pain to replace the battery but easy to open and disconnect. Not sure if this would cause any issues if plugged in or if the machine would boot.
I think tlp-ui
can do this, but only on specific devices. IIRC, you set the charging thresholds in such a way that the battery will not charge. For example, configure to prevent charging until below 40% and as long as the battery is above that threshold, no charging should take place.
However, this likely means that as soon as your device goes to sleep or powers off, the battery begins charging again.
I would assume that's something in the bios settings if it exists. But I could be wrong.
Maybe this: https://forums.linuxmint.com/viewtopic.php?t=371122
The usual way is to disconnect the battery, hold the power button down and plug the adapter in before you release it. On the older ones the fans spin up really loud.
That battery isn’t going to get you a bunch of charging cycles, but especially for something made in the last decade, lithium ion batteries will do fine when you leave em plugged in. The computers charge controller is pretty decent and won’t let you overcharge or otherwise damage the battery.