UNSOLVED

BeeOnRope

updated

2 years ago

B

BeeOnRope

1 Rookie

•

14 Posts

4

57346

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%.

  • pichin

    1 Message

    43482

    2

    Posted 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?

  • sola2

    1 Rookie

    •

    6 Posts

    44539

    0

    Posted 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".

  • 44525

    3

    Posted 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.

  • Takertxmc

    2 Posts

    42771

    0

    Posted 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. 

  • bstecklum

    14 Posts

    42741

    2

    Posted 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.

     

  • Takertxmc

    2 Posts

    42700

    0

    Posted 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.

  • n03i

    5 Posts

    42203

    0

    Posted 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?

  • ShedG

    33 Posts

    42188

    0

    Posted 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.

  • n03i

    5 Posts

    42109

    0

    Posted 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.

  • ShedG

    33 Posts

    6840

    0

    Posted 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.