Hi,
I've just found that when using apmd with automatic performance mode
without battery connected, performance is set to minimum. I often
detach my battery when using AC for a long time. It's easier for me to
have highest performance when AC without battery and 'apm -H'.
I'm proposing patch that will do aditional check if there's battery and
if it's absent increase performance up to 100%. This is simple solution
which I'm using and I think that it's good extention for automatic
performance mode.
Cheers,
pmp
Index: apmd.c
===================================================================
RCS file: /cvs/src/usr.sbin/apmd/apmd.c,v
retrieving revision 1.55
diff -u -r1.55 apmd.c
--- apmd.c 30 Mar 2010 17:42:05 -0000 1.55
+++ apmd.c 1 Apr 2010 15:15:04 -0000
@@ -320,9 +320,11 @@
case PERF_AUTO:
/*
* force setperf towards the max if we are connected to AC
- * power and have a battery life greater than 15%
+ * power and have a battery life greater than 15% or
+ * battery is absent
*/
- if (pinfo->ac_state == APM_AC_ON && pinfo->battery_life > 15)
+ if (pinfo->ac_state == APM_AC_ON && pinfo->battery_life > 15
+ || pinfo->battery_state == APM_BATTERY_ABSENT)
forcehi = 1;
break;
case PERF_COOL: