Subject: speedstep does the wrong thing after 'resume'
To: None <current-users@netbsd.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: current-users
Date: 12/26/2004 20:25:25
On a Thinkpad T42 with ENHANCED_SPEEDSTEP enabled, the CPU frequency 
seems to be reset to maximum after a resume.  I ran a loop checking the 
current frequency every 5 seconds.  I went to battery; the CPU speed 
dropped appropriately, via my /etc/apm/batter script.  I then suspended
the machine; when I resumed, the CPU speed was set to maximum.  My fix 
is to include this text in /etc/apm/resume:

case `apm -d -a` in
        0|2) sh /etc/apm/battery;;
        1) sh /etc/apm/line;;
esac

I think (but haven't verified) that the system misses transitions to/
from line power on a resume.  This script will catch that, too.

		--Prof. Steven M. Bellovin, http://www.cs.columbia.edu/~smb