1937c battery goes out quickly - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Desktop Usage > Mobile Computing

Mobile Computing This forum discusses issues related to running FreeBSD on notebooks, laptops, and other mobile equipment.

Reply
 
Thread Tools Display Modes
  #1  
Old April 1st, 2009, 13:52
rocky's Avatar
rocky rocky is offline
Junior Member
 
Join Date: Nov 2008
Location: Vietnam
Posts: 97
Thanks: 15
Thanked 1 Time in 1 Post
Default battery goes out quickly

Hello all,

I have bought a HP Compaq Presario CQ40-401(au) and I installed FreeBSD 7.1 on it.

My battery is charged to 100%. After 20 minutes of uptime, the battery goes quickly to 69%. I am running FireFox3, pidgin, etc. Not too many, right?

I guess that there's something wrong. But I don't know...

Thanks you for any suggestions and helps,

-- kyanh

Code:
$ uptime
 7:48PM  up 23 mins, 3 users, load averages: 2.38, 1.70, 1.03
Code:
$ sysctl -a |grep batt
hw.acpi.battery.life: 62
hw.acpi.battery.time: -1
hw.acpi.battery.state: 1
hw.acpi.battery.units: 1
hw.acpi.battery.info_expire: 5
machdep.apm_swab_batt_minutes: 0
dev.battery.0.%desc: ACPI Control Method Battery
dev.battery.0.%driver: battery
dev.battery.0.%location: handle=\_SB_.PCI0.LPC0.BAT0
dev.battery.0.%pnpinfo: _HID=PNP0C0A _UID=1
dev.battery.0.%parent: acpi0

Code:
$ ps x
  986  ??  Is     0:00.00 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 1009  ??  S      0:00.08 /usr/local/libexec/gconfd-2
  923  v0  I      0:00.01 -bash (bash)
  927  v0  I+     0:00.01 /bin/sh /usr/local/bin/startx
  948  v0  I+     0:00.00 xinit /home/pi/.xinitrc -- /usr/local/bin/X :0 -auth /home/pi/.serverauth.927
  967  v0  S      0:01.04 /usr/local/bin/openbox
  970  v0  S      0:08.08 /usr/local/bin/conky
  971  v0  S      0:03.02 /usr/local/bin/fbpanel
  974  v0  S      0:00.92 /usr/local/bin/xscreensaver -nosplash
  975  v0  S      0:58.12 /usr/local/bin/xvnkb
  980  v0  S      0:00.66 /usr/local/apps/ROX-Filer/ROX-Filer
  981  v0  S      0:02.73 pidgin
  985  v0  I      0:00.00 dbus-launch --autolaunch 0c226a9e5676c3a684285a1849c73ad7 --binary-syntax --close-stderr
  994  v0  I      0:00.01 /bin/sh /usr/local/bin/firefox3 http://mail.google.com/mail
  999  v0  I      0:00.00 /bin/sh /usr/local/lib/firefox3/run-mozilla.sh /usr/local/lib/firefox3/firefox-bin http://mail.google.com/mail
 1004  v0  I      2:15.88 /usr/local/lib/firefox3/firefox-bin http://mail.google.com/mail
 1027  v0  S      0:00.79 xterm -e screen -A
 1030  p0  Ss+    0:00.03 screen -A
 1034  p1  Is     0:00.11 /bin/bash
 1117  p2  Ss     0:00.12 /bin/bash
 1126  p2  R+     0:00.04 ps x
Here's a part of `top`'s output:

Code:
  PID USERNAME    THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
  949 pi            1  63    0   301M 39728K select 1   3:27 23.29% Xorg
 1004 pi            8  54    0   124M 98256K ucond  1   0:00 20.46% firefox-bin
  975 pi            1   8    0  6392K  4164K nanslp 1   1:06  7.28% xvnkb
 1117 pi            1   8    0  5468K  3188K wait   1   0:00  0.20% bash
  971 pi            1  44    0 36012K 15928K select 1   0:03  0.10% fbpanel
  970 pi            1  44    0  5764K  2776K select 0   0:09  0.00% conky
  981 pi            1  44    0 46684K 26636K select 1   0:03  0.00% pidgin
  967 pi            1  44    0 26396K 10080K select 1   0:01  0.00% openbox
  974 pi            1  44    0  5300K  3148K select 0   0:01  0.00% xscreensaver
 1027 pi            1  44    0 10824K  8200K select 0   0:01  0.00% xterm
  980 pi            1  44    0 45852K 17320K select 1   0:01  0.00% ROX-Filer
 1031 pi            1  44    0  3572K  2132K select 0   0:00  0.00% screen
 1034 pi            1   8    0  5468K  3188K wait   1   0:00  0.00% bash
 1009 pi            1  44    0 21140K  5408K select 1   0:00  0.00% gconfd-2
 1030 pi            1  20    0  3572K  1896K pause  0   0:00  0.00% screen
  923 pi            1   8    0  4396K  2316K wait   0   0:00  0.00% bash
 1128 pi            1  44    0  3580K  1704K CPU0   0   0:00  0.00% top
  994 pi            1   8    0  3512K  1688K wait   1   0:00  0.00% sh
 1043 pi            1   8    0  3620K  1588K wait   1   0:00  0.00% su
  927 pi            1   8    0  3464K  1464K wait   0   0:00  0.00% sh
  999 pi            1   8    0  3512K  1700K wait   1   0:00  0.00% sh
  948 pi            1   8    0  4396K  1656K wait   1   0:00  0.00% xinit
  986 pi            1  44    0  3384K  1736K select 0   0:00  0.00% dbus-daemon
  985 pi            1  49    0  4684K  1988K select 0   0:00  0.00% dbus-launch
