Start a Conversation

Unsolved

This post is more than 5 years old

B

50121

July 4th, 2017 15:00

Setting the battery charge level within Linux

In Windows you can use the "Dell Power Manager" app or whatever it's called to set specific charging behavior. For example, I set it to only charge up to 80%, since I'm usually using the thing plugged in and I'll get a lot more life, long term, out of my battery if it's not sitting at 100% all the time.


There is a similar functionality in the BIOS.

Now these settings "work" when I'm booted into Ubuntu 16.04, in that the limits are respected but I would also like to change them from within Linux. The main use case is that *sometimes* I know I'm about the take the machine on the road so I'd like to charge up to 100%. Having to shut down everything and boot into the BIOS to do this is a pretty big pain so in practice I just live with my 80%.

1 Message

December 5th, 2017 01:00

It's same for me. I would like to set battery charge mode in Linux as well. Is there any documentation to this feature? ACPI settings?

1 Rookie

 • 

6 Posts

January 28th, 2018 10:00

I would very much like this too.

I am an Ubuntu 16.04 user on the XPS 13 9360 and usually keep the max level at 80%.

However, when I am traveling, I want to set this to 100% without rebooting.

Very annoying that Linux support is half assed on these machines even though they are advertised as "Developer Edition".

January 31st, 2018 11:00

Hey folks,

 

Unfortunately there isn't a pretty GUI on Linux for controlling this, but the "Dell Command" suite does provide a command line option to enable it.

Download links for Dell Command Configure are available here for Ubuntu and Redhat:

http://en.community.dell.com/techcenter/enterprise-client/w/wiki/7532.dell-command-configure

This is the particular option you're looking for:

https://www.dell.com/support/manuals/us/en/04/command-configure-v4.3/dellcommandconfigure_rn_4.3/release-type-and-definition?guid=guid-4c68a415-6090-4a19-b365-3cd05f1494f3&lang=en-us

 

There are a variety of other battery related options you can also configure using this tool.

2 Posts

September 9th, 2018 06:00

Hi there dell-mario I

Thank you for the download link and also the link to the command used for setting this up. I have downloaded and installed the Dell Command | Configure for Ubuntu 16.04 from the links you provided however I can't seem to figure out how I should be passing the commands to it using the terminal in Ubuntu.

I made some searches trying to find out any documentation about it on the Dell website or on the internet but unfortunately I couldn't find anything. I recently gave up Windows and I am migrating over to Linux completely and so my knowledge of Ubuntu is still limited. I found the cctk.exe file under /opt/dell/dcc but can't seem to pass any commands to it using the terminal.

FYI, I have the Dell XPS 13 9370 with Ubuntu 18.04 installed.

Any help is very much appreciated.

Cheers. 

14 Posts

September 9th, 2018 22:00

You can find the description of the cctk command syntax here

https://topics-cdn.dell.com/pdf/command-configure-v3.3_release-notes_en-us.pdf

I specified the charging limits by sudo /opt/dell/dcc/cctk --primarybatterycfg=custom:50-90

Regards, B.

 

2 Posts

September 11th, 2018 01:00

Thank you so much for the reply and more importantly the sample command! I can confirm that the command, with my preferred battery percentages, works just fine on my setup as well. 

even though I found a more recent version of the user's guide you had linked above in my research I could not find the "primarybatterycfg" command in the long list of the commands.

5 Posts

October 13th, 2018 13:00

2nd time writting this post, because Dell Community web page has forgotten my last! (Login fails and retries deleted my previous writing.)

This command does not work for me.

It is not listed in the help

123@DELL-XPS13:~$ sudo /opt/dell/dcc/cctk --primarybatterycfg=custom:50-85

The option 'PrimaryBattChargeCfg' is not available or cannot be configured
through this tool.

123@DELL-XPS13:~$ sudo /opt/dell/dcc/cctk --help

About my system: using Ubuntu 18.04 and Dell XPS13; (It is L322X, I think.) Install of cctk worked.

 

What to do?

33 Posts

October 13th, 2018 15:00

