9

The battery in my Dell Inspiron 17 laptop is terrible and I'd like to get a replacement. Of course I have Ubuntu (22.04) installed, and I'd like to know how it will handle the replacement.

Will I be able to simply power off the laptop, insert the new battery, power it on, and Ubuntu will act as if nothing happened and continue working properly? Or will I get errors, will I have to change lots of configuration files, etc?

For those who asked - I wish to be replacing my battery because its capacity is at 68% (at the time of posting, it was 76%)

AlexFullinator
  • 1,459
  • 11
  • 39
  • I think, you won't have any problem. But what would be the worst case scenario? ubuntu might stop showing battery percentage. I think you may find a solution. – helloubuntu May 01 '22 at 17:24
  • What's wrong with your current battery? Try and reset the Power Manager... shutdown the computer, hold down the POWER button for ~30 seconds, then reboot and retest. – heynnema May 01 '22 at 22:34
  • 3
    Why do you think you'd have to do anything? – gronostaj May 02 '22 at 09:48
  • @heynnema My battery is terrible and its capacity lowered all the way to 76 percent and it's only been a year since I got this laptop. Because of that, the battery drains very quickly. That's why I want to replace the battery. – AlexFullinator May 02 '22 at 11:14
  • @AlexFullinator Did you reset the Power Manager as per my previous comment? – heynnema May 02 '22 at 13:09
  • Might be obvious to you, but just in case - sleep mode requires power :) – preferred_anon May 03 '22 at 19:50

7 Answers7

23

Yes. The battery is 100% hardware related.

The only thing the operating system does is probe for the current state of the battery. Nothing more.

Rinzwind
  • 299,756
9

In Brief

No special procedure or configuration will be required in Ubuntu.

i.e. If you follow your hardware manufacturer's specifications / guidelines and use a compatible battery, the new battery should work exactly like the one that you want to replace when it was new. It should work simply by swapping the old battery with the new one out of the box.


In Detail

Ubuntu like most modern OSes, for this matter, has little to do with your battery. Communication between the OS and the battery happens indirectly and across many layers. Nowadays, laptop batteries are equipped with their own management and reporting Smart Battery System that is made possible by electronics inside the battery package itself and it looks something like this:

enter image description here

The communication process with the OS happens, more or less, like so:

The battery state information is transmitted over a (System Management Bus) SMBus (which is a single-ended simple two-wire bus for the purpose of lightweight communication) to an (embedded controller) EC (which is a microcontroller in computers that handles various system tasks that the operating system does not handle). The EC is interfaced by (Advanced Configuration and Power Interface) ACPI (which provides an open standard that operating systems can use to discover and configure computer hardware components). Ubuntu kernel then gets informed about the battery via ACPI calls / methods.

i.e. Battery <-- EC <--> BIOS ACPI Methods <--> Ubuntu OS:

  • EC reads battery information and status from a battery.
  • EC generates a (System Control Interrupt / System Configuration Information) SCI to BIOS / OS.
  • OS reads via ACPI methods, which query data from EC.

For further details please see the Advanced Configuration and Power Interface (ACPI) Specification (section 10 starting at page 379 )

Raffa
  • 32,237
5

In general, when dealing with commodity hardware like you are, the OS should have no issues due to swapping out the battery (unless doing so causes problems with the power supply, but that’s unlikely).

The more likely issue in this case is that the system firmware rejects the battery and refuses to boot (some laptops have firmware locks in place that make the system refuse to boot if you try to use internal components that are not sanctioned by the manufacturer), but last I checked this is generally not an issue with modern Dell hardware (they may refuse to let you use some fancy battery-related firmware features you probably are not using anyway, but should still let the system boot).

2

I changed my battery recently while using ubuntu and didn't have any problem with it. No errors,no changes in config files.

Angie
  • 41
2

From the comments:

My battery is terrible and its capacity lowered all the way to 76 percent and it's only been a year since I got this laptop. Because of that, the battery drains very quickly. That's why I want to replace the battery.

Try and reset the POWER MANAGER... shutdown the computer, hold down the POWER button for ~30 seconds, then reboot and retest.

Reference: Laptop (new) fails to start on half charged battery (hard shut off) and Why is my laptop charger detected but not charging the laptop

Pablo Bianchi
  • 15,657
heynnema
  • 70,711
-1

My battery is terrible and its capacity lowered all the way to 76 percent and it's only been a year since I got this laptop.

Uh, 76 percent after a year is about par for the course. Improving on that figure can be done by using the battery manager software (in my case tlp but I don't know what Dell would use) to restrict the maximum load level of the battery to 80% for the normal use case (you might have to retrigger the battery manager software after changing batteries for reregistering the limit). Occasionally recalibrating the battery (with tlp this involves a complete discharge and recharge) can make battery readings more accurate.

My current battery is down to 27% after 11 years. It's still good for more than an hour (starting from 80% charge level). Once I limited its maximum charge, further deterioration was rather constrained but it's unlikely to survive all that much longer: every year more capacity is gone, and of course once a single cell calls it quits altogether, the battery as a whole stops working.

-1

I too have a Dell Inspiron 7720, and I've recently replaced my battery.

In my case, Ubuntu 20.04 is having trouble recognising the replacement battery, but oddly enough, windows has no problem. In fact, I am writing this on battery power alone, but as soon as I switch to Ubuntu, it turns off.

The replacement itself is not high-end, so there's that. I bought it from a shady chinese e-store.