__________________
System: FreeBSD-7.2 (i386) on Compaq Presario CQ40-401AU
Topic: replace Ubuntu/kvm by FreeBSD/jail
Current task: build Fedora Directory Server on FreeBSD

Last edited by rocky; April 2nd, 2009 at 04:18. Reason: Subscription
Reply With Quote
  #2  
Old April 1st, 2009, 14:02
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,694
Thanks: 47
Thanked 2,021 Times in 1,860 Posts
Default

It's probably running at full blast. Try setting up acpi or apm.

http://www.freebsd.org/doc/en/books/...-overview.html
Reply With Quote
  #3  
Old April 1st, 2009, 15:21
richardpl richardpl is offline
Member
 
Join Date: Nov 2008
Location: Croatia
Posts: 841
Thanks: 6
Thanked 68 Times in 67 Posts
Default

Enable powerd in /etc/rc.conf.
Install,enable and configure ataidle from ports.
Add
Quote:
Originally Posted by /boot/loader.conf
cpufreq_load="YES"
Edit /etc/rc.conf:
Code:
performance_cx_lowest="HIGH"    # Online CPU idle state
performance_cpu_freq="NONE"     # Online CPU frequency
economy_cx_lowest="HIGH"        # Offline CPU idle state
economy_cpu_freq="NONE"         # Offline CPU frequency

Last edited by richardpl; April 1st, 2009 at 15:26.
Reply With Quote
  #4  
Old April 2nd, 2009, 04:16
rocky's Avatar
rocky rocky is offline
Junior Member
 
Join Date: Nov 2008
Location: Vietnam
Posts: 97
Thanks: 15
Thanked 1 Time in 1 Post
Default

Thanks SirDice and richardpl. I will try and report soon.
__________________
System: FreeBSD-7.2 (i386) on Compaq Presario CQ40-401AU
Topic: replace Ubuntu/kvm by FreeBSD/jail
Current task: build Fedora Directory Server on FreeBSD
Reply With Quote
  #5  
Old April 2nd, 2009, 14:32
rocky's Avatar
rocky rocky is offline
Junior Member
 
Join Date: Nov 2008
Location: Vietnam
Posts: 97
Thanks: 15
Thanked 1 Time in 1 Post
Default

Dear richardpl,

I followed your helps and the battery still went out quickly. More over, I got some more errors in `dmesg`:

Code:
FreeBSD 7.1-RELEASE #3: Tue Mar 24 01:40:52 ICT 2009
    toor@icy.local:/usr/obj/usr/src/sys/ICY
module_register: module cpu/ichss already exists!
Module cpu/ichss failed to register: 17
module_register: module cpu/est already exists!
Module cpu/est failed to register: 17
module_register: module cpu/p4tcc already exists!
Module cpu/p4tcc failed to register: 17
module_register: module cpu/powernow already exists!
Module cpu/powernow failed to register: 17
module_register: module cpu/smist already exists!
Module cpu/smist failed to register: 17
Any idea?

Regards,

--rocky
__________________
System: FreeBSD-7.2 (i386) on Compaq Presario CQ40-401AU
Topic: replace Ubuntu/kvm by FreeBSD/jail
Current task: build Fedora Directory Server on FreeBSD
Reply With Quote
  #6  
Old April 2nd, 2009, 18:39
richardpl richardpl is offline
Member
 
Join Date: Nov 2008
Location: Croatia
Posts: 841
Thanks: 6
Thanked 68 Times in 67 Posts
Default

What you did?
What are your powerd flags.
Post your rc.conf.
Reply With Quote
  #7  
Old April 2nd, 2009, 18:39
richardpl richardpl is offline
Member
 
Join Date: Nov 2008
Location: Croatia
Posts: 841
Thanks: 6
Thanked 68 Times in 67 Posts
Default

Also send output of uptime.
Reply With Quote
  #8  
Old April 17th, 2009, 00:49
foo_daemon's Avatar
foo_daemon foo_daemon is offline
Junior Member
 
Join Date: Mar 2009
Location: Phoenix, Arizona (USA)
Posts: 37
Thanks: 8
Thanked 3 Times in 3 Posts
Default

These settings made all the difference in the world for my laptop:

/etc/rc.conf:
Code:
powerd_enable="YES"
powerd_flags="−a adaptive −b adaptive" # CPU Frequency Scaling on AC and Battery
100% Battery charge went from 1.5 hour usage to over 3
Reply With Quote
  #9  
Old May 5th, 2009, 13:17
rocky's Avatar
rocky rocky is offline
Junior Member
 
