powerd to use sysctl to import temps to drop freq to avoid heat crash

Julian H. Stacey jhs at berklix.com
Mon Jan 2 03:28:35 UTC 2012


Hi mobile at freebsd.org, CC a few others.

I propose to hack src/usr.sbin/powerd/powerd.c
	To import temperatures via sysctl, & if too high, to forcibly
	reduce CPU frequency, even if CPU load is high,
because my new HP Pavillion notebook keeps over heating & crashing.

dmesg & sysctl etc diagnostics at
	http://berklix.com/~jhs/hardware/hp/pavilion/dm3-1155ea/
CPU: AMD Athlon(tm) Neo X2 Dual Core Processor L335 (1595.96-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x60fb2  Family = f  Model = 6b  Stepping = 2

Is this re-inventing the wheel ?  
Anyone else out there working on or know of similar code ?

mgdiff 8.2-RELEASE/src/usr.sbin/powerd/powerd.c \
	/pub/FreeBSD/branches/-current/src/usr.sbin/powerd/powerd.c
does not show a lot of difference.

>From 
http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/powerd/powerd.c
   I added a few people to CC particularly mav@ has an interesting comment
	Wed Jun 16 15:09:45 2010 UTC (
	Freq sysctls are quite heavy due to set of malloc()/free()
	calls. Avoid reading current frequency on every period.
	Instead do it only after changing and periodically from
	time to time if somebody else change it.

	Also dynamically decrease sampling frequency up to 4 times
	on inactivity,

   Gary J: there's a comment at Fri Jan 9 22:10:07 2009  re. more then 2 CPUs

   I added Clive who may have some URL to CPU temps.

To
	 /boot/loader.conf  
I just added
	 acpi_hp_load="YES" 
(after reboot) does not produce /dev/hpcmi

Running 80% idle (just a fsck_ufs) I see:
	hw.acpi.thermal.tz0.temperature: 67.0C
	dev.acpi_hp.0.hdd_temperature: 4

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
 Reply below not above, cumulative like a play script, & indent with "> ".
 Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.


More information about the freebsd-mobile mailing list