From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 20 16:57:59 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB8801065672 for ; Mon, 20 Jul 2009 16:57:59 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.210.181]) by mx1.freebsd.org (Postfix) with ESMTP id 559E28FC08 for ; Mon, 20 Jul 2009 16:57:59 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: by yxe11 with SMTP id 11so3841308yxe.3 for ; Mon, 20 Jul 2009 09:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=mdYKiCbKJGbOBJosM5iKPCItoA67HErBI1Zq5bvPn/o=; b=liwXg9zGDzw+GEjPn/8ZEfyDUxAJSbC8JA7qtMeooUaOWrGyms6gp5XXKhJ2S9PTH2 L1f1ISPJr6OxrdmuS4yLLnEFlcy+PNaHRjriF2/LtUBpy5fioJqCG6KaLF3ZZmVu4yyC NAsVPbvcs2oW3yuxjQvXKJE8uqDzyQg8iFQ2c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=YuGkD11yooTAALkUFemkap/HZhMM1hjr5NZof47qmXKOrK1fnrbvv0IbnWPDoz0ESh qf/yZMLthZ2rTcUiSwujA+7fW3f0ECQnDTLo0gXPCUIa+VIWaGBKiExAbOZC7YS0bKab z6WVYtbPSeY8/sAe1sQKpP1DeilQwDhugkadg= Received: by 10.90.67.6 with SMTP id p6mr1034245aga.115.1248109078375; Mon, 20 Jul 2009 09:57:58 -0700 (PDT) Received: from dragonmini.dg ([196.34.241.123]) by mx.google.com with ESMTPS id 39sm1665434aga.21.2009.07.20.09.57.54 (version=SSLv3 cipher=RC4-MD5); Mon, 20 Jul 2009 09:57:56 -0700 (PDT) From: David Naylor Organization: Private To: Peter Harrison Date: Mon, 20 Jul 2009 18:59:18 +0200 User-Agent: KMail/1.9.10 References: <200906181407.11607.naylor.b.david@gmail.com> <200907131447.24702.naylor.b.david@gmail.com> <20090713195836.GA1093@ideapad.piggybox> In-Reply-To: <20090713195836.GA1093@ideapad.piggybox> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4120473.FjNFMnlG9E"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200907201859.21882.naylor.b.david@gmail.com> Cc: freebsd-acpi@freebsd.org Subject: Re: [PATCH] Lenovo S10(e) ACPI 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: Mon, 20 Jul 2009 16:58:00 -0000 --nextPart4120473.FjNFMnlG9E Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, How is the testing going? I've actually had the symptom you described (twi= ce=20 I think). In my case the screen goes blank (but still on) and no power off= =2E =20 The first time the battery was dead when it shouldn't have (didn't wait for= it=20 to power down), the second I was there to 'witness' it. =20 These are, for me, very sporadic events. Since some timeouts still occur I= =20 suspect one is happening for the shutdown command. See at the bottom for a= =20 quick discussion. =20 On Monday 13 July 2009 21:58:36 Peter Harrison wrote: > > First some diagnostics, please do the following: > > 1) On a console: > > # uname -a > > FreeBSD ideapad.piggybox 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Sat Jun > 20 11:03:21 BST 2009 =20 > peter@ideapad.piggybox:/usr/obj/usr/src/sys/GENERIC i386 Upgrading to 8 might improve things. =20 > > # sysctl debug.acpi > > debug.acpi.suspend_bounce: 0 > debug.acpi.do_powerstate: 1 > debug.acpi.acpi_ca_version: 20070320 > debug.acpi.ec.timeout: 100 > debug.acpi.ec.polled: 0 > debug.acpi.ec.gpe: 1 > debug.acpi.ec.delay: 200 > debug.acpi.ec.burst: 0 > debug.acpi.batt.batt_sleep_ms: 0 > debug.acpi.semaphore_debug: 0 > debug.acpi.resume_beep: 0 Everything looks good, although your acpi_ca_version is outdated (newer=20 in -current). Increasing timeout might help (say 750), also increasing del= ay=20 won't hurt [don't forget delay is in microseconds whereas timeout is in=20 milliseconds]. =20 > > 2) What version are you using (I've got the S10e)? > > S10e - BIOS reports model number 40684AG Same (except XG suffix) > > 3) What version of the BIOS are you running? > > BIOS version is 14CN51WW Difference, I've got 14CN67WW. I'll be interested to know how you flash yo= ur=20 system (if you don't have Windows installed). =20 > > 4) Is there any predictors as to when the system will not shutdown? > > Not that I've been able to determine. I thought at one point that it had = to > do with the amount of charge in the battery, or whether it was mains > connected. But I can't detect a pattern. Same > > 5) What are the last messages printed on the console (when shutdown > > fails)? > > Sometimes normal 'Syncing disks, vnodes remaining...' sometimes the corre= ct > message but garbled. > > Whether the message is garbled or not seems to have no bearing on whether > the system powers off or not. My suspected solution: If I understand the situation correctly, in spite of my hackery there is st= ill=20 a timeout happening. This sometimes happens at the most unfortunate time o= f=20 a powerdown preventing the BIOS from receiving the command to switch of=20 power. =20 I suspect that FreeBSD doesn't try to reissue the power down command if it= =20 fails and just abandons things. If I understand the Linux code correctly i= n=20 the heart of the acpi_ec code: if there is a command timeout it will reset= =20 the EC and reissue the command, so in effect Linux reissues. =20 One place to look is the ACPI shutdown code and make it retry a power-down = if=20 it fails, or make the acpi_ec more robust to EC timeouts. =20 I think this will be a good time to consult someone who actually has an=20 understanding of ACPI (especially the EC). =20 Any ideas welcome. Regards --nextPart4120473.FjNFMnlG9E Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAkpkomkACgkQUaaFgP9pFrK/QgCfVUQi2H94MM+jANaWrhw6hU7p v4UAn2A+BaRPCWLs8j4Vs3+QwXUJPuow =/YNS -----END PGP SIGNATURE----- --nextPart4120473.FjNFMnlG9E--