View Single Post
  #9   (View Single Post)  
Old 20th November 2013
albator albator is offline
Shell Scout
 
Join Date: Jul 2011
Posts: 98
Default

Still performances were too slow using the -C flag with my script.
So I directly changed the source code of apmd :
Code:
# diff apmd.c apmd.c.ori
68,69c68,69
< #define PERFINCTHRES 90
< #define PERFDECTHRES 10
---
> #define PERFINCTHRES 10
> #define PERFDECTHRES 30
This way, using apm -C reacts the way I wanted it to, and the temperature remains low when the computer is not used.
This is strange though that apm had been coded like this in OpenBSD, making it useless.
When you look at FreeBSD equivalent, there are four modes and not only a max and a min :
Code:
 The powerd utility monitors the system state and sets various power con-
     trol options accordingly.	It offers power-saving modes that can be indi-
     vidually selected for operation on AC power or batteries.

     maximum	 Choose the highest performance values.  May be abbreviated as
		 max.

     minimum	 Choose the lowest performance values to get the most power
		 savings.  May be abbreviated as min.

     adaptive	 Attempt to strike a balance by degrading performance when the
		 system appears idle and increasing it when the system is
		 busy.	It offers a good balance between a small performance
		 loss for greatly increased power savings.  May be abbreviated
		 as adp.

     hiadaptive  Like adaptive mode, but tuned for systems where performance
		 and interactivity are more important than power consumption.
		 It increases frequency faster, reduces frequency less aggres-
		 sively, and will maintain full frequency for longer.  May be
		 abbreviated as hadp.
Reply With Quote