Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Jan 2012 04:13:38 +0100
From:      "Julian H. Stacey" <jhs@berklix.com>
To:        mobile@freebsd.org
Cc:        mav@freebsd.org, Gary Jennejohn <gljennjohn@googlemail.com>, "Clive Ashbolt \(Work\)" <clive.ashbolt@t-systems.com>, "Julian H. Stacey" <jhs@berklix.com>, Boris Kochergin <spawk@acm.poly.edu>, brucec@freebsd.org
Subject:   powerd to use sysctl to import temps to drop freq to avoid heat crash
Message-ID:  <201201020313.q023DdG2051231@fire.js.berklix.net>

next in thread | raw e-mail | index | archive | help
Hi mobile@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201020313.q023DdG2051231>