Questions tagged [battery]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

Linux: How to diagnose laptop battery issues?

I use arch + wayland + sway on Lenovo thinkpad x390. Recently my battery power indicator in bar sometimes shows these messages: No battery (happened only once) -nan% inf% (most common) or is stuck on ...
Jan Černý's user avatar
  • 1,381
0 votes
0 answers
32 views

Battery drained extremly fast and too much heat: Asus FX506

I have recently bought an Asus TUF F15 laptop (FX506HF) with these specifications: 12 × 11th Gen Intel® Core™ i5-11400H @ 2.70GHz 8 gigabytes of ram Nvidia RTX 2050 (4 GB) First, I installed fedora ...
thisisjab's user avatar
0 votes
0 answers
11 views

Battery threshold gets overwritten at times

Problem I've encountered an issue with my laptop, where the battery threshold settings seem to get overridden at times. Despite not altering the configuration files, the laptop charges up to 100% ...
Lolis4TheWin's user avatar
0 votes
0 answers
101 views

why Kali Linux does not recognize the battery charge?

this is my first post as a Linux user. The system is working wonderfully. But I'm having a problem with the recognition of my battery. It only walks with the charger plugged in and continues without ...
DAVE's user avatar
  • 1
0 votes
0 answers
178 views

ThinkPad Edge E540 with `pending-charge` battery state after few months of not using, how to fix that on Ubuntu 18.04 LTS?

I turn on my old notebook - Lenovo ThinkPad Edge E540 yesterday and it didn't turn on after few months of being inactive. I thought that maybe battery is discharged to zero and I need power adapter to ...
Marcin's user avatar
  • 101
0 votes
1 answer
91 views

How does the `acpi` command calculate the battery life when `charge_now` and other files are not present?

I am writing a C program that calculates the remaining battery life or charge time, depending on if the battery is charging. The way I do this is by reading some files in /sys/class/power_supply/BAT0. ...
Amarakon's user avatar
  • 333
0 votes
0 answers
58 views

Seeking Solutions for Rapid Battery Drain in RHEL Dual Boot Setup: Need Advice on Battery-Efficient Linux Distros

I recently purchased a new laptop and decided to set up a dual boot with RHEL. Having used Fedora for over 1.5 years and enjoying the experience, I thought of giving RHEL a try. However, upon starting ...
Neptune's user avatar
  • 153
1 vote
2 answers
104 views

per-command cumulative CPU time statistics

I'm running a system off of a battery, so I care a lot about cumulative CPU time usage. A process that runs for a long time accumulates a lot of CPU time in top compared to a process that runs and ...
enigmaticPhysicist's user avatar
5 votes
5 answers
1k views

How can I make this script run in the background?

#!/bin/bash # Get the battery percentage for battery 0 battery0_percent=$(cat /sys/class/power_supply/BAT0/capacity) # Get the battery percentage for battery 1 battery1_percent=$(cat /sys/class/...
Lolis4TheWin's user avatar
0 votes
0 answers
38 views

Changing ACPI thermal values

I am trying to reuse an old laptop(HP Pavilion Entretainement dv7), however I am continously encountering with an overheating problem. I don't know if this affects, but the computer is unable to boot ...
Ankylo Gomez's user avatar
0 votes
0 answers
161 views

Can't set charge_control_start_threshold and charge_control_end_threshold to distinct values

I'm trying to set battery thresholds on a Thinkpad laptop. I'm executing the following two commands: echo 45 > /sys/class/power_supply/BAT1/charge_control_start_threshold echo 50 > /sys/class/...
reptilian3's user avatar
0 votes
0 answers
83 views

Battery plug-in detection latency

I am writing a python script that needs to know when battery is inserted. I use pyudev for that. The problem: The laptop is powered on with only AC power adapter inserted. When I run ls /sys/class/...
ibrahem's user avatar
  • 111
0 votes
0 answers
32 views

Unable to start up Fedora KDE or Reinstall

I've downloaded the recent version of fedora kde on my thinkpad laptop. It worked fine, but when I restarted and there was some sort of update for Lenovo, I've been completely shut out from fedora. It ...
Jeb Song's user avatar
0 votes
1 answer
60 views

Command to know if electricity went down? or to trigger an action when power electricity went out?

I have an old laptop where the battery passed away - because is not possible buy a new or certificated compatible battery, it because the model is about 10 years ago - therefore when the power ...
Manuel Jordan's user avatar
1 vote
1 answer
100 views

Where does the ACPI battery information come from?

Using the ACPI interface, one can obtain information on battery life. Where does this info come from? Is there a chip that computes capability by integrating current over the power supply plug? Is ...
InfiniteLooper's user avatar
0 votes
0 answers
107 views

Is there a Linux command that can indicate if the mobo is functional to charge a battery or not?

I have a Toshiba Satellite L845-SP4146KL - it currently has Linux Ubuntu 22.04 installed. The original battery passed away, I tried to buy a compatible/equivalent battery - but it is not certified. ...
Manuel Jordan's user avatar
0 votes
0 answers
36 views

No battery percentage on Banana Pi with ampripper (/sys/class/power_supply is empty)

I built a cyberdeck using a Banana Pi M2 Zero and an Ampripper 3000 wired to a battery. I don't know if it's even possible but: how can I see the battery percentage? As I said, the /sys/class/...
Gisbi's user avatar
  • 23
0 votes
1 answer
92 views

How to save battery power for every Linux system so that you could use your laptop longer without charging?

I'm looking for a general solution for this problem. Because I need to do the coding outside. Sometimes the outside env doesn't have power supply.
yingshao xo's user avatar
0 votes
1 answer
69 views

Linux battery drain by Opera

I have never installed Opera on my laptop yet when using powertop to see the battery usage of my laptop several Opera processes are shown all of which have very high battery drain. Using sudo find . -...
Bram's user avatar
  • 1
3 votes
0 answers
104 views

how to choose which battery to discharge from in linux / manjaro?

so im facing an issue with my t440s , it has 2 batteries and it discharges from the second battery till 0 percent and that damages my battery . im on linux/manjaro nad i want to switch to the second ...
alireza's user avatar
  • 31
0 votes
0 answers
680 views

Thinkpad T480 Linux Battery performance

I recently bought a used Thinkpad T480. It has two batteries. New version of this laptop are supposed to have an 17-hour battery life. I don't expect Linux to necessarily match that, but even still I'...
C.D.'s user avatar
  • 101
0 votes
1 answer
192 views

Accubattery for linux

I use Accubattery [1] app on my Android, to (try) improve phone's battery health over time; I'd like to have a software like that on Linux; Do you know something similar? Basically it is a timer that ...
mattia.b89's user avatar
  • 3,268
3 votes
1 answer
906 views

USB C charging PDO or PPS

I have Thunderbolt 4 (and USB 4) USB C ports to charge my laptop. Is it possible to find out if it is getting charged via PDO (power delivery objects) or PPS (programmable power supply)? And what ...
Porcupine's user avatar
  • 1,902
0 votes
1 answer
189 views

What is this interface and why this drains my battery?

$ ip address 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope ...
Lolis4TheWin's user avatar
1 vote
2 answers
1k views

Several problems installing Debian on Lenovo IdeaPad 5 (AMD Ryzen 5 and AMD Radeon)

I've recently bought a Lenovo IdeaPad 5 14ABA7 (Type 82SE) with a AMD Ryzen 5 5625U processor and Integrated AMD Radeon Graphics. The laptop comes without any OS and I installed Debian 11 on it (...
Shevek's user avatar
  • 31
3 votes
1 answer
3k views

Understanding power_supply files

It is a very simple question, but I think that in its simplicity it has aqua output. the case is I am interested in better understanding the files that are hosted in /sys/class/power_supply, and that ...
Fco Javier Balón's user avatar
4 votes
0 answers
258 views

Strange battery behavior: how to diagnose power supply monitor?

I have a problem that I can not determine with the battery of my computer. In case it was of use, I use Arch Linux with dwm, although I don't think it's relevant to the case. I get the battery with ...
Fco Javier Balón's user avatar
1 vote
0 answers
414 views

Powertop systemd service Status - Not sure if it is working

I enabled the powertop service. It always shows the following: $ sudo systemctl status powertop -l ○ powertop.service - Extend the battery life of laptop Loaded: loaded (/lib/systemd/system/...
Porcupine's user avatar
  • 1,902
0 votes
1 answer
374 views

why udev rule is never triggered in real reboot, but `udevadmin test` result is still fine?

Here is my example rule: cat /etc/udev/rules.d/55-battery-charge.rules ACTION=="add|change", KERNEL=="BAT*", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}...
Wang's user avatar
  • 1,296
1 vote
2 answers
2k views

how can I make sysfs parameter value persist for each reboot?

I have to write some sysfs parameter files and each reboot. I wonder if there is a way to automatically set those as early as possible, preferably even during initramfs. Is there canonically way to do ...
Wang's user avatar
  • 1,296
0 votes
1 answer
25 views

How does one configure a battery whem compiling Linux

Compiling Linux on a CPU : RockChip RK3326(Quad-Core ARM 64bit Cortex-A35 1.3GHz). Where what I enter the battery full charge data? The battery is just a lipo with a charge controller. Thank you.
BlueConch's user avatar
-1 votes
1 answer
546 views

Linux change default battery capacity

Where can I change the estimated battery capacity on a Linux system?
BlueConch's user avatar
1 vote
1 answer
566 views

Battery charging slowly on linux | Huawei Matebook X Pro (laptop)

Three months ago, I bought a Huawei MateBook X pro 2021. I directly installed linux on it, never used W. Right now, I'm using Kubuntu with kfce which seems to be lighter than Ubuntu and gnome. I've ...
apb_s's user avatar
  • 11
1 vote
1 answer
178 views

Plasma power indicator/monitor doesn't read recharge until restart

Update: this is not limited to Fedora; see note at the end. When the battery is down and I have to charge the indicator doesn't show the charging progress even when the full 100% is confirmed by the ...
cipricus's user avatar
  • 1,549
0 votes
0 answers
900 views

Battery drain despite system shutdown

I have a dual boot setup with Linux Mint 20.3 and Windows 10 on my HP laptop. For the past few days, I noticed that when I shut the laptop down, my battery still drains. I'm talking like -50% in 8 ...
Rainy_Frog11's user avatar
0 votes
0 answers
109 views

Gaming laptop with NVIDIA graphics fails to boot under any circumstances without a charger

Awhile ago I installed Arch Linux on my laptop, and while it's been great, there has been one problem: the system will not boot without being connected to an external power supply, unless I use heavy ...
Shae's user avatar
  • 11
1 vote
1 answer
571 views

How to select which battery the laptop should use via command line or configuration file?

My laptop has two batteries: battery 0 and battery 1. I'd like to be able to choose which battery is being used via some command line program or maybe changing some configuration file in the OS. ...
user avatar
0 votes
1 answer
592 views

Battery and Touchpad issues with ThinkPad P14s

I am the happy owner of a Thinkpad P14s Gen1 with a AMD CPU since march 2021. The problems I am going to describe occurred both with Ubuntu Gnome and Fedora xfce4 desktop environnement using i3wm. ...
UnDesSix's user avatar
1 vote
0 answers
2k views

Get battery charging level of Razer mouse and keyboard

I'm looking for a way to get the battery charging level of my wireless "Razer Pro Type" keyboard and "Pro Click" mouse, both connected with a 2.4GHz USB dongle. There is an answer ...
n-tchen's user avatar
  • 430
0 votes
1 answer
111 views

Optimizing Code OSS aka Visual Studio Code

I am using Manjaro on a Mibook and installed Code OSS (Visual Studio Code) on it and while it works, I see that the CPU jumps to 3.1GHz turbospeeds even while just writing stuff in the IDE. If I ...
Fusseldieb's user avatar
1 vote
1 answer
498 views

Void Linux upower issues

I recently installed voidlinux in a Samsung NC10 netbook. I installed LxQT but after starting LxQT cannot find the battery. Looking at the problem it seems that upower cannot start correctly. If I run ...
PerroNoob's user avatar
  • 141
1 vote
1 answer
451 views

What hardware is required to produce /sys/class/power_supply/BAT0?

My laptop runs Arch, and I can find battery information about the battery of the laptop inside /sys/class/power_supply/BAT0. As far as I know, I have installed nothing to make this information ...
user93114's user avatar
0 votes
0 answers
2k views

How to make battery charging threshold effective after shutting down?

I can use below script to set/get battery charging threshold to stop battery charging at 85% using: echo 85 > /sys/class/power_supply/BAT0/charge_control_end_threshold cat /sys/class/power_supply/...
Haoshu's user avatar
  • 101
1 vote
1 answer
155 views

Are there Linux distributions designed for the 'mobile computing' use case in 2021?

In 2021 are there any linux distributions that succeed at delivering the basics of a 'mobile computing' use case for aftermarket installation on a laptop. I consider a minimum 'mobile computing' ...
cefn's user avatar
  • 139
1 vote
1 answer
711 views

TLP 1.4: Battery charge settings and performance question

I've been reading about a good practice to install TLP to avoid battery being constantly overcharged. I therefore installed the daemon on my Huaweii X Mate Pro. The battery is recognised as far as I ...
Andrea Moro's user avatar
0 votes
1 answer
180 views

How to prevent Laptop from sleep when it hits critical battery

I have Pop_OS 21.04 installed on my laptop. Sometimes the laptop suddenly drops to 0% even through it could run for hours more. The issue is that the power manager triggers sleep, even through I ...
td211's user avatar
  • 374
1 vote
1 answer
668 views

Dell laptop runs hot and loud on idle during suspend and cannot be woken up/resumed (Pop!_OS 21.04)

My Dell Inspiron 5405 (Ryzen 4500U CPU, integrated Radeon graphics) runs Pop OS 21.04 (kernel version 3.11). I have installed Powertop, auto-cpufreq, and kept my firmware and OS up to date. A random ...
botsunny's user avatar
0 votes
0 answers
273 views

What is a default generic app in CentOS 7 to monitor UPS battery over USB?

I installed an UPS battery that is not a well known brand, but it has an USB; Other generic UPS monitoring apps on windows can find it and read battery level and other data even without manually ...
adrianTNT's user avatar
  • 573
0 votes
1 answer
767 views

Laptop randomly crashing and turning off

For the last few days, and I don't remember what changed, my laptop has been randomly turning off once a day. last -x | head | tac returns reboot system boot 5.13.4-arch2-1 Mon Jul 26 08:30 - 09:...
Akshat Vats's user avatar
0 votes
1 answer
988 views

Battery not charging, Acer Aspire A515-54G

I have a problem with my laptop's battery, it's not charging. It all started since my laptop shut down because of low battery. I suppose that is the main reason. Anyway, I will describe what I did to ...
Alberto P. Reynoso's user avatar