Join Date: Nov 2008
Location: Vietnam
Posts: 97
Thanks: 15
Thanked 1 Time in 1 Post
Default

Hi all,

I am so sorry for my very late reply. I have no time to test my battery: at office I just get it out and use AC instead.

I am now using FreeBSD-7.2-RELEASE (FreeBSD kool!!). I see that battery still goes out quite quickly.

After 23 minutes of uptime, the battery remains 67%. I guess that I have to replace the battery in next 23 mintures

Any idea?

Thank you for your helps.

=================

My information:

powerd flags: "−a adaptive −b adaptive"

uptime

Code:
7:07PM  up 17 mins, 4 users, load averages: 1.37, 1.21, 0.78
7:14PM  up 24 mins, 5 users, load averages: 0.63, 0.94, 0.81
About cpu.0:

Code:
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU0
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq: 2200
dev.cpu.0.freq_levels: 2200/-1 1925/-1 1650/-1 1375/-1 1100/-1 825/-1 550/-1 275/-1
dev.cpu.0.cx_supported: C1/0
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00%
__________________
System: FreeBSD-7.2 (i386) on Compaq Presario CQ40-401AU
Topic: replace Ubuntu/kvm by FreeBSD/jail
Current task: build Fedora Directory Server on FreeBSD
Reply With Quote
  #10  
Old May 5th, 2009, 16:16
richardpl richardpl is offline
Member
 
Join Date: Nov 2008
Location: Croatia
Posts: 841
Thanks: 6
Thanked 68 Times in 67 Posts
Default

cx_lowest is still C1 it should be C2 or C3:

Add
Code:
economy_cx_lowest="C3"
to your /etc/rc.conf

Last edited by DutchDaemon; May 5th, 2009 at 17:44. Reason: tagfix
Reply With Quote
  #11  
Old May 6th, 2009, 02:44
rocky's Avatar
rocky rocky is offline
Junior Member
 
Join Date: Nov 2008
Location: Vietnam
Posts: 97
Thanks: 15
Thanked 1 Time in 1 Post
Default

Thank you, richardpl.

As you can see my CPU supports only C1/0:

Code:
dev.cpu.0.cx_supported: C1/0
So how can I use C3 state? My CPU is AMD Turion RM74 and I built the kernel with option I686_CPU (see http://viettug.org/attachments/downl...y_kernel.txt):

Below some heading lines from `dmemsg`:

Code:
CPU: AMD Turion(tm) X2 Dual-Core Mobile RM-74 (2200.09-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x200f31  Stepping = 1
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x2001<SSE3,CX16>
  AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x131f<LAHF,CMP,SVM,ExtAPIC,CR8,Prefetch,<b9>,<b12>>
  TSC: P-state invariant
  Cores per package: 2
__________________
System: FreeBSD-7.2 (i386) on Compaq Presario CQ40-401AU
Topic: replace Ubuntu/kvm by FreeBSD/jail
Current task: build Fedora Directory Server on FreeBSD
Reply With Quote
  #12  
Old May 6th, 2009, 15:16
richardpl richardpl is offline
Member
 
Join Date: Nov 2008
Location: Croatia
Posts: 841
Thanks: 6
Thanked 68 Times in 67 Posts
Default

It either is not supported by your CPU or ACPI is broken.
Reply With Quote
  #13  
Old May 6th, 2009, 15:19
richardpl richardpl is offline
Member
 
Join Date: Nov 2008
Location: Croatia
Posts: 841
Thanks: 6
Thanked 68 Times in 67 Posts
Default

Modify
Quote:
powerd flags: "−a adaptive −b adaptive"
to
Code:
powerd flags: "−a adaptive −b adaptive -n adaptive"
Does:
Quote:
dev.cpu.0.freq: 2200
ever change?
Reply With Quote
  #14  
Old May 9th, 2009, 14:01
lme@'s Avatar
lme@ lme@ is offline
FreeBSD Developer
 
Join Date: Oct 2007
Location: Düsseldorf, Germany
Posts: 588
Thanks: 44
Thanked 181 Times in 90 Posts
Default

Using C3 causes a problem with the internal timer. In 8-Current there is a patch that enables you to use an external timer, so you can use C3 safely.

Take a look at
http://lists.freebsd.org/pipermail/f...ay/006436.html
for suggestions how to save power.
Reply With Quote
  #15  
Old May 10th, 2009, 02:59
rocky's Avatar
rocky rocky is offline
Junior Member
 
Join Date: Nov 2008
Location: Vietnam
Posts: 97
Thanks: 15
Thanked 1 Time in 1 Post
Default

Thank you all for helps.

I will try and report the result.

Regards,

-- rocky
__________________
System: FreeBSD-7.2 (i386) on Compaq Presario CQ40-401AU
Topic: replace Ubuntu/kvm by FreeBSD/jail
Current task: build Fedora Directory Server on FreeBSD
Reply With Quote
Reply

Tags
battery

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Laptop battery management octix System Hardware 16 April 8th, 2010 00:15


All times are GMT +1. The time now is 19:59.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0