On Sun, May 18, 2014 at 08:56:15AM +0200, Landry Breuil wrote: > On Sat, May 17, 2014 at 06:32:10PM +0200, Fabian Raetz wrote: > > Hi, > > > > i want to expose "capacity" (full capacity design) > > as a sensor like the rest. > > > > This sensor will be used in an upcoming diff to upower to > > expose "energy-full-design" and "capacity" properties if > > this patch gets merged. > > > > Both patches together will fix wrong notifications about > > broken batteries in KDE4. > > Interesting - i've done a similar thing in the past to enable the 'lid > open' sysctl status, so i'd welcome this kind of patch. Can you also > show the diff for upower, and exactly what it fixes for KDE4 ? For > example, the difference in upower -d output with and without that patch > ? What's the exact difference between energy-full-design and capacity > for upower ?
i've successfully tested this on i386 (5 years old msi wind U100 netbook) and amd64 (x200s), with sensors and the upower patch, and i think this provides valuable information on the device status. Mike, Mark, can you have a look at it ? I'd okay this but that's not my area. amd64: hw.sensors.acpibtn0.indicator0=On (lid open) hw.sensors.acpibat0.power0=19.28 W (rate) hw.sensors.acpibat0.watthour0=64.07 Wh (last full capacity) hw.sensors.acpibat0.watthour1=3.20 Wh (warning capacity) hw.sensors.acpibat0.watthour2=0.20 Wh (low capacity) hw.sensors.acpibat0.watthour3=59.04 Wh (remaining capacity), OK hw.sensors.acpibat0.watthour4=84.24 Wh (capacity) hw.sensors.acpibat0.raw0=2 (battery charging), OK hw.sensors.acpiac0.indicator0=On (power supply) (upower -d) energy: 61.06 Wh energy-empty: 0.2 Wh energy-full: 64.07 Wh energy-full-design: 84.24 Wh energy-rate: 16.273 W voltage: 12.48 V percentage: 95% capacity: 76.0565% i386: hw.sensors.acpiac0.indicator0=On (power supply) hw.sensors.acpibat0.current0=0.56 A (rate) hw.sensors.acpibat0.amphour0=2.03 Ah (last full capacity) hw.sensors.acpibat0.amphour1=0.00 Ah (warning capacity) hw.sensors.acpibat0.amphour2=0.00 Ah (low capacity) hw.sensors.acpibat0.amphour3=1.71 Ah (remaining capacity), OK hw.sensors.acpibat0.amphour4=4.40 Ah (capacity) hw.sensors.acpibat0.raw0=2 (battery charging), OK hw.sensors.acpibtn0.indicator0=On (lid open) (upower -d) state: fully-charged warning-level: none energy: 25.335 Wh energy-empty: 0 Wh energy-full: 25.3599 Wh energy-full-design: 54.8592 Wh energy-rate: 0 W voltage: 12.468 V percentage: 99% capacity: 46.2273%