My laptop's battery is broken, totally dead. It is also irreplaceable and I will not be able to replace it in the next 3 months at least. It is invoking notification messages almost every 3-5s, which quickly become annoying. I guess the same ones cause typing lag too, because as I explain it to myself, the battery or some watchdog in the OS sends an interrupt to the CPU, the OS does process switching, to execute the interrupt and hence lag.

Please, tell me how can I stop the battery of being used by the computer completely. So far, I have tried dconf settings,"critical-battery-action" = "nothing" and use time policy both true and false, nothing help. I uninstalled the battery indicator, that did not work either. Should I remove the drivers of the battery if so how and will that prevent the computer from running on charger only?

  • What release of Ubuntu are you using, Ubuntu Core 18? (a release that uses yy format), or the more common Ubuntu 18.04 LTS?, or Ubuntu 18.10? (both of which are yy.mm in format) You don't normally use Ubuntu Core 18 for laptops. – guiverc Apr 14 at 8:49
  • @guivec Sorry for that, I just shortened it. The exact version is Ubuntu 18.04.2 LTS. :) – KDX2 Apr 14 at 8:53
  • 1
    You might be able to disable the battery in the BIOS. – Nonny Moose Apr 14 at 14:32

Please, tell me how can I stop the battery of being used by the computer completely.

There is no method for that from within Ubuntu: a battery creates a loop between the power source and the motherboard so it is all hardware. You will need to physically remove the battery from the system.

Should I remove the drivers of the battery

Batteries do not have drivers. Anything inside Ubuntu is used for analytics purposes (percentages, life span, etc)

One extra remark: make sure the power cord is attached to the system with some tape; if the connector is as fickle as what I have now it will kill your system if is disconnects.

  • Thank you very much. That is useful to know. Do you think turning off low-battery's notifications will stop the typing lag? Shall I keep on trying that or the lag won't stop unless I physically remove the battery? – KDX2 Apr 14 at 8:58
  • 2
    No idea if it is related to lag but removing the battery itself will stop the notifications from turning up. Assuming you get swarmed with notifications it might be the cause for lag and then yes. Try it ;-) – Rinzwind Apr 14 at 9:05

A solution which for now works is, from Settings > Notifications I have completely switched off any notifications, clicking Notification Popups. The lag disappeared, the notifications as well. The problem is that none of my attempts to stop just the low-battery notifications locally worked. Hence, this solution prevents other apps' ones to be displayed, too.

If I see this solution not working in the future or I find a better one I will update this answer.

The battery is in the laptop.

  • I just got the batch for 1st to 10 with accepted answer so feel free to mark yours as the answer ;-) – Rinzwind Apr 15 at 9:05

@Rinzwind is technically correct - batteries don't have drivers, but they do have controllable firmware. This firmware accepts orders via ACPI(Advanced Configuration and Power Interface). You could cut your OS off from information on what the battery is doing by unloading all ACPI kernel modules(acpi=off kernel parameter) or by specifically unloading the battery acpi kernel module(with modprobe). Both solutions courtesy of https://wiki.archlinux.org/index.php/ACPI_modules.

However, messing with ACPI is a bad idea. ACPI is useful for more than just battery control - it controls processor states(you would most likely need to change your processor scheduler), fan speeds, screen brightness, the power button (for shutting the computer down if the OS crashes irrecoverably), temperature sensors. Turning ACPI off is like unfastening your seatbelt.

  • Since yesterday, I can expand on that. My computer is dual-boot, and I switched off ACPI on my Windows because of the typing lag which it causes. I turned on my computer and NVIDIA's drivers were installed and all but won't load. Windows says nothing but Error Code 43. After hours or re-installs of drivers I turned on ACPI and the driver was loaded as charm. My theory is, the NVIDIA's service loading the drivers polls for battery info. Switch ACPI off and it can't get it, an exception is thrown. Windows sees it, blocks the service and loads the default monitor drivers. – KDX2 Apr 15 at 10:06

In years gone by, I have had two computers (well, one was actually a friend's) fail with bad batteries. They wouldn't boot at all. Took the batteries out and they booted just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.