Does the ability to make that setting exist in the BIOS? if it's not listed in the command help and the command says "not available" it may be that your XPS 13 does not support it.

The next best thing if the laptop does not support this is to use a switch you can control via the laptop and turn A/C power on and off at predetermined thresholds. I did that with a Lenovo Y50. Let me know if you want more details.

5 Posts

October 17th, 2018 06:00

Hello,

yes, you are right. Probably this option is not possible with my model of XPS. It is not possible to set it in the BIOS.

I have seen in my research, that there was even a bug fix about the battery live. But it was only for newer models and my CPU was not affected.

Thanks for your advice.

Okay, so it seems, that there is no easy solution to save life of the battery of my Dell XPS and Ubuntu operating system.

33 Posts

October 17th, 2018 11:00

The hard way still remains. I have a 3 1/2 year old Lenovo Y50 which controls an external switch to maintain the battery between 30% and 60%. I checked earlier today and the battery is at 65% capacity which seems decent for a laptop that has been plugged in for most of the 3 1/2 years. I can provide additional details if that would be helpful.

1 Message

February 17th, 2019 03:00

Hello everyone,
thanks for all the information you shared.

The command I use returns the following output on my XPS 13 9333 with Ubuntu 18.04 and BIOS version A03 release date 01/28/2014:

 

sudo /opt/dell/dcc/cctk --primarybatterycfg=custom:50-85
primarybatterycfg=custom:50-55

Checking the BIOS in fact returns that the custom levels are locked to be 50 to 55 and can't be changed.

Do you think upgrading to BIOS A08 (the last available for the XPS 13 9333) could unlock the custom levels ?

Cheers

 

1 Message

May 15th, 2020 19:00

I spent a few hours today, exploring all the options including Dell Command Configure and updating my BIOS, changing the BIOS settings, etc. I have definitively concluded that my Dell Laptop (E6410) does not and will never have this BIOS setting, therefore the Dell Command Configure utility cannot set this setting (because it is a BIOS setting command line utility).  Even though the documentation for the Dell Command Configure lists all possible settings, not all settings are available for every Laptop.

Dell Command Configure is available in the Ubuntu repositories (and therefore I installed it with synaptic package manager in Linux Mint).  Running it from path:

/opt/dell/dcc

Like so, lists all available settings for your BIOS on your laptop:

sudo ./cctk

It is a generic Dell BIOS command line utility that only lets you set the settings that are actually in your BIOS on your laptop.  If you upgrade your BIOS and new settings are added in that BIOS version, the same settings will be available to set through Linux / windows from Dell Command Configure. 

I now believe that the charge controller is built into your laptop hardware (motherboard) and if the BIOS setting is not available to configure the max charge and min charge values, then there is no way for (Linux OS / Software / BIOS) to control these settings. The max charge / min charge settings must be a feature of newer chargers / motherboards and their corresponding BIOS ROMs.  The only way to get the ability to control the charge is to upgrade the motherboard with one that has this feature built into it (and the BIOS).

The easiest way to change this setting if you have it in your BIOS is to go into the BIOS and change it there. If the Command Configure can't change the values then, maybe your BIOS is password protected?  The read-only values are listed with an asterisk (*) when you run it with no parameters.

1 Message

January 3rd, 2024 13:51

Is there any way to tell the battery not to charge?

When powering from an external USB battery pack, I want to power the laptop only, not to charge its batteries. That's easy to do on thinkpad, but with dell, all I have is
/opt/dell/dcc/cctk --PrimaryBattChargeCfg=Custom:50-55
but this only works if the battery is still over 55%.
Is there anything better, or that's the best there is?

1 Rookie

 • 

22 Posts

January 22nd, 2024 05:44

Is there any way to do this on an inspiron 3525 or latitude 5400?

1 Message

January 25th, 2024 08:51

After installing dell-command-configure on Latitude E5540 running  Manjaro it seems to accept :

sudo cctk --PrimaryBattChargeCfg=Custom,50,80

But the system won't "respect" these changes sadly

No Events found!

Top