LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 12-20-2010, 05:38 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,767
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
laptop battery status -- huh? what?


I tried the following while connected to the AC power adapter(charger):
Code:
prompt$ sudo ibam -a

Bios percentage:            100 %
Battery percentage:         100 %
Soft low percentage limit:  5 %
Charge percentage:          100 %
Bios time left:              1:00:00
Battery time left:           4:50:53
Adapted battery time left:   4:50:53
Charge time left:            0:00:00
Adapted charge time left:    0:00:00
Total battery time:          4:50:53
Adapted total battery time:  4:50:53
Total charge time:           2:15:54
Adapted total charge time:   2:15:54
Profile logging enabled.
Current file: /home/saint/.ibam/profile-002-full
I tried the following immediately after disconnect from AC adapter:
Code:
prompt$ sudo ibam -a

Bios percentage:            100 %
Battery percentage:         100 %
Soft low percentage limit:  5 %
Charge percentage:          100 %
Bios time left:              1:00:00
Battery time left:           4:50:53
Adapted battery time left:   4:50:53
Charge time left:            0:00:00
Adapted charge time left:    0:00:00
Total battery time:          4:50:53
Adapted total battery time:  4:50:53
Total charge time:           2:15:54
Adapted total charge time:   2:15:54
Profile logging enabled.
Current file: /home/saint/.ibam/profile-002-battery
There is no way I'll get 4 hours unless I'm watching paint dry.
Is this just a bad estimate or am I missing something?

Can someone recommend a utility that will gather data for a almost real-time graph of my battery discharge data?

Merci d'avance,
~~~ 0;-Dan
 
Old 12-20-2010, 07:09 PM   #2
lamegaptop
Member
 
Registered: Sep 2009
Location: Orlando
Distribution: Debian
Posts: 49

Rep: Reputation: 4
Powertop does a nice job of estimating time and power draw in Watts. Instll it, run it in a terminal, as root, running on batteries. If running on AC, power usage is not shown.
 
Old 01-05-2011, 03:08 PM   #3
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,767

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
I've run sudo powertop --dump and get the output shown below.
I have no idea how to take advantage of the suggestions or make settings that are permanant. More comments after the code.
Code:
PowerTOP 1.12   (C) 2007, 2008 Intel Corporation 

Collecting data for 15 seconds 


Your CPU supports the following C-states : C1 C2 C3 C4 
Your BIOS reports the following C-states : C1 C2 C4 
Cn                Avg residency
C0 (cpu running)        ( 8.4%)
C0                0.0ms ( 0.0%)
C1 mwait          0.2ms ( 0.0%)
C2 mwait          1.6ms (63.0%)
C4 mwait          1.2ms (28.6%)
P-states (frequencies)
Turbo Mode     0.5%
  1.60 Ghz     0.0%
  1200 Mhz     0.3%
   800 Mhz    99.2%
Disk accesses:
The application 'firefox-bin' is writing to file 'places.sqlite-journal' on /dev/sda9
The application 'firefox-bin' is writing to file 'places.sqlite-journal' on /dev/sda9
The application 'firefox-bin' is writing to file 'places.sqlite' on /dev/sda9
The application 'firefox-bin' is writing to file 'places.sqlite' on /dev/sda9
The application 'evolution' is writing to file '.#Sent.cmeta' on /dev/sda9
The application 'evolution' is writing to file '?' on /dev/sda9
Wakeups-from-idle per second : 622.1    interval: 15.0s
Power usage (ACPI estimate): 17.6W (1.9 hours) 
Top causes for wakeups:
  29.3% (177.8)   [extra timer interrupt]
  23.8% (144.4)   [kernel scheduler] Load balancing tick
  18.0% (109.7)   plugin-containe
   9.8% ( 59.5)D  firefox-bin
   3.3% ( 19.9)   desktopcouch-se
   2.1% ( 12.7)   [i915] <interrupt>
   1.7% ( 10.5)   nautilus
   1.5% (  9.1)   cpufire_applet
   0.1% (  0.5)D  evolution
   1.1% (  6.9)   notify-osd
   1.1% (  6.7)   [iwlagn] <interrupt>
   0.9% (  5.2)   [ahci] <interrupt>
   0.7% (  4.0)   [ata_piix] <interrupt>
   0.7% (  4.0)   [kernel core] usb_hcd_poll_rh_status (rh_timer_func)
   0.6% (  3.7)   compiz
   0.6% (  3.7)   beam.smp
   0.6% (  3.6)   [kernel core] hrtimer_start (tick_sched_timer)
   0.6% (  3.5)   gwibber-service
   0.3% (  2.1)   konsole
   0.3% (  2.0)   mysqld
   0.3% (  2.0)   multiload-apple
   0.3% (  1.5)   [acpi] <interrupt>
   0.3% (  1.5)   [Rescheduling interrupts] <kernel IPI>
   0.2% (  1.3)   clock-applet
   0.2% (  1.0)   apache2
   0.2% (  1.0)   python
   0.2% (  1.0)   gvfs-afc-volume
   0.1% (  0.7)   dropbox
   0.1% (  0.7)   hald-addon-stor
   0.1% (  0.5)   [eth0] <interrupt>
   0.1% (  0.5)   [TLB shootdowns] <kernel IPI>
   0.1% (  0.5)   Xorg
   0.1% (  0.5)   events/0
   0.1% (  0.5)   udisks-daemon
   0.1% (  0.5)   [kernel core] inc_rt_group (sched_rt_period_timer)
   0.1% (  0.5)   gnome-settings-
   0.1% (  0.4)   gnome-screensav
   0.1% (  0.4)   gnome-panel
   0.1% (  0.4)   update-notifier
   0.1% (  0.3)   gpg-agent
   0.0% (  0.3)   indicator-apple
   0.0% (  0.2)   kded4
   0.0% (  0.2)   rtkit-daemon
   0.0% (  0.2)   wicd-monitor
   0.0% (  0.2)   heart
   0.0% (  0.1)   indicator-me-se
   0.0% (  0.1)   gdm-binary
   0.0% (  0.1)   gnome-power-man
   0.0% (  0.1)   [kernel core] add_timer (sta_info_cleanup)
   0.0% (  0.1)   ssh-agent

