Date: Sun, 28 Jan 2007 04:51:13 +0900 From: Hajimu UMEMOTO <ume@mahoroba.org> To: "Abdullah Ibn Hamad Al-Marri" <almarrie@gmail.com> Cc: freebsd-acpi@freebsd.org Subject: Re: Inspiron 6400 1505e Can't get passive cooling while in AC power Message-ID: <ygehcucp7ta.wl%ume@mahoroba.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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" <almarrie@gmail.com> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygehcucp7ta.wl%ume>