[Bug 728623] Re: Battery rate always 0

2011-03-11 Thread Colin King
Thanks Earl,

When you run the command:

cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charged
present rate: 0 mA
remaining capacity: 4406 mAh
present voltage: 12527 mV

the ACPI driver evaluates the ACPI method _BST.   The
/proc/acpi/battery/BAT0/state fields are mapped as follows:

charging state: -- _BST package element 0
 values: 0 = charged, 1 = discharging, 2 = charging, 4 = critical
 
present rate:-- _BST package element 1

remaining capacity: -- _BST package element 2

present voltage:  -- _BST package element 3

The extracted _BST method from the DSDT in the acpidump is as follows (I
added the comments)

//  Defaulted _BST return package 
Name (PKG2, Package (0x04)
{
Zero,
One,
One,
0x39D0
})

  Method (_BST, 0, NotSerialized)
{
If (ECON)
{
Sleep (0x30)
Store (^^PCI0.LPCB.EC0.BST0, Local0)
And (Local0, 0x07, Local0) 
// read battery charging state from embedded controller memory
Sleep (0x30)  
Store (^^PCI0.LPCB.EC0.BRC0, Local1)   // read 
remaining capacity from embedded controller memory
Sleep (0x30)
Store (^^PCI0.LPCB.EC0.BPV0, Local2)   // read 
present voltage from embedded controller memory 
Store (Local0, Index (PKG2, Zero))   //  
set charging state
Store (Zero, Index (PKG2, One))   //  
set present rate = 0
Store (Local1, Index (PKG2, 0x02))  //   
set remaining capacity 
Store (Local2, Index (PKG2, 0x03))  //   
set present voltage
}

Return (PKG2)// return the battery status 
package to the Operating System that evaluated _BST
}

So, as one can see, the present rate field is being set to zero in the
firmware,  and the kernel is just reporting exactly what the firmware is
returning.

Section 10.2.2.6 of version 4.0a of the ACPI specification states:

Batteries that are rechargeable and are in the discharging state are required 
to
return a valid Battery Present Rate value.

So in my opinion this should be reported as a bug to the BIOS vendor.
The_BST method as it is not conforming to the ACPI specification,
section 10.2.2.6, Battery Present Rate value.

There is little we can do in software to fix this at the kernel level.

** Tags added: acpi-battery

** Changed in: gnome-power-manager (Ubuntu)
 Assignee: (unassigned) = Colin King (colin-king)

** Changed in: gnome-power-manager (Ubuntu)
   Importance: Undecided = Medium

** Changed in: gnome-power-manager (Ubuntu)
   Status: New = Triaged

** Summary changed:

- Battery rate always 0
+ Battery present rate always 0 from /proc/acpi/battery/BAT?/state

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-power-manager in ubuntu.
https://bugs.launchpad.net/bugs/728623

Title:
  Battery present rate always 0 from /proc/acpi/battery/BAT?/state

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 728623] Re: Battery rate always 0

2011-03-08 Thread Earl Malmrose
acpidump output attached.

** Attachment added: acpidump.txt
   
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/728623/+attachment/1895473/+files/acpidump.txt

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-power-manager in ubuntu.
https://bugs.launchpad.net/bugs/728623

Title:
  Battery rate always 0

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 728623] Re: Battery rate always 0

2011-03-04 Thread Colin King
I suspect there is an issue with ACPI _BST (Battery Status) not
functioning correctly for some reason.  Can you attach the output from:

sudo acpidump

thanks!

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-power-manager in ubuntu.
https://bugs.launchpad.net/bugs/728623

Title:
  Battery rate always 0

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 728623] Re: Battery rate always 0

2011-03-03 Thread Earl Malmrose
-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-power-manager in ubuntu.
https://bugs.launchpad.net/bugs/728623

Title:
  Battery rate always 0

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 728623] Re: Battery rate always 0

2011-03-03 Thread Earl Malmrose
Same result in Natty Alpha 3 kernel 2.6.38-5-generic

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-power-manager in ubuntu.
https://bugs.launchpad.net/bugs/728623

Title:
  Battery rate always 0

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs