Subject: port-i386/28790: speedstep does the wrong thing after 'resume'
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <smb@cs.columbia.edu>
List: netbsd-bugs
Date: 12/27/2004 17:42:01
>Number:         28790
>Category:       port-i386
>Synopsis:       with speedstep, the CPU frequency is high after a 'resume'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 27 17:42:01 +0000 2004
>Originator:     Steven M. Bellovin
>Release:        NetBSD 2.99.11
>Organization:
>Environment:
	
	
System: NetBSD berkshire.machshav.com 2.99.11 NetBSD 2.99.11 (BERKSHIRE) #0: Sat Dec 25 08:54:22 EST 2004 smb@berkshire.machshav.com:/usr/src/sys/arch/i386/compile/BERKSHIRE i386
Architecture: i386
Machine: i386
>Description:
	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.

	I think (but haven't verified) that the system misses transitions to/
	from line power on a resume.
>How-To-Repeat:
	Go to battery; use sysctl to check the current frequency.
	Suspend, resume, then check again.
>Fix:
	My work-around 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

>Unformatted: