Forum › Forums › New users › New Users and General Questions › My HP Laptop battery has lost its settings
- This topic has 6 replies, 3 voices, and was last updated Mar 9-11:44 am by sleekmason.
-
AuthorPosts
-
March 4, 2018 at 1:45 pm #7248Moderator
BobC
I switched the battery in my laptop, and ever since I have lost all current settings on it. It knows how big the battery is in mAh, but doesn’t know how much the battery will hold now when full or its current charge. I have tried 3 different batteries, and none show up correctly, even though all are good. I think reinstalling the OS will fix it, but that seems very harsh. The files showing “no such device” seem to be the problem. I have tried draining it all the way and rebooting, etc, but nothing seems to reset it. tlp recalibrate only works for Thinkpads, it looks, and this is an HP Pavilion dv9917cl. This did work fine initially.
Is there some way to reset the value when I swap in a different battery?
The battery is full, and although old, will hold the machine for over an hour. All the utilities like conky and xbattbar come up wrong with the similar wrong info as the acpi -bi
/sys/class/power_supply/BAT0# acpi -bi
Battery 0: Unknown, 0%, rate information unavailable
Battery 0: design capacity 6000 mAh, last full capacity -60 mAh = -1%I have done lots of googling and found nothing that worked…
Any ideas on things to try?
When I run tlp-stat I get this:
+++ Battery Status
/sys/class/power_supply/BAT0/manufacturer = Hewlett-Packard
/sys/class/power_supply/BAT0/model_name = Primary
/sys/class/power_supply/BAT0/cycle_count = (not supported)
/sys/class/power_supply/BAT0/charge_full_design = 6000 [mAh]
/sys/class/power_supply/BAT0/charge_full = (not available)
/sys/class/power_supply/BAT0/charge_now = (not available)
/sys/class/power_supply/BAT0/current_now = (not available)
cat: /sys/class/power_supply/BAT0/charge_full: No such device
cat: /sys/class/power_supply/BAT0/charge_now: No such device
/sys/class/power_supply/BAT0/status = Unknowninxi -Fzx
System: Host: hpdv9917d Kernel: 4.9.0-5-amd64 x86_64 bits: 64 gcc: 6.3.0 Desktop: IceWM 1.4.2
Distro: antiX-17_x64-full Heather Heyer 24 October 2017
Machine: Device: laptop System: Hewlett-Packard product: HP Pavilion dv9700 Notebook PC v: Rev 1 serial: <filter>
Mobo: Quanta model: 30D1 v: 85.26 serial: <filter> BIOS: Hewlett-Packard v: F.30 date: 04/24/2008
Battery BAT0: charge: 100% condition: NA/88.8 Wh model: Hewlett-Packard Primary status: N/A
CPU: Dual core AMD Turion 64 X2 Mobile TL-62 (-MCP-) arch: K8 rev.F+ cache: 1024 KB
flags: (lm nx sse sse2 sse3 svm) bmips: 8401
clock speeds: max: 2100 MHz 1: 2100 MHz 2: 2100 MHz
Graphics: Card: NVIDIA C67 [GeForce 7150M / nForce 630M] bus-ID: 00:12.0
Display Server: X.Org 1.19.2 drivers: nouveau (unloaded: modesetting,fbdev,vesa)
Resolution: 1440×900@60.00hz
OpenGL: renderer: Gallium 0.4 on NV67 version: 2.1 Mesa 13.0.6 Direct Render: Yes
Audio: Card NVIDIA MCP67 High Definition Audio driver: snd_hda_intel bus-ID: 00:07.0
Sound: Advanced Linux Sound Architecture v: k4.9.0-5-amd64
Network: Card-1: NVIDIA MCP67 Ethernet driver: forcedeth port: 30f8 bus-ID: 00:0a.0
IF: eth0 state: dormant speed: 100 Mbps duplex: full mac: <filter>
Card-2: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter (PCI-Express)
driver: ath5k bus-ID: 03:00.0
IF: wlan0 state: down mac: <filter>
Drives: HDD Total Size: 532.1GB (5.5% used)
ID-1: /dev/sda model: HGST_HTS725050A7 size: 500.1GB
ID-2: /dev/sdb model: SanDisk_SSD_U110 size: 32.0GB
Partition: ID-1: / size: 15G used: 5.7G (42%) fs: ext4 dev: /dev/sdb5
ID-2: swap-1 size: 4.29GB used: 0.46GB (11%) fs: swap dev: /dev/sda12
Sensors: System Temperatures: cpu: 67.0C mobo: N/A gpu: 67.0
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 173 Uptime: 10 days Memory: 1959.1/3704.3MB Init: SysVinit runlevel: 5 Gcc sys: 6.3.0
Client: Shell (bash 4.4.121) inxi: 2.3.54- This topic was modified 5 years, 2 months ago by BobC.
March 8, 2018 at 3:37 am #7484Member
sleekmason
::Did you find a solution?
In conky, the latest? way they call for battery info is:
Battery Level: ${alignr}$battery_percent%
–
Maybe replace the old call and see what happens.–
I haven’t looked to find out what the behind the scenes code is, but maybe it will grab it. Never know.March 8, 2018 at 7:08 am #7490Member
rust collector
::Have you tried fully charging the battery, start the computer, enter bios setup (so it does not boot to your os) and just let it sit there until it runs out of power?
Then plug in the charger, and see if it has done anything or not
March 8, 2018 at 4:33 pm #7508ModeratorBobC
::Well, it only lasted about 10 minutes. It did come back up happier, though, so what you suggested worked. I put in a different battery, and now my conky is working. You have to click it to see the battery part up near the top. It needs the acpitool and xbattbar installed to work…
#!/bin/bash # conky-battery.sh - build battery string to return to conky # can't pass parm from conky, so get status byte from acpi -b (should be same as 1st char of battery_short), nothing comes back if not present FILE='/home/bobc/conky-battery_0.tmp' today=<code>date '+%Y_%m_%d__%H_%M_%S'</code>; OUTPUT="$(acpi -b | tr '\n' ' ' | sed -e 's/Battery 0: //g')" STATUS1="$(acpi -b | tr '\n' ' ' | sed -e 's/Battery 0: //g' | cut -c1-1)" if [[ -z "STATUS1" ]]; then STATUS1=N fi #C is displayed instead of charging, D for discharging, F for full, N for not present, E for empty and U for unknown case $STATUS1 in F|E|U ) acpi -bi | tr '\n' ' ' | sed -e 's/Battery 0://g' -e 's/, rate information unavailable//' -e 's/ Full, //' -e 's/ full / /' \ -e 's/ design //' -e 's/last capacity //' -e 's/ capacity / = /' -e 's/100% =/Full, Max/' -e 's/mAh,/mAh, Last Full/' \ -e 's/Discharging,/Draining,/' > $FILE ;; N ) printf "Not Present" > $FILE ;; * ) tail -n 1 ~/xbattbar.log | sed -e 's/^.*\(line\:.*min\.\).*$/\1/' -e 's/line\: //' > $FILE ;; esac cat $FILE- This reply was modified 5 years, 2 months ago by BobC.
- This reply was modified 5 years, 2 months ago by BobC.
- This reply was modified 5 years, 2 months ago by BobC. Reason: acpitool, not acpitools
Attachments:
March 9, 2018 at 3:38 am #7517Member
sleekmason
::Howdy BobC,
Glad you found a solution that works. Also, . . Noticed you have weather on your conky . . any chance you’d be willing to share here?
conky-mods/
–
–
I can’t seem to get any of the ones I find to work!- This reply was modified 5 years, 2 months ago by sleekmason.
March 9, 2018 at 11:25 am #7532ModeratorBobC
::Ok, I can make a tar file of it. I think I’ll post it in the conky mods thread since that probably makes more sense.
I’m putting a piece of tape on each battery and marking it with what percent of capacity that battery has. That way when I swap I’ll know what to expect.
PS:Rust collector’s battery solution worked, but I can’t mark the thread solved
- This reply was modified 5 years, 2 months ago by BobC.
March 9, 2018 at 11:44 am #7537Member
sleekmason
::Excellent! Looking forward to it! The format was off a tad in my previous post. The link for conky-mods was right below where it should have been. Sorry for the confusion.
-
AuthorPosts
- You must be logged in to reply to this topic.