An audio device is active 100.0% of the time:
hwC0D0 Analog Devices AD1984 

A USB device is active 100.0% of the time:
USB device  3-1 : Biometric Coprocessor (STMicroelectronics)

Suggestion: Enable USB autosuspend for non-input devices by pressing the U key


Suggestion: Enable SATA ALPM link power management via: 
  echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
or press the S key.

Suggestion: Enable wireless power saving mode by executing the following command:
  iwconfig wlan0 power timeout 500ms
This will sacrifice network performance slightly to save power.

Suggestion: enable HD audio powersave mode by executing the following command:
   echo 1 > /sys/module/snd_hda_intel/parameters/power_save 
or by passing power_save=1 as module parameter.

The program 'evolution' is writing to file '.#Sent.cmeta' on /dev/sda9.
This prevents the disk from going to powersave mode.

The program 'firefox-bin' is writing to file 'places.sqlite' on /dev/sda9.
This prevents the disk from going to powersave mode.

The program 'firefox-bin' is writing to file 'places.sqlite' on /dev/sda9.
This prevents the disk from going to powersave mode.

The program 'firefox-bin' is writing to file 'places.sqlite-journal' on /dev/sda9.
This prevents the disk from going to powersave mode.

The program 'firefox-bin' is writing to file 'places.sqlite-journal' on /dev/sda9.
This prevents the disk from going to powersave mode.

Recent USB suspend statistics
Active  Device name
100.0%  USB device  3-1 : Biometric Coprocessor (STMicroelectronics)
  0.0%  /sys/bus/usb/devices/1-4
  0.0%  USB device usb6 : UHCI Host Controller (Linux 2.6.32-27-generic-pae uhci_hcd)
  0.0%  USB device usb5 : UHCI Host Controller (Linux 2.6.32-27-generic-pae uhci_hcd)
  0.0%  USB device usb4 : UHCI Host Controller (Linux 2.6.32-27-generic-pae uhci_hcd)
100.0%  USB device usb3 : UHCI Host Controller (Linux 2.6.32-27-generic-pae uhci_hcd)
  0.0%  USB device usb2 : EHCI Host Controller (Linux 2.6.32-27-generic-pae ehci_hcd)
  0.0%  USB device usb1 : EHCI Host Controller (Linux 2.6.32-27-generic-pae ehci_hcd)

Recent audio activity statistics
Active  Device name
100.0%  hwC0D0 Analog Devices AD1984 

Recent SATA AHCI link activity statistics
Active  Partial Slumber Device name
NOTE -- The report seems to end abruptly for some reason.

The "biometric" is a fingerprint reader. I'd love to turn it off unless I'm trying to use it. I don't know how.

Anything recommendations that you might offer would be wonderful.

ASIDE -- (If this exists someone please tell me.) I'm looking for something that will do the following:
  • wakeup
  • read the state: on-battery vs. on-AC
  • read the battery details: voltage, etc
  • write everything into a CSV or similar file
  • sleep until needed

I could then analyze the file at my leisure.
/ASIDE

Thanks,
~~~ 0;-Dan
 
Old 01-06-2011, 10:03 PM   #4
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,767

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
I found a package in the repositories: battery-stats.

It runs as a daemon and writes a log file into /var/log/battery-stats

This is not one of the *buntu flagged packages, but it mostly works. It seems that there are some minor troubles but it goes a long way to doing what I want. Here is one of my "defects".
The power status might be: on_ac on_battery or on_standby. (I don't know what "standby" means.) While running on battery, the software reports on_standby. No idea what is happening.

On the back end, the package includes a battery-graph application that will read the data file and uses gnuplot to draw the data either for X-display or as text.

I'll write more later.
 
Old 02-14-2011, 06:54 PM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,767

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
I've been running the battery-stats and battery-graph utilites for a while.
They are somewhat useful, but there are minor troubles.

For example, battery-graph is a shell script that pipes data into gnuplot to draw the picture of battery use over time. Wehn you run the utility:
Code:
prompt$ #=== plot usage [f]rom "datetime" with [d]uration of 4 hours
prompt$ battery-graph  -f "13-FEB-2011 18:00" -d 4h
prompt$ #..... graph appears in a separate X11 window

#..... closing that window results in the following
** (<unknown>:26307): WARNING **: Failed to send buffer
<unknown>: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

prompt$
Its been 20 years since I've written X11 or Motif or similar code so I have no idea how
to discover which resource is sought.

In addition, if you try to activate any of the toolbar parts of the resulting gnuplot window
or try to drag the plot away from the terminal window, then gnuplot "exits." (I suspect that the gnuplot "window" is a child of the "terminal window" that launched it or some similar X11-ism.)

Merci d'avance,
~~~ 0;-Dan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Battery Status 0.1 Released - Improved Battery Applet For The Gnome Desktop LXer Syndicated Linux News 0 05-21-2010 06:30 PM
Laptop Battery status not displayed correctly - Fedora 11 pradeepbp Linux - Newbie 1 11-02-2009 04:57 AM
need help regarding battery status asifbasha Linux - Laptop and Netbook 3 08-22-2009 05:42 AM
battery status on suse 10.3 xpucto SUSE / openSUSE 4 06-29-2008 08:42 AM
display battery status p41elvis Linux - Laptop and Netbook 2 04-26-2004 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration