How to clear / reset smart battery memory?











up vote
7
down vote

favorite
1












So, I got a new battery for my laptop, and right from the get go, I'm having problems.



The battery came almost entirely discharged from the manufacturer. I plugged it into my computer and the batter would report that the charge rate is 0, and hence would never reach "fully charged"



After a couple minutes and having X11 crash, I'm now at this (upower -i /org/freedesktop/UPower/devices/battery_BAT0):



  native-path:          BAT0
vendor: Hewlett-Packard
model: Primary
power supply: yes
updated: Fri 21 Oct 2016 08:28:33 AM CEST (106 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: charging
warning-level: none
energy: 17.8704 Wh
energy-empty: 0 Wh
energy-full: 24.192 Wh
energy-full-design: 95.04 Wh
energy-rate: 0.0996923 W
voltage: 15.947 V
percentage: 73%
capacity: 25.4545%
technology: lithium-ion
icon-name: 'battery-full-charging-symbolic'


So the battery is charging, the energy capacity is only about a quarter of what it was designed (even though the battery is only a couple days old), it sits at 73%, and the charge rate is so small, it doesn't even report how much it'd take till fully charged.



Now, I know you can kinda "calibrate" a battery, by charging it for a couple hours, then letting it run flat, and then charge it up again.



This doesn't seem to be the right way to do, though. I'm wondering if I can't access the smart data directly, via the SMBus.



i2cdetect -l reports:



i2c-0   smbus       SMBus I801 adapter at 8000          SMBus adapter
i2c-1 i2c NVIDIA i2c adapter 0 at 1:00.0 I2C adapter
i2c-2 i2c NVIDIA i2c adapter 2 at 1:00.0 I2C adapter
i2c-3 i2c NVIDIA i2c adapter 3 at 1:00.0 I2C adapter
i2c-4 i2c NVIDIA i2c adapter 5 at 1:00.0 I2C adapter


So, I tried probing SMBus (i2cdetect -r 0):



WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


This is quite strange to me, does that mean there's nothing connected to the bus?



No matter which address I'm trying to dump, the result is always the same:



i2cdump 0 0x03 (all other valid addresses produce the same output):



No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x1a, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX


That's how far I got.



The system gets it's battery information from somewhere, but I can't figure out how and from where.



As for the I²C / SMBus access to the battery: no idea if I'm doing something wrong, or it's impossible like that.



I'd like to know how to access smart battery data, how to set it (presumably with i2cset), and possibly how it's formatted (what data encodes which information, etc.)





acpi -V is even more confused:



Battery 0: Unknown, 73%
Battery 0: design capacity 6600 mAh, last full capacity 1680 mAh = 25%
Adapter 0: on-line


(design capacity reported incorrectly, etc.)





Last bit of information I can come up with, is dmidecode output:



Handle 0x0010, DMI type 39, 22 bytes
System Power Supply
Location: OEM_Define0
Name: OEM_Define1
Manufacturer: OEM_Define2
Serial Number: OEM_Define2
Asset Tag: OEM_Define3
Model Part Number: OEM_Define4
Revision: OEM_Define5
Max Power Capacity: 75 W
Status: Present, OK
Type: Regulator
Input Voltage Range Switching: Auto-switch
Plugged: No
Hot Replaceable: No


You can see all these "OEM_Define2", etc. strings in there, that aren't telling much.



dmidecode -t connector reports:



Getting SMBIOS data from sysfs.
SMBIOS 2.4 present.









share|improve this question






















  • I tried calibrating it the old-fashioned way (running it flat and charging it over night). It's still as bad. this is OT to my question, but I guess my battery is broken.
    – polemon
    Oct 22 '16 at 11:28















up vote
7
down vote

favorite
1












So, I got a new battery for my laptop, and right from the get go, I'm having problems.



The battery came almost entirely discharged from the manufacturer. I plugged it into my computer and the batter would report that the charge rate is 0, and hence would never reach "fully charged"



After a couple minutes and having X11 crash, I'm now at this (upower -i /org/freedesktop/UPower/devices/battery_BAT0):



  native-path:          BAT0
vendor: Hewlett-Packard
model: Primary
power supply: yes
updated: Fri 21 Oct 2016 08:28:33 AM CEST (106 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: charging
warning-level: none
energy: 17.8704 Wh
energy-empty: 0 Wh
energy-full: 24.192 Wh
energy-full-design: 95.04 Wh
energy-rate: 0.0996923 W
voltage: 15.947 V
percentage: 73%
capacity: 25.4545%
technology: lithium-ion
icon-name: 'battery-full-charging-symbolic'


So the battery is charging, the energy capacity is only about a quarter of what it was designed (even though the battery is only a couple days old), it sits at 73%, and the charge rate is so small, it doesn't even report how much it'd take till fully charged.



Now, I know you can kinda "calibrate" a battery, by charging it for a couple hours, then letting it run flat, and then charge it up again.



This doesn't seem to be the right way to do, though. I'm wondering if I can't access the smart data directly, via the SMBus.



i2cdetect -l reports:



i2c-0   smbus       SMBus I801 adapter at 8000          SMBus adapter
i2c-1 i2c NVIDIA i2c adapter 0 at 1:00.0 I2C adapter
i2c-2 i2c NVIDIA i2c adapter 2 at 1:00.0 I2C adapter
i2c-3 i2c NVIDIA i2c adapter 3 at 1:00.0 I2C adapter
i2c-4 i2c NVIDIA i2c adapter 5 at 1:00.0 I2C adapter


So, I tried probing SMBus (i2cdetect -r 0):



WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


This is quite strange to me, does that mean there's nothing connected to the bus?



No matter which address I'm trying to dump, the result is always the same:



i2cdump 0 0x03 (all other valid addresses produce the same output):



No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x1a, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX


That's how far I got.



The system gets it's battery information from somewhere, but I can't figure out how and from where.



As for the I²C / SMBus access to the battery: no idea if I'm doing something wrong, or it's impossible like that.



I'd like to know how to access smart battery data, how to set it (presumably with i2cset), and possibly how it's formatted (what data encodes which information, etc.)





acpi -V is even more confused:



Battery 0: Unknown, 73%
Battery 0: design capacity 6600 mAh, last full capacity 1680 mAh = 25%
Adapter 0: on-line


(design capacity reported incorrectly, etc.)





Last bit of information I can come up with, is dmidecode output:



Handle 0x0010, DMI type 39, 22 bytes
System Power Supply
Location: OEM_Define0
Name: OEM_Define1
Manufacturer: OEM_Define2
Serial Number: OEM_Define2
Asset Tag: OEM_Define3
Model Part Number: OEM_Define4
Revision: OEM_Define5
Max Power Capacity: 75 W
Status: Present, OK
Type: Regulator
Input Voltage Range Switching: Auto-switch
Plugged: No
Hot Replaceable: No


You can see all these "OEM_Define2", etc. strings in there, that aren't telling much.



dmidecode -t connector reports:



Getting SMBIOS data from sysfs.
SMBIOS 2.4 present.









share|improve this question






















  • I tried calibrating it the old-fashioned way (running it flat and charging it over night). It's still as bad. this is OT to my question, but I guess my battery is broken.
    – polemon
    Oct 22 '16 at 11:28













up vote
7
down vote

favorite
1









up vote
7
down vote

favorite
1






1





So, I got a new battery for my laptop, and right from the get go, I'm having problems.



The battery came almost entirely discharged from the manufacturer. I plugged it into my computer and the batter would report that the charge rate is 0, and hence would never reach "fully charged"



After a couple minutes and having X11 crash, I'm now at this (upower -i /org/freedesktop/UPower/devices/battery_BAT0):



  native-path:          BAT0
vendor: Hewlett-Packard
model: Primary
power supply: yes
updated: Fri 21 Oct 2016 08:28:33 AM CEST (106 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: charging
warning-level: none
energy: 17.8704 Wh
energy-empty: 0 Wh
energy-full: 24.192 Wh
energy-full-design: 95.04 Wh
energy-rate: 0.0996923 W
voltage: 15.947 V
percentage: 73%
capacity: 25.4545%
technology: lithium-ion
icon-name: 'battery-full-charging-symbolic'


So the battery is charging, the energy capacity is only about a quarter of what it was designed (even though the battery is only a couple days old), it sits at 73%, and the charge rate is so small, it doesn't even report how much it'd take till fully charged.



Now, I know you can kinda "calibrate" a battery, by charging it for a couple hours, then letting it run flat, and then charge it up again.



This doesn't seem to be the right way to do, though. I'm wondering if I can't access the smart data directly, via the SMBus.



i2cdetect -l reports:



i2c-0   smbus       SMBus I801 adapter at 8000          SMBus adapter
i2c-1 i2c NVIDIA i2c adapter 0 at 1:00.0 I2C adapter
i2c-2 i2c NVIDIA i2c adapter 2 at 1:00.0 I2C adapter
i2c-3 i2c NVIDIA i2c adapter 3 at 1:00.0 I2C adapter
i2c-4 i2c NVIDIA i2c adapter 5 at 1:00.0 I2C adapter


So, I tried probing SMBus (i2cdetect -r 0):



WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


This is quite strange to me, does that mean there's nothing connected to the bus?



No matter which address I'm trying to dump, the result is always the same:



i2cdump 0 0x03 (all other valid addresses produce the same output):



No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x1a, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX


That's how far I got.



The system gets it's battery information from somewhere, but I can't figure out how and from where.



As for the I²C / SMBus access to the battery: no idea if I'm doing something wrong, or it's impossible like that.



I'd like to know how to access smart battery data, how to set it (presumably with i2cset), and possibly how it's formatted (what data encodes which information, etc.)





acpi -V is even more confused:



Battery 0: Unknown, 73%
Battery 0: design capacity 6600 mAh, last full capacity 1680 mAh = 25%
Adapter 0: on-line


(design capacity reported incorrectly, etc.)





Last bit of information I can come up with, is dmidecode output:



Handle 0x0010, DMI type 39, 22 bytes
System Power Supply
Location: OEM_Define0
Name: OEM_Define1
Manufacturer: OEM_Define2
Serial Number: OEM_Define2
Asset Tag: OEM_Define3
Model Part Number: OEM_Define4
Revision: OEM_Define5
Max Power Capacity: 75 W
Status: Present, OK
Type: Regulator
Input Voltage Range Switching: Auto-switch
Plugged: No
Hot Replaceable: No


You can see all these "OEM_Define2", etc. strings in there, that aren't telling much.



dmidecode -t connector reports:



Getting SMBIOS data from sysfs.
SMBIOS 2.4 present.









share|improve this question













So, I got a new battery for my laptop, and right from the get go, I'm having problems.



The battery came almost entirely discharged from the manufacturer. I plugged it into my computer and the batter would report that the charge rate is 0, and hence would never reach "fully charged"



After a couple minutes and having X11 crash, I'm now at this (upower -i /org/freedesktop/UPower/devices/battery_BAT0):



  native-path:          BAT0
vendor: Hewlett-Packard
model: Primary
power supply: yes
updated: Fri 21 Oct 2016 08:28:33 AM CEST (106 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: charging
warning-level: none
energy: 17.8704 Wh
energy-empty: 0 Wh
energy-full: 24.192 Wh
energy-full-design: 95.04 Wh
energy-rate: 0.0996923 W
voltage: 15.947 V
percentage: 73%
capacity: 25.4545%
technology: lithium-ion
icon-name: 'battery-full-charging-symbolic'


So the battery is charging, the energy capacity is only about a quarter of what it was designed (even though the battery is only a couple days old), it sits at 73%, and the charge rate is so small, it doesn't even report how much it'd take till fully charged.



Now, I know you can kinda "calibrate" a battery, by charging it for a couple hours, then letting it run flat, and then charge it up again.



This doesn't seem to be the right way to do, though. I'm wondering if I can't access the smart data directly, via the SMBus.



i2cdetect -l reports:



i2c-0   smbus       SMBus I801 adapter at 8000          SMBus adapter
i2c-1 i2c NVIDIA i2c adapter 0 at 1:00.0 I2C adapter
i2c-2 i2c NVIDIA i2c adapter 2 at 1:00.0 I2C adapter
i2c-3 i2c NVIDIA i2c adapter 3 at 1:00.0 I2C adapter
i2c-4 i2c NVIDIA i2c adapter 5 at 1:00.0 I2C adapter


So, I tried probing SMBus (i2cdetect -r 0):



WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


This is quite strange to me, does that mean there's nothing connected to the bus?



No matter which address I'm trying to dump, the result is always the same:



i2cdump 0 0x03 (all other valid addresses produce the same output):



No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x1a, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX


That's how far I got.



The system gets it's battery information from somewhere, but I can't figure out how and from where.



As for the I²C / SMBus access to the battery: no idea if I'm doing something wrong, or it's impossible like that.



I'd like to know how to access smart battery data, how to set it (presumably with i2cset), and possibly how it's formatted (what data encodes which information, etc.)





acpi -V is even more confused:



Battery 0: Unknown, 73%
Battery 0: design capacity 6600 mAh, last full capacity 1680 mAh = 25%
Adapter 0: on-line


(design capacity reported incorrectly, etc.)





Last bit of information I can come up with, is dmidecode output:



Handle 0x0010, DMI type 39, 22 bytes
System Power Supply
Location: OEM_Define0
Name: OEM_Define1
Manufacturer: OEM_Define2
Serial Number: OEM_Define2
Asset Tag: OEM_Define3
Model Part Number: OEM_Define4
Revision: OEM_Define5
Max Power Capacity: 75 W
Status: Present, OK
Type: Regulator
Input Voltage Range Switching: Auto-switch
Plugged: No
Hot Replaceable: No


You can see all these "OEM_Define2", etc. strings in there, that aren't telling much.



dmidecode -t connector reports:



Getting SMBIOS data from sysfs.
SMBIOS 2.4 present.






power-management battery smbios






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 21 '16 at 7:02









polemon

5,65464277




5,65464277












  • I tried calibrating it the old-fashioned way (running it flat and charging it over night). It's still as bad. this is OT to my question, but I guess my battery is broken.
    – polemon
    Oct 22 '16 at 11:28


















  • I tried calibrating it the old-fashioned way (running it flat and charging it over night). It's still as bad. this is OT to my question, but I guess my battery is broken.
    – polemon
    Oct 22 '16 at 11:28
















I tried calibrating it the old-fashioned way (running it flat and charging it over night). It's still as bad. this is OT to my question, but I guess my battery is broken.
– polemon
Oct 22 '16 at 11:28




I tried calibrating it the old-fashioned way (running it flat and charging it over night). It's still as bad. this is OT to my question, but I guess my battery is broken.
– polemon
Oct 22 '16 at 11:28










3 Answers
3






active

oldest

votes

















up vote
3
down vote



accepted










The Smart Battery Specification (SBS) bus is not directly accessible from the OS. It is however, possible to communicate directly with the battery via a USB-I2C adapter connected directly to the battery pins.



EDIT:
https://media.blackhat.com/bh-us-11/Miller/BH_US_11_Miller_Battery_Firmware_Public_WP.pdf



EDIT 2:
I personally managed to talk directly to the battery using a Raspberry PI's i2c pins and the commands you mentioned.






share|improve this answer






























    up vote
    1
    down vote













    There is nothing wrong with the gauge; your battery is defective so you need to just return it and demand a replacement. A 4 cell li-ion battery has a fully charged voltage of 4.2 x 4 = 16.8 volts. The fact that it is sitting at only 15.9 and not taking hardly any charge indicates at least one cell is damaged.



    The fact that the smi and acpi data are incorrect indicate that the manufacturer of this laptop just could not be bothered to build it right, so I would return it for a refund if possible and not buy from them again.






    share|improve this answer




























      up vote
      0
      down vote













      Are you sure it's even a smart battery? The one in my HP Pavilion isn't.



      And where you got the battery matters. It took me 3 or 4 tries to get a working battery for my Dell buying cheap batteries. I finally had good luck at http://drpowerglobal.com/drbattery/ but that was years ago, now I've worn that one out.






      share|improve this answer





















        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "106"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f317864%2fhow-to-clear-reset-smart-battery-memory%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        3
        down vote



        accepted










        The Smart Battery Specification (SBS) bus is not directly accessible from the OS. It is however, possible to communicate directly with the battery via a USB-I2C adapter connected directly to the battery pins.



        EDIT:
        https://media.blackhat.com/bh-us-11/Miller/BH_US_11_Miller_Battery_Firmware_Public_WP.pdf



        EDIT 2:
        I personally managed to talk directly to the battery using a Raspberry PI's i2c pins and the commands you mentioned.






        share|improve this answer



























          up vote
          3
          down vote



          accepted










          The Smart Battery Specification (SBS) bus is not directly accessible from the OS. It is however, possible to communicate directly with the battery via a USB-I2C adapter connected directly to the battery pins.



          EDIT:
          https://media.blackhat.com/bh-us-11/Miller/BH_US_11_Miller_Battery_Firmware_Public_WP.pdf



          EDIT 2:
          I personally managed to talk directly to the battery using a Raspberry PI's i2c pins and the commands you mentioned.






          share|improve this answer

























            up vote
            3
            down vote



            accepted







            up vote
            3
            down vote



            accepted






            The Smart Battery Specification (SBS) bus is not directly accessible from the OS. It is however, possible to communicate directly with the battery via a USB-I2C adapter connected directly to the battery pins.



            EDIT:
            https://media.blackhat.com/bh-us-11/Miller/BH_US_11_Miller_Battery_Firmware_Public_WP.pdf



            EDIT 2:
            I personally managed to talk directly to the battery using a Raspberry PI's i2c pins and the commands you mentioned.






            share|improve this answer














            The Smart Battery Specification (SBS) bus is not directly accessible from the OS. It is however, possible to communicate directly with the battery via a USB-I2C adapter connected directly to the battery pins.



            EDIT:
            https://media.blackhat.com/bh-us-11/Miller/BH_US_11_Miller_Battery_Firmware_Public_WP.pdf



            EDIT 2:
            I personally managed to talk directly to the battery using a Raspberry PI's i2c pins and the commands you mentioned.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 16 '17 at 6:14









            Stephen Rauch

            3,318101328




            3,318101328










            answered Mar 16 '17 at 4:51









            RetroDroid

            466




            466
























                up vote
                1
                down vote













                There is nothing wrong with the gauge; your battery is defective so you need to just return it and demand a replacement. A 4 cell li-ion battery has a fully charged voltage of 4.2 x 4 = 16.8 volts. The fact that it is sitting at only 15.9 and not taking hardly any charge indicates at least one cell is damaged.



                The fact that the smi and acpi data are incorrect indicate that the manufacturer of this laptop just could not be bothered to build it right, so I would return it for a refund if possible and not buy from them again.






                share|improve this answer

























                  up vote
                  1
                  down vote













                  There is nothing wrong with the gauge; your battery is defective so you need to just return it and demand a replacement. A 4 cell li-ion battery has a fully charged voltage of 4.2 x 4 = 16.8 volts. The fact that it is sitting at only 15.9 and not taking hardly any charge indicates at least one cell is damaged.



                  The fact that the smi and acpi data are incorrect indicate that the manufacturer of this laptop just could not be bothered to build it right, so I would return it for a refund if possible and not buy from them again.






                  share|improve this answer























                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    There is nothing wrong with the gauge; your battery is defective so you need to just return it and demand a replacement. A 4 cell li-ion battery has a fully charged voltage of 4.2 x 4 = 16.8 volts. The fact that it is sitting at only 15.9 and not taking hardly any charge indicates at least one cell is damaged.



                    The fact that the smi and acpi data are incorrect indicate that the manufacturer of this laptop just could not be bothered to build it right, so I would return it for a refund if possible and not buy from them again.






                    share|improve this answer












                    There is nothing wrong with the gauge; your battery is defective so you need to just return it and demand a replacement. A 4 cell li-ion battery has a fully charged voltage of 4.2 x 4 = 16.8 volts. The fact that it is sitting at only 15.9 and not taking hardly any charge indicates at least one cell is damaged.



                    The fact that the smi and acpi data are incorrect indicate that the manufacturer of this laptop just could not be bothered to build it right, so I would return it for a refund if possible and not buy from them again.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 16 '17 at 13:18









                    psusi

                    13.5k22439




                    13.5k22439






















                        up vote
                        0
                        down vote













                        Are you sure it's even a smart battery? The one in my HP Pavilion isn't.



                        And where you got the battery matters. It took me 3 or 4 tries to get a working battery for my Dell buying cheap batteries. I finally had good luck at http://drpowerglobal.com/drbattery/ but that was years ago, now I've worn that one out.






                        share|improve this answer

























                          up vote
                          0
                          down vote













                          Are you sure it's even a smart battery? The one in my HP Pavilion isn't.



                          And where you got the battery matters. It took me 3 or 4 tries to get a working battery for my Dell buying cheap batteries. I finally had good luck at http://drpowerglobal.com/drbattery/ but that was years ago, now I've worn that one out.






                          share|improve this answer























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            Are you sure it's even a smart battery? The one in my HP Pavilion isn't.



                            And where you got the battery matters. It took me 3 or 4 tries to get a working battery for my Dell buying cheap batteries. I finally had good luck at http://drpowerglobal.com/drbattery/ but that was years ago, now I've worn that one out.






                            share|improve this answer












                            Are you sure it's even a smart battery? The one in my HP Pavilion isn't.



                            And where you got the battery matters. It took me 3 or 4 tries to get a working battery for my Dell buying cheap batteries. I finally had good luck at http://drpowerglobal.com/drbattery/ but that was years ago, now I've worn that one out.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 1 at 23:32









                            Alan Corey

                            493




                            493






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f317864%2fhow-to-clear-reset-smart-battery-memory%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                List directoties down one level, excluding some named directories and files

                                list processes belonging to a network namespace

                                list systemd RuntimeDirectory mounts