From owner-freebsd-mobile@FreeBSD.ORG Sat Aug 27 14:52:42 2005 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F94716A41F for ; Sat, 27 Aug 2005 14:52:42 +0000 (GMT) (envelope-from ph.schulz@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id D41C443D4C for ; Sat, 27 Aug 2005 14:52:38 +0000 (GMT) (envelope-from ph.schulz@gmx.de) Received: (qmail invoked by alias); 27 Aug 2005 14:52:37 -0000 Received: from p54A4065C.dip0.t-ipconnect.de (EHLO [192.168.1.35]) [84.164.6.92] by mail.gmx.net (mp028) with SMTP; 27 Aug 2005 16:52:37 +0200 X-Authenticated: #1954550 Message-ID: <43107E21.5010400@gmx.de> Date: Sat, 27 Aug 2005 16:52:17 +0200 From: "Philip S. Schulz" User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050724) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stefan Farfeleder References: <20050827140129.GB595@wombat.fafoe.narf.at> In-Reply-To: <20050827140129.GB595@wombat.fafoe.narf.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-mobile@freebsd.org Subject: Re: acpi_perf error, powerd exiting X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 14:52:42 -0000 Stefan Farfeleder wrote: > Hi, > > on my ThinkPad R32 (dmesg attached), acpi_perf reports the following > error at times, usually after a period of inactivity: > > acpi_perf0: Px transition to 1200 failed > acpi_perf0: set freq failed, err 6 > > This causes powerd to terminate. It seems to be a temporary error, > because if I restart powerd, it works again. Should powerd be more > fault-tolerant, is this an acpi_perf bug or my hardware broken? > powerd does not recover from such errors, so the fact that it "dies" (actually it prints an error message to stderr and exits) is expected. I guess powerd can easily sort of recover (i.e. continue to run and re-attempt the frequency the next time the frequency needs to be adjusted) from the error you're seeing, but I think that really is no real fix for your problem. See the patch included in this message but please note that I haven't tested it since I don't use acpi_perf and also please note that I don't know what effects this has in interaction with cpufreq and acpi_perf. As to whether you're seeing a acpi_perf bug or experience hardware problems: I don't know. Regards, Phil. Index: powerd.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/powerd/powerd.c,v retrieving revision 1.11 diff -u -r1.11 powerd.c --- powerd.c 24 Aug 2005 19:42:40 -0000 1.11 +++ powerd.c 27 Aug 2005 14:46:48 -0000 @@ -462,7 +462,7 @@ cpu_running_mark, curfreq, freqs[i]); } if (set_freq(freqs[i])) - err(1, "error setting CPU frequency %d", + warn("error setting CPU frequency %d", freqs[i]); } else if (idle > (total * cpu_idle_mark) / 100 && curfreq > freqs[numfreqs - 1]) { @@ -473,7 +473,7 @@ cpu_idle_mark, curfreq, freqs[i]); } if (set_freq(freqs[i])) - err(1, "error setting CPU frequency %d", + warn("error setting CPU frequency %d", freqs[i]); } } -- Don't fix it if it ain't broke.