Thanks for the reply.

> > in some cases, the current rate of a battery is stored with a negative
> > sign in /sys/class/power_supply/BAT0/current_now (replace BAT0 with your
> > battery) while discharging. So the absolut value should be taken for the
> > current_now file.
> I'm not sure taking the absolute value would be the correct solution -
> see [1].  Basically, it looks like the negative value is caused by a
> failure of the acpi driver to get the proper current_now value (-1)
> being multiplied by 1000.
> 
> In other words: a negative value in current_now is an error condition.
> 
> > I think this is equivalent to debian bug 586352.
> This issue might be the cause of the bug (failed calculation due to
> invalid value).
> 
> Would you be able to provide a listing of the BAT0 directory and the
> contents of the 'status' and 'charge_now' files when you see the
> negative value inside 'current_now'?

Sure, sorry, I should have attached those in the first place.

cat /sys/class/power_supply/battery/current_now
  -590000

cat /sys/class/power_supply/battery/charge_now
  886000

cat /sys/class/power_supply/battery/status
  Discharging

ls /sys/class/power_supply/battery/
  capacity
  charge_empty
  charge_full
  charge_full_design
  charge_now
  current_now
  device
  manufacturer
  model_name
  power
  present
  status
  subsystem
  technology
  type
  uevent
  voltage_now

The patch that I attached to the referenced debian bug fixes the
"remaining time" issue for my hardware (toshiba ac100) and I get
reasonable values.

So far, I have not found any hint about other hardware that has filled
current_now with negative values that actually contain useful data (i.e.
no error).


Best regards,
   Stefan
   
> 
> Thanks!
> 
> Piotr
> 
> [1]
> http://us.generation-nt.com/answer/returning-acpi-battery-value-unknown-userspace-help-200694351.html
> 



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list

Reply via email to