Set Dell Battery Charge Limits on Linux with cctk

2 minute read

Published:

Lithium-ion batteries degrade faster when they sit at 100%, especially if the laptop stays plugged in. On a Dell machine, the practical fix is a charge window: stop at 80%, resume only after it drops below 50%.

On a Dell Latitude 5501 (Ubuntu 24.04), smbios-battery-ctl looked like the right tool—but it only reads. Setting thresholds appeared to succeed and then silently did nothing. The working path is Dell CommandConfigure (cctk), which talks to the low-level Dell driver (/dev/dcdbas) and commits limits to the Embedded Controller.

Why smbios-battery-ctl fails on Latitude 5501

Querying works:

sudo smbios-battery-ctl --get-charging-cfg
Charging mode: custom
Charging interval: (50, 80)

Setting looks successful, then nothing changes:

sudo smbios-battery-ctl --set-custom-charge-interval 50 100
Custom charge interval has been set to (50, 100)
sudo smbios-battery-ctl --get-charging-cfg
Charging mode: custom
Charging interval: (50, 80)

smbios-battery-ctl writes via userspace SMBIOS WMI tokens in NVRAM. On this generation of Dell business laptops, the EC ignores those tokens unless the update goes through Dell’s ring-0 ACPI path. So libsmbios is effectively read-only here.

Install Dell Command | Configure (cctk)

Download **Dell CommandConfigure Application** from Dell Support for the Latitude 5501:

Latitude 15 5501 drivers

On that page, select:

Dell Command | Configure Application
Recommended
30 Jan 2023
Systems Management

The package used here was:

command-configure_4.10.0-595.ubuntu18_amd64.tar.gz

It is labeled for Ubuntu 18.04, but it works on Ubuntu 24.04.

Extract, then install the HAPI backend first, then CommandConfigure:
cd /path/to/command-configure_ubuntu_amd64/
sudo apt install ./srvadmin-hapi_*_amd64.deb
sudo apt install ./command-configure_*_amd64.deb

OpenSSL 1.1 on Ubuntu 22.04 / 24.04

If cctk fails looking for libcrypto.so.1.1:

wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb

Optional PATH shortcut

The binary lands at /opt/dell/dcc/cctk:

sudo ln -s /opt/dell/dcc/cctk /usr/local/bin/cctk

Set charge limits with cctk

The primary-battery option is --PrimaryBattChargeCfg (Batt, not Battery).

Check current setting:

sudo cctk --PrimaryBattChargeCfg

Set custom start/stop (50%–80%):

sudo cctk --PrimaryBattChargeCfg=Custom:50-80

If a BIOS setup password is set:

sudo cctk --PrimaryBattChargeCfg=Custom:50-80 --ValSetupPwd=YourPassword

For a full charge before travel:

sudo cctk --PrimaryBattChargeCfg=Standard

Other profiles: Express, Adaptive, PrimAC.

Verify

sudo cctk --PrimaryBattChargeCfg

Expected:

PrimaryBattChargeCfg=Custom:50-80

These settings commit to the EC and persist across reboot, dual-boot, and OS reinstall.