From owner-freebsd-acpi@FreeBSD.ORG Sat Jan 27 20:04:48 2007 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0800B16A405 for ; Sat, 27 Jan 2007 20:04:48 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.freebsd.org (Postfix) with ESMTP id 4142213C518 for ; Sat, 27 Jan 2007 20:04:47 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from kasuga.mahoroba.org (IDENT:DY3LpkCRXbK+5iEtxmdsgF/WhAsKG6IEdeUdyJIqhT5ycfYh8q6M1+t5M2+uwEgy@kasuga.mahoroba.org [IPv6:2001:2f0:104:8010:20b:97ff:fe2e:b521]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.8/8.13.8) with ESMTP/inet6 id l0RJpEtF057761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 28 Jan 2007 04:51:18 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sun, 28 Jan 2007 04:51:13 +0900 Message-ID: From: Hajimu UMEMOTO To: "Abdullah Ibn Hamad Al-Marri" In-Reply-To: <499c70c0701270721v224c8bc0icfadc3536f4b6540@mail.gmail.com> References: <499c70c0701201007i6d77c35bm95f25d1f3451f7a3@mail.gmail.com> <20070124201612.GD12197@poupinou.org> <499c70c0701250758x174c297fu31e8ef00751fbf32@mail.gmail.com> <45B90872.1000401@root.org> <499c70c0701270721v224c8bc0icfadc3536f4b6540@mail.gmail.com> User-Agent: xcite1.38> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (i386-pc-freebsd) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 6.2-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Sun_Jan_28_04:51:13_2007-1" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (ameno.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Sun, 28 Jan 2007 04:51:19 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on ameno.mahoroba.org Cc: freebsd-acpi@freebsd.org Subject: Re: Inspiron 6400 1505e Can't get passive cooling while in AC power X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2007 20:04:48 -0000 --Multipart_Sun_Jan_28_04:51:13_2007-1 Content-Type: text/plain; charset=US-ASCII Hi, >>>>> On Sat, 27 Jan 2007 15:21:19 +0000 >>>>> "Abdullah Ibn Hamad Al-Marri" said: almarrie> Thank you for your kind prompt to help, but it didn't do the trick. almarrie> Jan 27 15:16:12 DELL root: /etc/rc.d/sysctl: WARNING: sysctl almarrie> hw.acpi.thermal.tz0 almarrie> .user_override does not exist. It should be hw.acpi.thermal.user_override=1. However, perhaps, it still doesn't work for you. Your BIOS's thermal zone might not specify _TC1, _TC2 and _TSP correctly. They are required for passive cooling. Since, they are not visible through sysctl, you cannot change the values. If it is your case, please try the attached patch. It adds hw.acpi.thermal.tz0._TC1, hw.acpi.thermal.tz0._TC2 and hw.acpi.thermal.tz0._TSP. Choosing the values is an issue. For your reference, my laptop (Panasonic Let'snote CF-R4) has _TC1=0, _TC2=12, _TSP=40. Sincerely, --Multipart_Sun_Jan_28_04:51:13_2007-1 Content-Type: text/x-patch; type=patch; charset=US-ASCII Content-Disposition: attachment; filename="acpi_thermal.c-passive_sysctl.diff" Index: sys/dev/acpica/acpi_thermal.c diff -u -p sys/dev/acpica/acpi_thermal.c.orig sys/dev/acpica/acpi_thermal.c --- sys/dev/acpica/acpi_thermal.c.orig Sun Sep 10 16:38:59 2006 +++ sys/dev/acpica/acpi_thermal.c Mon Sep 18 01:44:08 2006 @@ -133,6 +133,7 @@ static void acpi_tz_sanity(struct acpi_t static int acpi_tz_active_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_tz_cooling_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_tz_temp_sysctl(SYSCTL_HANDLER_ARGS); +static int acpi_tz_passive_sysctl(SYSCTL_HANDLER_ARGS); static void acpi_tz_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context); static void acpi_tz_signal(struct acpi_tz_softc *sc, int flags); @@ -293,6 +294,21 @@ acpi_tz_attach(device_t dev) SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_ACx", CTLFLAG_RD, &sc->tz_zone.ac, sizeof(sc->tz_zone.ac), "IK", ""); + SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "_TC1", CTLTYPE_INT | CTLFLAG_RW, + sc, offsetof(struct acpi_tz_softc, tz_zone.tc1), + acpi_tz_passive_sysctl, "I", + "thermal constant 1 for passive cooling"); + SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "_TC2", CTLTYPE_INT | CTLFLAG_RW, + sc, offsetof(struct acpi_tz_softc, tz_zone.tc2), + acpi_tz_passive_sysctl, "I", + "thermal constant 2 for passive cooling"); + SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "_TSP", CTLTYPE_INT | CTLFLAG_RW, + sc, offsetof(struct acpi_tz_softc, tz_zone.tsp), + acpi_tz_passive_sysctl, "I", + "thermal sampling period for passive cooling"); /* * Create thread to service all of the thermal zones. Register @@ -738,6 +754,30 @@ acpi_tz_temp_sysctl(SYSCTL_HANDLER_ARGS) return (EINVAL); *temp_ptr = temp; + return (0); +} + +static int +acpi_tz_passive_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct acpi_tz_softc *sc; + int val, *val_ptr; + int error; + + sc = oidp->oid_arg1; + val_ptr = (int *)((uintptr_t)sc + oidp->oid_arg2); + val = *val_ptr; + error = sysctl_handle_int(oidp, &val, 0, req); + + /* Error or no new value */ + if (error != 0 || req->newptr == NULL) + return (error); + + /* Only allow changing settings if override is set. */ + if (!acpi_tz_override) + return (EPERM); + + *val_ptr = val; return (0); } --Multipart_Sun_Jan_28_04:51:13_2007-1 Content-Type: text/plain; charset=US-ASCII -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ --Multipart_Sun_Jan_28_04:51:13_2007-1--