"laptop battery not available" message

Asked by Dave on 2010-05-28

I just installed the Battery Status indicator and for one reason or another when I hover over the icon it tells me the laptop battery is not available. I tried showing the time and percentage, but they both just say "missing" although when I click on "power source" it shows me the AC adapter info as well as all the battery info, including the state, energy info, percentage, technology, etc. The only thing it seems to be reporting incorrectly is the time to full and time to empty, which always read "0." I didn't know whether I should file this as a bug since this could be an ID ten T error, so I thought I'd just ask the question first. My laptop is an Acer Aspire 5100 for reference. Any suggestions or recommendations as to what I can do to properly display the time to empty or percentage would be greatly appreciated!

Thanks,
Dave

Question information

Language:
English Edit question
Status:
Solved
For:
Battery Status Edit question
Assignee:
Ivan Zorin Edit question
Solved by:
Ivan Zorin
Solved:
2010-06-01
Last query:
2010-06-01
Last reply:
2010-05-29
Ivan Zorin (iaz) said : #1

Thank you for taking the time to report this issue and helping to make BatteryStatus better.
Could you, please, open Terminal and provide the output of next commands:
$ apt-cache policy battery-status
$ upower --enumerate
and
$ dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.GetAll string:org.freedesktop.UPower.Device
where battery_BAT0 - your battery's name from the previous output.
And could you specify, please, just in case - do you have only one battery in your laptop, or it has support of multiple batteries?

Dave (danceintherain82) said : #2

Ivan,

Thanks so much for your quick response and your help. Here is the output of the requested commands:

maino82@sheen:~$ apt-cache policy battery-status
battery-status:
  Installed: 0.1-0ubuntu2
  Candidate: 0.1-0ubuntu2
  Version table:
 *** 0.1-0ubuntu2 0
        500 http://ppa.launchpad.net/iaz/battery-status/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status

maino82@sheen:~$ upower --enumerate
/org/freedesktop/UPower/devices/line_power_ACAD
/org/freedesktop/UPower/devices/battery_BAT1

maino82@sheen:~$ dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT1 org.freedesktop.DBus.Properties.GetAll string:org.freedesktop.UPower.Device
method return sender=:1.17 -> dest=:1.55 reply_serial=2
   array [
      dict entry(
         string "NativePath"
         variant string "/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:1b/PNP0C0A:00/power_supply/BAT1"
      )
      dict entry(
         string "Vendor"
         variant string "ACER"
      )
      dict entry(
         string "Model"
         variant string "Primary"
      )
      dict entry(
         string "Serial"
         variant string ""
      )
      dict entry(
         string "UpdateTime"
         variant uint64 1275134611
      )
      dict entry(
         string "Type"
         variant uint32 2
      )
      dict entry(
         string "PowerSupply"
         variant boolean true
      )
      dict entry(
         string "HasHistory"
         variant boolean true
      )
      dict entry(
         string "HasStatistics"
         variant boolean true
      )
      dict entry(
         string "Online"
         variant boolean false
      )
      dict entry(
         string "Energy"
         variant double 38.406
      )
      dict entry(
         string "EnergyEmpty"
         variant double 0
      )
      dict entry(
         string "EnergyFull"
         variant double 38.406
      )
      dict entry(
         string "EnergyFullDesign"
         variant double 44.4
      )
      dict entry(
         string "EnergyRate"
         variant double 0
      )
      dict entry(
         string "Voltage"
         variant double 12.537
      )
      dict entry(
         string "TimeToEmpty"
         variant int64 0
      )
      dict entry(
         string "TimeToFull"
         variant int64 0
      )
      dict entry(
         string "Percentage"
         variant double 100
      )
      dict entry(
         string "IsPresent"
         variant boolean true
      )
      dict entry(
         string "State"
         variant uint32 4
      )
      dict entry(
         string "IsRechargeable"
         variant boolean true
      )
      dict entry(
         string "Capacity"
         variant double 86.5
      )
      dict entry(
         string "Technology"
         variant uint32 1
      )
      dict entry(
         string "RecallNotice"
         variant boolean false
      )
      dict entry(
         string "RecallVendor"
         variant string ""
      )
      dict entry(
         string "RecallUrl"
         variant string ""
      )
   ]

I only have a single battery in my laptop, and to my knowledge the laptop does not support multiple batteries (at least there are no other places on the laptop I can locate that would allow for a second battery to be inserted). Thanks again for your help, and for creating such an awesome little applet!

Regards,
Dave

Ivan Zorin (iaz) said : #3

Here the first thing:
> maino82@sheen:~$ apt-cache policy battery-status
> battery-status:
> Installed: 0.1-0ubuntu2
That means, that you are using version 0.1, but version 0.1.1 available, so please, just upgrade package.
If you don't want to upgrade the whole system, you can easily upgrade only one package - run
$ sudo apt-get update
in Terminal, then open Synaptic, locate "battery-status" package, make sure that there is "0.1.1-0ubuntu1" version in "Latest version" column (if there is not, then, probably, you should [re-]add repository by command:
$ sudo add-apt-repository ppa:iaz/battery-status && sudo apt-get update
), and mark package for upgrade, then apply changes.
Here the second thing:
> ...
> dict entry(
> string "TimeToEmpty"
> variant int64 0
> )
> dict entry(
> string "TimeToFull"
> variant int64 0
> )
> ...
These data means, that your battery just can't provide information for power subsystem about how much life/charge time is left, so it can be hardware bug of this particular battery, or it can be some software bug in power subsystem, but it's not issue of battery-status itself, so sorry - there's nothing I can do with this.
However, after upgrade, battery-status should correctly show percentage of your battery at least, but let me know, if some issues still exist even after upgrade.
P.S. Thanks for positive feedback.

Best Ivan Zorin (iaz) said : #4

So, have you solved your issue by upgrading package?

Dave (danceintherain82) said : #5

Yup, it's all working now. Thanks so much!

yiannis66 (yiannis-karp66) said : #6

Hello, I have almost the same proplem. At the terminal I give
apt-cache policy battery-status
and the answear is:

W: Unable to locate package battery-status
How can I fix this?

yiannis66 (yiannis-karp66) said : #7

also I give: gnome-power-manager

and I get:
(gnome-power-manager:7752): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.24.1/gobject/gsignal.c:2273: signal `proxy-status' is invalid for instance `0x9dc3c70'
TI:20:33:45 TH:0x9d5f6d8 FI:gpm-main.c FN:main,250
- Power Manager is already running in this session.
Traceback:
   gnome-power-manager() [0x806487b]
   gnome-power-manager() [0x80574b2]
   /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x3b9bd6]
   gnome-power-manager() [0x804ebc1]

If that helps
Thanks