Laptop battery charging limit

Hello everybody!
Big fan of manjaro linux, freshly installed in my samsung galaxy book pro and i have two minor issues so far:

  • Battery will not charge over 85%, like it did with windows 11 preinstalled. Thing is, now i don’t have samsung settings to help it with and i can’t find a GUI to set it here.
  • Looks like there’s no way to interact with keyboard illumination, the function key does nothing.

Suggestions? Keep in mind that i have zero knowledge of terminal use/programming so i normally don’t blindly follow tutorials since i have no idea what i’m doing.
Thanks in advance and have a good evening!

KDE has section in System Settings for this. I have no idea about other DE.

In terminal you can do this:

echo 20 > /sys/class/power_supply/BAT0/charge_start_threshold
echo 90 > /sys/class/power_supply/BAT0/charge_stop_threshold

First command enable charging at 20% battery level, second disable charging at 90% battery level.

Hi @concrete, and welcome!

Regarding #1, look at TLP, from the community repository:

$ pamac search tlp
[...]
tlpui                                                                                                                                                                                                          [Installed] 1.5.0.7-1              community
A GTK user interface for TLP written in Python
[...]
tlp                                                                                                                                                                                                            [Installed] 1.5.0-6                community
Linux Advanced Power Management

…and it also has a GUI, which obviously needs the usual one, so install it with:

pamac install tlpui tlp

Regarding #2:

Might be a missing driver. Please provide the output of:

inxi --admin --verbosity=7 --filter --no-host --width

:bangbang: Tip: :bangbang:

When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:

```
pasted text
```

Or three (3) tilde signs, like this:

~~~
pasted text
~~~

This will just cause it to be rendered like this:

Sed
sollicitudin dolor
eget nisl elit id
condimentum
arcu erat varius
cursus sem quis eros.

Instead of like this:

Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.

Thereby increasing legibility thus making it easier for those trying to provide assistance.

For more information, please see:


:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

Edit:

See

https://wiki.archlinux.org/title/Laptop/Samsung

It may just be a coincidence. When I had this problem with KDE it turned out to be a hardware problem. That laptop is now relegated to Windows only and I have to have it plugged in to work.

Thank you for your time and courtesy :slight_smile:

I guess your last link solves the problem:

“Keyboard backlight: No
Fingerprint reader: No
Battery protection cannot be adjusted.”

I’ll anway post the terminal output you asked

Edit:Apparently there is some link in the output so i am not allowed to post it…

I believe this is just some driver incompatibility or such, but again it’s no deal breaker i was just curious. Thanks!

Wow KDE looks so much more customizable! I tried kubuntu at some distro hopping point and plasma is great but i find it confusing (for my very limited skills). That said, i’ll try these terminal commands, but is there a reason for the 20 and 90 values? Are they standard for battery health or something?
Thanks!

Battery charge/discharge limits need to be supported in the firmware - as it is the hardware which controls if the battery is charged.

While tlp supports the scenario - it won’t work unless the hardware supports it too.

For the plug/unplug charger on systems that do not support this in a manner where tlp can control it you can use a script.

1 Like

AFAIK, as a desktop user, yes.

Thank you but what you suggest (editing config files etc) goes beyond my understanding and i’d like to be able to turn on my pc next time i press the power button ^^. Maybe i’ll try it in a spare pc to see if i manage to blow it lol

For Battery charging samsung laptops it is a bit different for setting battery threshold
To turn off charging threshold. (this will charge yout battery to 100%)
echo "0" | sudo tee /sys/devices/platform/samsung/battery_life_extender
or
echo "0" > /sys/devices/platform/samsung/battery_life_extender`

To turn on charging threshold. (this will charge yout battery to 80-85%)
echo "1" | sudo tee /sys/devices/platform/samsung/battery_life_extender
or
echo "1" > /sys/devices/platform/samsung/battery_life_extender`

If you want GUI on gnome you can try
search “Battery Health Charging” in gnome extensions.
But first try the command, as this extension will work only if the command about works.