WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Displaying remaining battery time  (Read 13526 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Displaying remaining battery time
« on: July 08, 2009, 09:54:07 AM »
For mobile users it is crucial to know remaining battery time. I submitted two small console tools for 2.x which may help.

acpi

This is displaying information provided by BIOS (if supported). Starting as 'acpi -V' all information displayed. On my Acer notebook it looks like:

Quote
Battery 0: Discharging, 86%, 01:47:31 remaining
Battery 0: design capacity 4000 mAh, last full capacity 3759 mAh = 93%
Adapter 0: off-line
Thermal 0: ok, 50.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 100.0 degrees C
Cooling 0: Processor 0 of 10
Cooling 1: Processor 0 of 10

It also indicates charging, but on my machine no remaining charging time displayed.

As usual, displayed remaining time is usually longer than the reale time experienced, but it is up to the ACPI BIOS.


ibam

The Intelligent BAttery Monitor is a more advanced tool. It measures charging and discharging characteristics and stores measurements in home directory. Displayed time is calculated not only info provided by BIOS but its own measurements, therefore more accurate and if you are using frequently learns the machine.

Read docs at http://ibam.sourceforge.net/ for more info.

To get accurate figures save measurement data. If taking full discharging characteristrics don't forget to save manually home directory just before battery is full out otherwise data will be lost.
« Last Edit: July 08, 2009, 09:55:50 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Displaying remaining battery time
« Reply #1 on: July 08, 2009, 09:59:57 AM »
The battery life remaining is also a standard conky output

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Displaying remaining battery time
« Reply #2 on: July 08, 2009, 10:19:51 AM »
The battery life remaining is also a standard conky output

Running conky from the repository on my notebook:



Maybe it can be configured but as it is downloaded no battery time.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Displaying remaining battery time
« Reply #3 on: July 08, 2009, 11:59:58 AM »
OK, so the default .conkyrc doesn't contain battery data  :)

But, you can edit .conkyrc to add some/all of the following:

acpiacadapter:ACPI ac adapter state.
acpifan: ACPI fan state
acpitemp: ACPI temperature in C.
battery: Battery status and remaining percentage capacity
battery_bar: Battery percentage remaining of ACPI battery in a bar.
battery_percent: Battery percentage remaining for ACPI battery.
battery_time: Battery charge/discharge time remaining of ACPI battery.

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: Displaying remaining battery time
« Reply #4 on: July 08, 2009, 12:34:46 PM »
I boot with bootcode laptop and with conky this are the results of battery:
discharging:

charging:

full charge and connected:

the code in conky:
Quote
${color white}Sistema:
${color white}Tiempo:$color $uptime
${color white}Bateria:$color ${battery BAT1}

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Displaying remaining battery time
« Reply #5 on: July 08, 2009, 01:00:21 PM »
I boot with bootcode laptop and with conky this are the results of battery:
...

Bootcode laptop? Another top secret hidden code  ;D I do not find any reference to it in the Wiki. Is it used by TC or just Conky?
« Last Edit: July 08, 2009, 01:02:13 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Displaying remaining battery time
« Reply #6 on: July 08, 2009, 01:15:22 PM »
Bootcode laptop? Another top secret hidden code  ;D I do not find any reference to it in the Wiki. Is it used by TC or just Conky?
It was used in the early series to load battery & pcmcia support. Our hardware recognition has since improved greatly, and those are loaded automatically if needed.
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Displaying remaining battery time
« Reply #7 on: July 08, 2009, 02:05:50 PM »
Using laptop boot option startup says AC, battery and PCMCIA options enabled. On 2.1 is there any difference running with or w/o laptop option on a laptop? BTW, what are these options?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Displaying remaining battery time
« Reply #8 on: July 08, 2009, 02:20:30 PM »
No difference, if they are needed they are loaded. Unless one counts the boot line as a difference :)
The only barriers that can stop you are the ones you create yourself.