GNOME 49 (Ubuntu 25.10) power management misconfigured for Dell XPS

The GNOME power setting for “Preserve Battery Health” for the DELL XPS 13 does not work correctly. Issue is Dell documentation IIRC. The charging range needs to be > 5%, but the setting sets it to (75,80). Is there a way to change this configuration range?

Ubuntu Version:
25.10

Desktop Environment (if applicable):
GNOME 49 / Wayland

Problem Description:
I used Settings → Power → Battery Charging, set to “Preserve Battery Health”
I plug in but it always charges to 100%. The reason is that the lower and upper limits are only 5 % apart. From experience using older versions of Ubuntu, I know this is true: I had to use something bigger. Using smbios-battery-ctl --get-charging-cfg built from github is

Charging mode: custom
Charging interval: (75, 80)

The above satisfies Dell documentation as I remember, but in practice it does not work. A gap of 10% would work, I believe.

I tried to report at gnome.org but could not find a place to report.
I tried at launchpad, but there seems to be no way to report bugs there anymore.

I am now seeing it not charge to 100%. It could be working OK. I will keep an eye on it and report if it is still not working.

EDIT: Not working. While the laptop was idle, it did not charge, but as soon as I started typing, it resumed charging up to 100% again.

Up to 25.04 I could use smbios-battery-ctl to set the charging interval (50,70) and the laptop would start charging when it got down to 50% and only charge up to 70%. If the interval range was 5%, then it would charge up to 100%.

Here is part of the (incorrect) help text from smbios-battery-ctl -h:

  --set-custom-charge-interval=<START> <END>
                        Set the percentage bounds for custom charge. Both must
                        be integers. START must lie in the range [50, 95], END
                        must lie in the range [55, 100], END must be at least
                        (START + 5)

The interval needs to be > 5 for sure.

Any reason why you do not use it from the archive (perhaps the archive package has specific patches to better work with the kernel shipped in the release which the GH version does not have) ?

1 Like

smbios-battery-ctl exists for 25.04 and prior but not for 25.10:

$ apt search smbios-battery-ctl
$ 

Also, when I used the smbios-battery-ctl compiled from github source to try to set the interval my computer crashed.

I thought I found a solution, but something is amiss. Check the following two commands: get and set:

# dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.Get string:org.freedesktop.UPower.Device string:ChargeStartThreshold
method return time=1765131177.026743 sender=:1.19 -> destination=:1.300 serial=1200 reply_serial=2
   variant       uint32 75

# dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.Set string:org.freedesktop.UPower.Device string:ChargeStartThreshold uint32:70 
Error org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/UPower/devices/battery_BAT0

ref: https://dbus.freedesktop.org/doc/dbus-java/api/org/freedesktop/DBus.Properties.html

I could be missing something regarding authorization or ability to call the Set method.

EDIT: missing variant keyword: I now get

# dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.Set string:org.freedesktop.UPower.Device string:ChargeStartThreshold variant:uint32:70 
Error org.freedesktop.DBus.Error.InvalidArgs: Property “ChargeStartThreshold” is not writable