From owner-freebsd-acpi@FreeBSD.ORG Sun Nov 22 14:23:49 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 F1E341065679 for ; Sun, 22 Nov 2009 14:23:49 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 153A18FC08 for ; Sun, 22 Nov 2009 14:23:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id nAMENjLD004727; Mon, 23 Nov 2009 01:23:46 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 23 Nov 2009 01:23:45 +1100 (EST) From: Ian Smith To: Jerry Marles In-Reply-To: <1258714188.3487.38.camel@lenny.internal> Message-ID: <20091122235353.R65262@sola.nimnet.asn.au> References: <1257798198.3265.12.camel@lenny.internal> <1257805380.3265.21.camel@lenny.internal> <20091115164712.D65262@sola.nimnet.asn.au> <1258394735.3278.34.camel@lenny.internal> <1258714188.3487.38.camel@lenny.internal> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-acpi@freebsd.org Subject: Re: HP Pavillion does not power off 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: Sun, 22 Nov 2009 14:23:50 -0000 On Fri, 20 Nov 2009, Jerry Marles wrote: > On Mon, 2009-11-16 at 18:05 +0000, Jerry Marles wrote: > > On Sun, 2009-11-15 at 16:58 +1100, Ian Smith wrote: > > > On Mon, 9 Nov 2009, Jerry Marles wrote: > > > > On Mon, 2009-11-09 at 20:23 +0000, Jerry Marles wrote: > > > > > On Sun, 2009-11-08 at 10:41 +0000, Jerry Marles wrote: > > > > > Hello, > > > > > > > > > > > > I have a HP Pavillion desktop PC model g3001.uk. The problem I have is > > > > > > that halt -p does not power it off. The light on the power button goes > > > > > > off but I can hear that it is still running. If I hold down the power > > > > > > button for a few seconds the power can be heard to go off but then it > > > > > > boots right back up again. Windows and Linux can power it off > > > > > > successfully. > > > > > > > > > > > > Regards > > > > > > > > > > > > Jerry Marles > > > > > > > > > > > > > > > > with further investigation I have found that > > > > > > > > > > acpiconf -s 5 results in invalid sleep type (5) > > > > > > > > > > but acpiconf -s 4 powers it off successfully so if I could just make > > > > > halt -p do whatever acpiconf -s 4 is doing the problem would be solved. > > > > > > > > > > any advice would be much appreciated. > > > > > > > > dmesg after boot -v is here http://www.marles.org/acpi/dmesg.txt > > > > > > > > sysctl hw.acpi is here http://www.marles.org/acpi/hwacpi.txt > > > > > > > > acpidump is here http://www.marles.org/acpi/acpidump.txt > > > > > > Seeing noone else has had a go: > > > > > > It seems pretty strange that acpiconf -s 4 powers it off properly. > > > your hwacpi.txt only shows .. > > > > > > hw.acpi.supported_sleep_state: S1 S3 S4 S5 > > > hw.acpi.power_button_state: S5 > > > hw.acpi.sleep_button_state: S1 > > > hw.acpi.lid_switch_state: NONE > > > hw.acpi.standby_state: S1 > > > hw.acpi.suspend_state: S3 > > > hw.acpi.sleep_delay: 1 > > > hw.acpi.s4bios: 0 > > > hw.acpi.verbose: 1 > > > hw.acpi.disable_on_reboot: 0 > > > hw.acpi.handle_reboot: 0 > > > hw.acpi.reset_video: 0 > > > hw.acpi.cpu.cx_lowest: C1 > > > > > > .. but s4bios is 0 (no BIOS support for S4) and I wonder what's happened > > > to your hw.acpi.thermal settings also, but .. just a long shot .. > > > > > > What happens if you set sysctl hw.acpi.power_button_state=S4 and then > > > try halt -p ? .. probably better off using 'shutdown -p now' actually. > > That does change things in that now if I hold down the power button > > after halt -p it just goes off rather than booting straight back up > > again. So that is an improvement. Thanks. This is not the right way to do things though .. > > Jerry > > As Windows, Linux and Solaris can power this machine off would it be > reasonable to conclude that this is just a feature of FreeBSD and not a > fault in my ACPI tables? looking at the source code for acpiconf leads No I don't think you can assume that; S5 poweroff works for most folks, and there seems to be a lot of sloppy if not broken AML out there. > me to conclude that FreeBSD just does not implement ACPI sleep state S5, > acpiconf certainly does not. In the handbook 11.16 Using and Debugging > FreeBSD ACPI says > > "This means that we can use acpiconf -s to test S3, S4OS, and S5." > > That is clearly wrong. It's wrong on two counts, at least on my 7.0-R and your 7.2-R; you're right that acpiconf doesn't try S5, and AFAIK S4OS does not yet exist on FreeBSD, so the handbook is, er, a bit optimistic in a couple of places! (I haven't checked what's new in 8.0, but think I'd have heard if S4OS was any further along than an incomplete Google SoC project a while ago) To be fair, acpi(4) under S4 does say that S4OS isn't yet supported. Here S5 (from the power button) works fine on my Thinkpad T23; properly running shutdown scripts and synching disks before powering off cleanly. And S3 (suspend to RAM) and subsequent resume works fine either by using acpiconf -s3 or the sleep button, which is Fn-F4 here. You didn't mention whether your system works with S3 suspend/resume? So just for kicks I tried acpiconf -s4 which hard powered down, without properly shutting down or synching disks (ie dirty after reboot) which I guess is a "don't do that then!" though in theory it should check that S4bios is 1 (or S4OS has arrived!) before diving off into space. > I discovered that the motherboard is actually made by Foxconn a > 945GZ7MC. Googling Foxconn lead me to all sorts of interesting rants > about Linux ACPI. I also found some useful articles about how to go > about debugging ACPI tables and wondered if I could contribute > something that might be useful to others if I could get to the bottom > of the problem. I guess I would probably just waste a lot of time > going down that road. You'd likely spend a lot of time, can't say if it'd be wasted or not :) > I have been using FreeBSD since 2.15 around 1996 so I will be very > disappointed to have to confine it to VirtualBox until I replace this > hardware. I also find it hard to believe that I am the only one with > this problem should I just create a PR? You got me rereading the handbook section, after a long time. There are some things you could try before (or while preparing to) submit a PR, in the light of scanning your posted AML. Have you tried? (from handbook): 11.16.3.5 System Powers Up After Suspend or Shutdown "First, try setting hw.acpi.disable_on_poweroff="0" in loader.conf(5). This keeps ACPI from disabling various events during the shutdown process. Some systems need this value set to 1 (the default) for the same reason. This usually fixes the problem of a system powering up spontaneously after a suspend or poweroff." And/or from acpi(4) have you tried? maybe playing with: hw.acpi.disable_on_reboot Disable ACPI during the reboot process. Most systems reboot fine with ACPI still enabled, but some require exiting to legacy mode first. Default is 0, leave ACPI enabled. hw.acpi.handle_reboot Use the ACPI Reset Register capability to reboot the system. Default is 0, use legacy reboot support. Some newer systems require use of this register, while some only work with legacy rebooting support. Now I know very little about AML, and the folks that do must be on holidays :) but starting at the end, methods PTS and WAK are clearly about suspend and wakeup, and method _PTS refers to OSFL () which returns OSVR according to OS version: if I read it right, 4 for win2k and NT, 0 for most windows versions, 2 for winME (hee) and - perhaps usefully - 3 for Linux, and 1 otherwise, with reference to: 11.16.5.1 _OS dependencies "Some AML assumes the world consists of various Windows versions. You can tell FreeBSD to claim it is any OS to see if this fixes problems you may have. An easy way to override this is to set hw.acpi.osname="Windows 2001" in /boot/loader.conf or other similar strings you find in the ASL." OSFL is called in various places as well as in _PTS (put to sleep?) so a choice may well influence other aspects of ACPI as well as sleep states. (If anyone who actually knows what they're talking about is out there, please chime in; you can see I'm paddling way out of my depth ..) cheers, Ian From owner-freebsd-acpi@FreeBSD.ORG Sun Nov 22 15:30:52 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 C58271065670; Sun, 22 Nov 2009 15:30:52 +0000 (UTC) (envelope-from freebsd@abv.bg) Received: from smtp-out.abv.bg (smtp-out.abv.bg [194.153.145.80]) by mx1.freebsd.org (Postfix) with ESMTP id 772748FC24; Sun, 22 Nov 2009 15:30:52 +0000 (UTC) Received: from mail53.abv.bg (mail53.ni.bg [192.168.151.29]) by smtp-out.abv.bg (Postfix) with ESMTP id 7FF2B87AC0; Sun, 22 Nov 2009 17:13:36 +0200 (EET) DomainKey-Signature: a=rsa-sha1; s=smtp-out; d=abv.bg; c=simple; q=dns; b=UEHM38gGNj6iF5DSri1mD/9oi07ol/0IBVfEgjq8Ca/9bVgbXhPiza4lpSgWPOVFd m/ipJKJSxPcemc3XzqFDpo6hl20rph+kYAKZ5R4eUTT25L+3rU5r8tuwOOtmYk9lTmp D7BFb6bQETXm24rFdSBkhgl/Qm8Bgpx/Sl0NZpU= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=abv.bg; s=smtp-out; t=1258902816; bh=kevwHKkMwMKX6n9nvOWOuPfHwoPWw5MtrE25TEjrwGQ=; h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:DKIM; b=gtOC+FGOce5UxW9Sf1gwLf56w44B1E/7X+diLnbO4KpW6Jl7QvQEw/NfZARo+PXvY RAok49DUqNHGRvIFilx+Vqgu4Uix1dx38q7xk8a8hmCj21W6Z3I9PB2jJOO/TgwHL5 dGkYyQudzaKv5T7Z312xM8qYndSfqe8iTSE+1aeo= Received: from mail53.abv.bg (localhost.localdomain [127.0.0.1]) by mail53.abv.bg (Postfix) with ESMTP id C0F9B241BEA; Sun, 22 Nov 2009 17:13:14 +0200 (EET) Date: Sun, 22 Nov 2009 17:13:14 +0200 (EET) From: Mario Pavlov To: freebsd-stable@freebsd.org, freebsd-current@freebsd.org, freebsd-acpi@freebsd.org Message-ID: <24772986.196751.1258902794788.JavaMail.apache@mail53.abv.bg> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Priority: 3 X-Mailer: AbvMail 1.0 X-Originating-IP: 78.128.21.208 Cc: Subject: BIOS resource allocation and FreeBSD 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: Sun, 22 Nov 2009 15:30:52 -0000 Hi, I see this problem over and over again... some time ago I created this PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/135070 and I just saw it has been duplicated: http://www.freebsd.org/cgi/query-pr.cgi?pr=140751 maybe the later one should be closed as a duplicate... anyway I think I saw this problem reported for more than 10 different laptops in the lists and the forums...maybe it's time someone to fix this issue ... I'm willing to donate money if someone can take and fix this (yes, I'm serious, I think it's worth it) regards, mgp ----------------------------------------------------------------- Вижте водещите новини от Vesti.bg! http://www.vesti.bg From owner-freebsd-acpi@FreeBSD.ORG Mon Nov 23 11:06:46 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 EBCF3106566C for ; Mon, 23 Nov 2009 11:06:46 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BEEA88FC0C for ; Mon, 23 Nov 2009 11:06:46 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nANB6kF5070028 for ; Mon, 23 Nov 2009 11:06:46 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nANB6kpo070026 for freebsd-acpi@FreeBSD.org; Mon, 23 Nov 2009 11:06:46 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 23 Nov 2009 11:06:46 GMT Message-Id: <200911231106.nANB6kpo070026@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org 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, 23 Nov 2009 11:06:47 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o amd64/140751 acpi [acpi] BIOS resource allocation and FreeBSD ACPI in TO o kern/139088 acpi [acpi] ACPI Exception: AE_AML_INFINITE_LOOP error o amd64/138210 acpi [acpi] acer aspire 5536 ACPI problems (S3, brightness, o bin/137053 acpi [hang] FreeBSD 8.0 BETA2Compaq Mini 700 locks on boot o kern/137042 acpi [acpi] hp laptop's lcd not wakes up after suspend to r o kern/136808 acpi [acpi] panic when switching to s3 o i386/136008 acpi [acpi] Dell Vostro 1310 will not shutdown (Requires us o bin/135349 acpi [patch] teach acpidump(8) to disassemble arbitrary mem o kern/135070 acpi [acpi] [patch] BIOS resource allocation and FreeBSD AC o kern/132602 acpi [acpi] ACPI Problem with Intel SS4200: System does not o kern/130683 acpi [ACPI] shutdown hangs after syncing disks - ACPI race? o i386/129953 acpi [acpi] ACPI timeout (CDROM) with Shuttle X27D o kern/129618 acpi [acpi] Problem with ACPI on HP Pavilion DV2899 laptop o kern/129563 acpi [acpi] sleep broken on IBM/Lenovo T61 in amd64 mode f kern/128639 acpi [patch] [acpi_asus] acpi for ASUS A6F,A3E,A3F,A3N not f kern/128634 acpi [patch] fix acpi_asus(4) in asus a6f laptop o kern/127581 acpi [patch] [acpi_sony] Add support for more Sony features o kern/124744 acpi [acpi] [patch] incorrect _BST result validation for To o kern/124412 acpi [acpi] power off error on Toshiba M40 laptop o kern/123039 acpi [acpi] ACPI AML_BUFFER_LIMIT errors during boot o kern/121504 acpi [patch] Correctly set hw.acpi.osname on certain machin f kern/121454 acpi [pst] Promise SuperTrak SX6000 does not load during bo o amd64/121439 acpi [boot] Installation of FreeBSD 7.0 fails: ACPI problem o kern/121102 acpi [acpi_fujitsu] [patch] update acpi_fujitsu for the P80 o kern/120515 acpi [acpi] [patch] acpi_alloc_wakeup_handler: can't alloc o kern/119356 acpi [acpi]: i386 ACPI wakeup not work due resource exhaust o kern/119200 acpi [acpi] Lid close switch suspends CPU for 1 second on H o kern/118973 acpi [acpi]: Kernel panic with acpi boot o kern/117605 acpi [acpi] [request] add debug.cpufreq.highest o kern/116939 acpi [acpi] PCI-to-PCI misconfigured for bus three and can o i386/114562 acpi [acpi] cardbus is dead after s3 on Thinkpad T43 with a o kern/114165 acpi [acpi] Dell C810 - ACPI problem s kern/112544 acpi [acpi] [patch] Add High Precision Event Timer Driver f o kern/108954 acpi [acpi] 'sleep(1)' sleeps >1 seconds when speedstep (Cx o kern/108695 acpi [acpi]: Fatal trap 9: general protection fault when in o kern/108488 acpi [acpi] ACPI-1304: *** Error: Method execution failed o kern/108017 acpi [acpi]: Acer Aspire 5600 o kern/106924 acpi [acpi] ACPI resume returns g_vfs_done() errors and ker o kern/105537 acpi [acpi] problems in acpi on HP Compaq nc6320 o kern/104625 acpi ACPI on ASUS A8N-32 SLI/ASUS P4P800 does not show ther o kern/102252 acpi acpi thermal does not work on Abit AW8D (intel 975) o kern/97383 acpi Volume buttons on IBM Thinkpad crash system with ACPI s i386/91748 acpi acpi problem on Acer TravelMare 4652LMi (nvidia panic, s kern/91038 acpi [panic] [ata] [acpi] 6.0-RELEASE on Fujitsu Siemens Am s kern/90243 acpi Laptop fan doesn't turn off (ACPI enabled) (Packard Be o i386/83018 acpi [install] Installer will not boot on Asus P4S8X BIOS 1 f kern/81000 acpi [apic] Via 8235 sound card worked great with FreeBSD 5 o i386/79081 acpi ACPI suspend/resume not working on HP nx6110 o kern/76950 acpi ACPI wrongly blacklisted on Micron ClientPro 766Xi sys s kern/73823 acpi [request] acpi / power-on by timer support o i386/72566 acpi ACPI, FreeBSD disables fan on Compaq Armada 1750 o i386/69750 acpi Boot without ACPI failed on ASUS L5 o kern/56024 acpi ACPI suspend drains battery while in S3 o i386/55661 acpi ACPI suspend/resume problem on ARMADA M700 o i386/54756 acpi ACPI suspend/resume problem on CF-W2 laptop 55 problems total. From owner-freebsd-acpi@FreeBSD.ORG Mon Nov 23 18:28:07 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 ADDCE106568B for ; Mon, 23 Nov 2009 18:28:07 +0000 (UTC) (envelope-from jerry@marles.org) Received: from mailforwards.extendcp.co.uk (mailforwards.extendcp.co.uk [79.170.40.74]) by mx1.freebsd.org (Postfix) with ESMTP id 32E348FC1A for ; Mon, 23 Nov 2009 18:28:06 +0000 (UTC) Received: from marles.demon.co.uk ([83.104.58.197] helo=[192.168.1.181]) by mailforwards.extendcp.com with esmtpa (Exim 4.63) id 1NCddt-0001Qs-2y for freebsd-acpi@freebsd.org; Mon, 23 Nov 2009 18:28:05 +0000 From: Jerry Marles To: freebsd-acpi@freebsd.org In-Reply-To: <20091122235353.R65262@sola.nimnet.asn.au> References: <1257798198.3265.12.camel@lenny.internal> <1257805380.3265.21.camel@lenny.internal> <20091115164712.D65262@sola.nimnet.asn.au> <1258394735.3278.34.camel@lenny.internal> <1258714188.3487.38.camel@lenny.internal> <20091122235353.R65262@sola.nimnet.asn.au> Content-Type: text/plain Date: Mon, 23 Nov 2009 18:27:50 +0000 Message-Id: <1259000870.3465.14.camel@lenny.internal> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Subject: Re: HP Pavillion does not power off 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, 23 Nov 2009 18:28:07 -0000 On Mon, 2009-11-23 at 01:23 +1100, Ian Smith wrote: > On Fri, 20 Nov 2009, Jerry Marles wrote: > > On Mon, 2009-11-16 at 18:05 +0000, Jerry Marles wrote: > > > On Sun, 2009-11-15 at 16:58 +1100, Ian Smith wrote: > > > > On Mon, 9 Nov 2009, Jerry Marles wrote: > > > > > On Mon, 2009-11-09 at 20:23 +0000, Jerry Marles wrote: > > > > > > On Sun, 2009-11-08 at 10:41 +0000, Jerry Marles wrote: > > > > > > Hello, > > > > > > > > > > > > > > I have a HP Pavillion desktop PC model g3001.uk. The problem I have is > > > > > > > that halt -p does not power it off. The light on the power button goes > > > > > > > off but I can hear that it is still running. If I hold down the power > > > > > > > button for a few seconds the power can be heard to go off but then it > > > > > > > boots right back up again. Windows and Linux can power it off > > > > > > > successfully. > > > > > > > > > > > > > > Regards > > > > > > > > > > > > > > Jerry Marles > > > > > > > > > > > > > > > > > > > with further investigation I have found that > > > > > > > > > > > > acpiconf -s 5 results in invalid sleep type (5) > > > > > > > > > > > > but acpiconf -s 4 powers it off successfully so if I could just make > > > > > > halt -p do whatever acpiconf -s 4 is doing the problem would be solved. > > > > > > > > > > > > any advice would be much appreciated. > > > > > > > > > > dmesg after boot -v is here http://www.marles.org/acpi/dmesg.txt > > > > > > > > > > sysctl hw.acpi is here http://www.marles.org/acpi/hwacpi.txt > > > > > > > > > > acpidump is here http://www.marles.org/acpi/acpidump.txt > > > > > > > > Seeing noone else has had a go: > > > > > > > > It seems pretty strange that acpiconf -s 4 powers it off properly. > > > > your hwacpi.txt only shows .. > > > > > > > > hw.acpi.supported_sleep_state: S1 S3 S4 S5 > > > > hw.acpi.power_button_state: S5 > > > > hw.acpi.sleep_button_state: S1 > > > > hw.acpi.lid_switch_state: NONE > > > > hw.acpi.standby_state: S1 > > > > hw.acpi.suspend_state: S3 > > > > hw.acpi.sleep_delay: 1 > > > > hw.acpi.s4bios: 0 > > > > hw.acpi.verbose: 1 > > > > hw.acpi.disable_on_reboot: 0 > > > > hw.acpi.handle_reboot: 0 > > > > hw.acpi.reset_video: 0 > > > > hw.acpi.cpu.cx_lowest: C1 > > > > > > > > .. but s4bios is 0 (no BIOS support for S4) and I wonder what's happened > > > > to your hw.acpi.thermal settings also, but .. just a long shot .. > > > > > > > > What happens if you set sysctl hw.acpi.power_button_state=S4 and then > > > > try halt -p ? .. probably better off using 'shutdown -p now' actually. > > > > That does change things in that now if I hold down the power button > > > after halt -p it just goes off rather than booting straight back up > > > again. So that is an improvement. Thanks. > > This is not the right way to do things though .. > > > > Jerry > > > > As Windows, Linux and Solaris can power this machine off would it be > > reasonable to conclude that this is just a feature of FreeBSD and not a > > fault in my ACPI tables? looking at the source code for acpiconf leads > > No I don't think you can assume that; S5 poweroff works for most folks, > and there seems to be a lot of sloppy if not broken AML out there. > > > me to conclude that FreeBSD just does not implement ACPI sleep state S5, > > acpiconf certainly does not. In the handbook 11.16 Using and Debugging > > FreeBSD ACPI says > > > > "This means that we can use acpiconf -s to test S3, S4OS, and S5." > > > > That is clearly wrong. > > It's wrong on two counts, at least on my 7.0-R and your 7.2-R; you're > right that acpiconf doesn't try S5, and AFAIK S4OS does not yet exist on > FreeBSD, so the handbook is, er, a bit optimistic in a couple of places! > > (I haven't checked what's new in 8.0, but think I'd have heard if S4OS > was any further along than an incomplete Google SoC project a while ago) > > To be fair, acpi(4) under S4 does say that S4OS isn't yet supported. > > Here S5 (from the power button) works fine on my Thinkpad T23; properly > running shutdown scripts and synching disks before powering off cleanly. > > And S3 (suspend to RAM) and subsequent resume works fine either by using > acpiconf -s3 or the sleep button, which is Fn-F4 here. > > You didn't mention whether your system works with S3 suspend/resume? > > So just for kicks I tried acpiconf -s4 which hard powered down, without > properly shutting down or synching disks (ie dirty after reboot) which I > guess is a "don't do that then!" though in theory it should check that > S4bios is 1 (or S4OS has arrived!) before diving off into space. > > > I discovered that the motherboard is actually made by Foxconn a > > 945GZ7MC. Googling Foxconn lead me to all sorts of interesting rants > > about Linux ACPI. I also found some useful articles about how to go > > about debugging ACPI tables and wondered if I could contribute > > something that might be useful to others if I could get to the bottom > > of the problem. I guess I would probably just waste a lot of time > > going down that road. > > You'd likely spend a lot of time, can't say if it'd be wasted or not :) > > > I have been using FreeBSD since 2.15 around 1996 so I will be very > > disappointed to have to confine it to VirtualBox until I replace this > > hardware. I also find it hard to believe that I am the only one with > > this problem should I just create a PR? > > You got me rereading the handbook section, after a long time. There are > some things you could try before (or while preparing to) submit a PR, in > the light of scanning your posted AML. Have you tried? (from handbook): > > 11.16.3.5 System Powers Up After Suspend or Shutdown > > "First, try setting hw.acpi.disable_on_poweroff="0" in loader.conf(5). > This keeps ACPI from disabling various events during the shutdown > process. Some systems need this value set to 1 (the default) for the > same reason. This usually fixes the problem of a system powering up > spontaneously after a suspend or poweroff." > > And/or from acpi(4) have you tried? maybe playing with: > > hw.acpi.disable_on_reboot > Disable ACPI during the reboot process. Most systems reboot fine > with ACPI still enabled, but some require exiting to legacy mode > first. Default is 0, leave ACPI enabled. > > hw.acpi.handle_reboot > Use the ACPI Reset Register capability to reboot the system. > Default is 0, use legacy reboot support. Some newer systems > require use of this register, while some only work with legacy > rebooting support. > > Now I know very little about AML, and the folks that do must be on > holidays :) but starting at the end, methods PTS and WAK are clearly > about suspend and wakeup, and method _PTS refers to OSFL () which > returns OSVR according to OS version: if I read it right, 4 for win2k > and NT, 0 for most windows versions, 2 for winME (hee) and - perhaps > usefully - 3 for Linux, and 1 otherwise, with reference to: > > 11.16.5.1 _OS dependencies > > "Some AML assumes the world consists of various Windows versions. You can > tell FreeBSD to claim it is any OS to see if this fixes problems you may > have. An easy way to override this is to set hw.acpi.osname="Windows > 2001" in /boot/loader.conf or other similar strings you find in the ASL." > > OSFL is called in various places as well as in _PTS (put to sleep?) so a > choice may well influence other aspects of ACPI as well as sleep states. > > (If anyone who actually knows what they're talking about is out there, > please chime in; you can see I'm paddling way out of my depth ..) > > cheers, Ian Thanks Ian, Suspend/Resume does not work either but that is not a problem as this is not a laptop so I don't have any need to use it. I have tried all the above suggestions and none of them have helped. I thought I had read somewhere that FreeBSD and Linux are already pretending to be Windows in order to avoid acpi bugs that don't show up in testing because hardware often only gets tested on Windows. Perhaps the handbook and man pages are a little out of date. I tried changing acpiconf.c to make it try to do sleep state S5 the result was. # ./acpiconf -s 5 power off via acpi ioctl not supported acpiconf: request sleep type (5) failed: Device not configured I guess I am looking for a device that is not being detected properly. Perhaps the power button? acpi0: Power Button (fixed) Is it really fixed? Or is this the problem? acpi0: reservation of 0, a0000 (3) failed I am trying to compare what Linux does with FreeBSD but I have not found any other clues yet. Any suggestions on where to look would be very welcome. . Regards Jerry From owner-freebsd-acpi@FreeBSD.ORG Tue Nov 24 18:09:39 2009 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 6CC33106566B; Tue, 24 Nov 2009 18:09:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-acpi@FreeBSD.org Date: Tue, 24 Nov 2009 13:09:26 -0500 User-Agent: KMail/1.6.2 References: <1257676862.3860.14.camel@lenny.internal> In-Reply-To: <1257676862.3860.14.camel@lenny.internal> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200911241309.30193.jkim@FreeBSD.org> Cc: Subject: Re: HP Pavillion does not power off 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: Tue, 24 Nov 2009 18:09:39 -0000 On Sunday 08 November 2009 05:41 am, Jerry Marles wrote: > Hello, > > I have a HP Pavillion desktop PC model g3001.uk. The problem I have > is that halt -p does not power it off. The light on the power > button goes off but I can hear that it is still running. If I hold > down the power button for a few seconds the power can be heard to > go off but then it boots right back up again. Windows and Linux can > power it off successfully. I have a hunch that your SSDT is broken. In fact, it looks little unusual. Have you tried to update your BIOS? You seem to have two year old BIOS and it claims it only complies with ACPI 1.0, which has been dead for many years. :-) BTW, 'holding down power button for a few seconds' performs emergency shutdown sequence, which is usually done without ACPI intervention. Jung-uk Kim From owner-freebsd-acpi@FreeBSD.ORG Tue Nov 24 18:14:17 2009 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 921941065679; Tue, 24 Nov 2009 18:14:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-acpi@FreeBSD.org Date: Tue, 24 Nov 2009 13:14:08 -0500 User-Agent: KMail/1.6.2 References: <1257676862.3860.14.camel@lenny.internal> <200911241309.30193.jkim@FreeBSD.org> In-Reply-To: <200911241309.30193.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200911241314.10392.jkim@FreeBSD.org> Cc: Subject: Re: HP Pavillion does not power off 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: Tue, 24 Nov 2009 18:14:17 -0000 On Tuesday 24 November 2009 01:09 pm, Jung-uk Kim wrote: > I have a hunch that your SSDT is broken. In fact, it looks little > unusual. Have you tried to update your BIOS? You seem to have two > year old BIOS and it claims it only complies with ACPI 1.0, which ^^^^^^^^ > has been dead for many years. :-) Please ignore this part, I read wrong bit, sorry. Jung-uk Kim From owner-freebsd-acpi@FreeBSD.ORG Thu Nov 26 23:02:21 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 EAD101065670 for ; Thu, 26 Nov 2009 23:02:21 +0000 (UTC) (envelope-from jerry@marles.org) Received: from mailforwards.extendcp.co.uk (mailforwards.extendcp.co.uk [79.170.40.74]) by mx1.freebsd.org (Postfix) with ESMTP id 8C87B8FC22 for ; Thu, 26 Nov 2009 23:02:21 +0000 (UTC) Received: from marles.demon.co.uk ([83.104.58.197] helo=[192.168.1.150]) by mailforwards.extendcp.com with esmtpa (Exim 4.63) id 1NDnLv-0002T0-UT; Thu, 26 Nov 2009 23:02:20 +0000 From: Jerry Marles To: Jung-uk Kim In-Reply-To: <200911241309.30193.jkim@FreeBSD.org> References: <1257676862.3860.14.camel@lenny.internal> <200911241309.30193.jkim@FreeBSD.org> Content-Type: text/plain Date: Thu, 26 Nov 2009 23:02:04 +0000 Message-Id: <1259276524.5208.55.camel@lenny.internal> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@FreeBSD.org Subject: Re: HP Pavillion does not power off 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: Thu, 26 Nov 2009 23:02:22 -0000 On Tue, 2009-11-24 at 13:09 -0500, Jung-uk Kim wrote: > On Sunday 08 November 2009 05:41 am, Jerry Marles wrote: > > Hello, > > > > I have a HP Pavillion desktop PC model g3001.uk. The problem I have > > is that halt -p does not power it off. The light on the power > > button goes off but I can hear that it is still running. If I hold > > down the power button for a few seconds the power can be heard to > > go off but then it boots right back up again. Windows and Linux can > > power it off successfully. > > I have a hunch that your SSDT is broken. In fact, it looks little > unusual. Have you tried to update your BIOS? You seem to have two > year old BIOS and it claims it only complies with ACPI 1.0, which has > been dead for many years. :-) > > BTW, 'holding down power button for a few seconds' performs emergency > shutdown sequence, which is usually done without ACPI intervention. > > Jung-uk Kim That sounded like a reasonable idea so I checked and found that there is a more recent bios available. I downloaded it and attempted to install it and it said that it would not install because I am not running Vista. I scrapped Vista shortly after buying the PC for obvious reasons. I got the PC cheap because it only had 512Mb of memory and Vista, Not a good combination but not a problem to me because I did not intend to use Vista. So I thought I would restore the PC using the recovery DVD that I purchased for just these sort of circumstances. I took it out of the sealed envelope that it came in and tried to boot from it for the first time. It ran part way through and failed with a hex code but no error message of any use. I expected it to partition and format my primary disk but it also did the same to the disk that I had added with Linux and FreeBSD on which struck me as excessively destructive. So it totally wiped out my PC and still has not given me Vista to enable me to install the bios update. Fortunately I have not lost anything of any importance because I keep all that on a separate FreeBSD server. My point is that if Windows, Linux and Solaris can work work quite happily on this bios as it stands then the problemn lies in FreeBSD and that is what I would like to solve because that it the operating system that I would choose to run if only it could power off my PC. Otherwise Debian seems like the best OS for a desktop PC. Regards Jerry From owner-freebsd-acpi@FreeBSD.ORG Fri Nov 27 19:15:54 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 0F2E01065676 for ; Fri, 27 Nov 2009 19:15:54 +0000 (UTC) (envelope-from jerry@marles.org) Received: from mailforwards.extendcp.co.uk (mailforwards.extendcp.co.uk [79.170.40.74]) by mx1.freebsd.org (Postfix) with ESMTP id A39708FC1D for ; Fri, 27 Nov 2009 19:15:53 +0000 (UTC) Received: from marles.demon.co.uk ([83.104.58.197] helo=[192.168.1.150]) by mailforwards.extendcp.com with esmtpa (Exim 4.63) id 1NE6IJ-0007t3-Ui for freebsd-acpi@freebsd.org; Fri, 27 Nov 2009 19:15:52 +0000 From: Jerry Marles To: freebsd-acpi@freebsd.org In-Reply-To: <1259276524.5208.55.camel@lenny.internal> References: <1257676862.3860.14.camel@lenny.internal> <200911241309.30193.jkim@FreeBSD.org> <1259276524.5208.55.camel@lenny.internal> Content-Type: text/plain Date: Fri, 27 Nov 2009 19:15:48 +0000 Message-Id: <1259349348.3058.27.camel@lenny.internal> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Subject: Re: HP Pavillion does not power off 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: Fri, 27 Nov 2009 19:15:54 -0000 On Thu, 2009-11-26 at 23:02 +0000, Jerry Marles wrote: > On Tue, 2009-11-24 at 13:09 -0500, Jung-uk Kim wrote: > > On Sunday 08 November 2009 05:41 am, Jerry Marles wrote: > > > Hello, > > > > > > I have a HP Pavillion desktop PC model g3001.uk. The problem I have > > > is that halt -p does not power it off. The light on the power > > > button goes off but I can hear that it is still running. If I hold > > > down the power button for a few seconds the power can be heard to > > > go off but then it boots right back up again. Windows and Linux can > > > power it off successfully. > > > > I have a hunch that your SSDT is broken. In fact, it looks little > > unusual. Have you tried to update your BIOS? You seem to have two > > year old BIOS and it claims it only complies with ACPI 1.0, which has > > been dead for many years. :-) > > > > BTW, 'holding down power button for a few seconds' performs emergency > > shutdown sequence, which is usually done without ACPI intervention. > > > > Jung-uk Kim > > That sounded like a reasonable idea so I checked and found that there is > a more recent bios available. I downloaded it and attempted to install > it and it said that it would not install because I am not running Vista. > I scrapped Vista shortly after buying the PC for obvious reasons. I got > the PC cheap because it only had 512Mb of memory and Vista, Not a good > combination but not a problem to me because I did not intend to use > Vista. So I thought I would restore the PC using the recovery DVD that I > purchased for just these sort of circumstances. I took it out of the > sealed envelope that it came in and tried to boot from it for the first > time. It ran part way through and failed with a hex code but no error > message of any use. I expected it to partition and format my primary > disk but it also did the same to the disk that I had added with Linux > and FreeBSD on which struck me as excessively destructive. So it totally > wiped out my PC and still has not given me Vista to enable me to install > the bios update. Fortunately I have not lost anything of any importance > because I keep all that on a separate FreeBSD server. My point is that > if Windows, Linux and Solaris can work work quite happily on this bios > as it stands then the problemn lies in FreeBSD and that is what I would > like to solve because that it the operating system that I would choose > to run if only it could power off my PC. Otherwise Debian seems like the > best OS for a desktop PC. The more I try to work this out the more I realise that I have bitten off more than I can chew. This problem has turned out to be far more trouble to solve than it is worth to me. I think I will just forget it. Perhaps I am just not cut out to be a kernel hacker. I will continued to run FreeBSD on other hardware. I would just like to thank the people that have tried to help me, it was much appreciated. Regards Jerry From owner-freebsd-acpi@FreeBSD.ORG Sat Nov 28 20:22:17 2009 Return-Path: Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7626B106568B; Sat, 28 Nov 2009 20:22:17 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4D1758FC1C; Sat, 28 Nov 2009 20:22:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nASKMHEu056106; Sat, 28 Nov 2009 20:22:17 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nASKMHew056102; Sat, 28 Nov 2009 20:22:17 GMT (envelope-from linimon) Date: Sat, 28 Nov 2009 20:22:17 GMT Message-Id: <200911282022.nASKMHew056102@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-acpi@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/140979: [acpi] [panic] Kernel panic (fatal trap 12: page fault when in kernel mode) on FreeBSD 8.0 with ACPI because of "ec" sub-device 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, 28 Nov 2009 20:22:17 -0000 Old Synopsis: Kernel panic (fatal trap 12: page fault when in kernel mode) on FreeBSD 8.0 with ACPI because of "ec" sub-device New Synopsis: [acpi] [panic] Kernel panic (fatal trap 12: page fault when in kernel mode) on FreeBSD 8.0 with ACPI because of "ec" sub-device Responsible-Changed-From-To: freebsd-bugs->freebsd-acpi Responsible-Changed-By: linimon Responsible-Changed-When: Sat Nov 28 20:21:14 UTC 2009 Responsible-Changed-Why: looks like this is ACPI-related. http://www.freebsd.org/cgi/query-pr.cgi?pr=140979