View Single Post
  #1   (View Single Post)  
Old 9th November 2013
albator albator is offline
Shell Scout
 
Join Date: Jul 2011
Posts: 98
Default apm -A vs apm -C

Hi

I use OpenBSD 5.4 on my desktop and I'd like apmd to adjust the CPU speed automatically.
I added these lines to /etc/rc.conf.local :
Code:
$ tail -2 /etc/rc.conf.local                                                       
apmd_flags="-C"         # Start apmd in cool running performance adjustment mode
#apmd_flags="-A"         # Set apmd(8) to automatic performance adjustment mode.
After reading the manual page, I thought the automatic mode should be the way to go for a computer always plugged in :

Code:
     -A      Set apmd(8) to automatic performance adjustment mode.  In this
             mode, when CPU idle time falls below 10%, or if the AC power is
             connected and the battery is more than 15% charged, apm raises
             hw.setperf to 100.  Otherwise when CPU idle time is above 30% and
             the system is running on battery power, apm lowers hw.setperf as
             much as possible to reduce power consumption.

     -a      Display the external charger (A/C status).  0 means disconnected,
             1 means connected, 2 means backup power source, and 255 means
             unknown.

     -b      Display the battery status.  0 means high, 1 means low, 2 means
             critical, 3 means charging, 4 means absent, and 255 means
             unknown.
     -C      Set apmd(8) to cool running performance adjustment mode.  In this
             mode, when CPU idle time falls below 10%, apm raises hw.setperf
             as much as necessary.  Otherwise when CPU idle time is above 30%,
             apm lowers hw.setperf as much as possible to reduce heat, noise,
             and power consumption.
When I use this mode, even with a load near 0% the speed remains at its maximum.
If I use the cool mode, CPU scaling works, but is not triggered fast enough making the computer sluggish

Below some additionnal information :
Code:
$ apm -a  
255
$ apm -b
4
$ apm -bv            
Battery state: absent
$ apm -av            
A/C adapter state: not known

$ dmesg|grep -i athlon
cpu0: AMD Athlon(tm) II X3 455 Processor, 3315.01 MHz
cpu1: AMD Athlon(tm) II X3 455 Processor, 3314.68 MHz
cpu2: AMD Athlon(tm) II X3 455 Processor, 3314.68 MHz

$ dmesg|grep speeds
cpu0: 3315 MHz: speeds: 3300 2600 2100 800 MHz

$ sysctl|grep cpu    
kern.ccpu=1948
hw.ncpu=3
hw.cpuspeed=3300
hw.ncpufound=3
machdep.cpuvendor=AuthenticAMD
machdep.cpuid=1052499
machdep.cpufeature=396098559


$ sysctl|grep volt   
hw.sensors.it0.volt0=0.99 VDC (VCORE_A)
hw.sensors.it0.volt1=1.49 VDC (VCORE_B)
hw.sensors.it0.volt2=3.34 VDC (+3.3V)
hw.sensors.it0.volt3=4.97 VDC (+5V)
hw.sensors.it0.volt4=12.48 VDC (+12V)
hw.sensors.it0.volt5=-7.69 VDC (-12V)
hw.sensors.it0.volt6=4.05 VDC (-5V)
hw.sensors.it0.volt7=3.60 VDC (+5VSB)
hw.sensors.it0.volt8=3.31 VDC (VBAT)

$ tail /var/log/daemon
apmd: battery status: absent. external power status: not known. estimated battery life 0%
apmd: setting hw.setperf automatically
Could you tell me if any of you use apm too and if it works the same way ?

Thanks
Reply With Quote