From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 22 21:45:58 2012 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 A4C63106566B for ; Sun, 22 Jul 2012 21:45:58 +0000 (UTC) (envelope-from zbrdge@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 04E3F8FC0A for ; Sun, 22 Jul 2012 21:45:57 +0000 (UTC) Received: by lbon10 with SMTP id n10so8949144lbo.13 for ; Sun, 22 Jul 2012 14:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=duRqvOuzHxgMRba8e7j/P3uGryTs9U0yG5fnDbFHIJk=; b=J8FIozafkHnbBvQWe4yTXZOLQ6qddA4XG1fZS5oACBYgrhVw75bEVTwFfOHa2TAqbu rAEkKrKKBpVUYRF5BB1ebF5K3L/l6dppNTXyaE6krgfFf860sotke5i02swrHZSmPNwe TT3jmTbAiQB8+eWJsQc6WsTh8k/bWLZV3S+MizkK33ywJLqrdUx5TaoIAc9xg9U8HiNi 8Bz8dISuGL5ctsuFyInXEI4Fb1XvxTplZCOavhV9GiKJAu1ufXKA00oUEDD2D+T8KhTD SldfkbWklpcCTSd3IziF2fTf0OYIrNCBtOz69UAW7jIcC7EQNTUQjg9aOOTVqey9dZWm 2P4A== MIME-Version: 1.0 Received: by 10.112.47.231 with SMTP id g7mr6771719lbn.29.1342993556544; Sun, 22 Jul 2012 14:45:56 -0700 (PDT) Received: by 10.112.47.230 with HTTP; Sun, 22 Jul 2012 14:45:56 -0700 (PDT) In-Reply-To: References: <201207021729413382845@gmail.com> <4FF2599B.6050409@gmail.com> <201207031411248300207@gmail.com> <1341437029.4017.5.camel@localhost> <2012072016090861869410@gmail.com> Date: Sun, 22 Jul 2012 14:45:56 -0700 Message-ID: From: Zack Breckenridge To: =?UTF-8?B?5LmU5qWa?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-acpi Subject: Re: Re: Resume failed after Suspend on Thinkpad x201i 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 Jul 2012 21:45:58 -0000 Attached is the kernel configuration file I used to build my kernel without VESA. I went through the same process as you: setting suspend bounce, etc., and looking at the dmesg output. Again, I also looked at the witness output from my Intel driver when resuming X -- and I noticed that it simply wasn't able to reach the GPU. So I think it is some sort of bus error on resume and is related to our different BIOSes. Since it worked for me, probably some int 10 call in VESA was causing the error. In your case - not being able to issue commands to an ATA device could also be a bus issue, caused by NOT calling the proper INT 10 setup functions on resume. I'm going to build a debug kernel today and see if I can start tracking the problem to it's root. - Zack On Sun, Jul 22, 2012 at 4:36 AM, =E4=B9=94=E6=A5=9A = wrote: > 2012/7/20 Zack Breckenridge : > > If you look at the line: > > > > > >> Jul 20 16:07:00 x201i kernel: vga0: calling BIOS POST > > > > in your dmesg output, and then grep through the source, you'll find thi= s > is > > actually being printed > > from "src/sys/dev/fb/vesa.c" . > > > > I had a similar problem. After syncing with FreeBSD 10-CURRENT and > compiling > > a kernel without > > VESA support, I was able to get graphics to work on resume, but only wh= en > > running X. > > > > I don't think you actually have to sync with CURRENT though -- I think > you > > just need to compile without > > VESA. I synced with CURRENT to get the newer Intel GMA driver and KMS > > subsystem. Also, looking at > > the Witness output from the Intel driver, it looks like the graphics ca= rd > > simply isn't accessible after > > this function in vesa.c is called, which means it probably causes the > same > > problem with your nvidia driver > > as well. > > > > I believe this problem is related to the "x86bios_init_regs" function, > > though I haven't had time to debug > > it yet. Also, I'm running amd64. > > > > Try it out... > > > > - Zack > > > > On Fri, Jul 20, 2012 at 1:09 AM, =E4=B9=94=E6=A5=9A/HonestQiao > wrote: > >> > >> >On Sat, Jul 7, 2012 at 10:40 AM, Brandon Gooch > >> > wrote: > >> >> On Wed, Jul 4, 2012 at 4:23 PM, mbsd wrote: > >> >>> On Tue, 2012-07-03 at 14:11 +0800, =E4=B9=94=E6=A5=9A/HonestQiao w= rote: > >> >> [SNIP] > >> >>>> > >> >>>> In All the test, the screen is light and black, system is hangup, > >> >>>> nothing can be done. > >> >>>> The only thing can be done, is push power button, to force it > >> >>>> shutdown. > >> >>> > >> >>> Which graphic card have you used? If you have had nvidia, it's > normal, > >> >>> I've had the same problem "the screen is light and black". > >> >> > >> >> Can both of you show the output of `devinfo -v` from your systems? > >> >> > >> >> I was able to solve my suspend/resume issue with my nvidia-equipped > >> >> notebook by forcing the module load ordering of vgapm in > >> >> sys/isa/vga_isa.c: > >> >> > >> >> Index: sys/isa/vga_isa.c > >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> >> --- sys/isa/vga_isa.c (revision 237779) > >> >> +++ sys/isa/vga_isa.c (working copy) > >> >> @@ -379,4 +379,4 @@ > >> >> 0 > >> >> }; > >> >> > >> >> -DRIVER_MODULE(vgapm, vgapci, vgapm_driver, vgapm_devclass, 0, 0); > >> >> +DRIVER_MODULE(vgapm, vgapci, vgapm_driver, vgapm_devclass, 0, > >> >> SI_ORDER_ANY); > >> >> > >> >> > >> >> The system requires however that I load the nvidia module in > >> >> /boot/loader.conf (as opposed to loading it after system is up and > >> >> running). > >> >> > >> >> -Brandon > >> > > >> >Oops, the patch above should instead be: > >> > > >> >Index: sys/isa/vga_isa.c > >> >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> >--- sys/isa/vga_isa.c (revision 238266) > >> >+++ sys/isa/vga_isa.c (working copy) > >> >@@ -379,4 +379,4 @@ > >> > 0 > >> > }; > >> > > >> >-DRIVER_MODULE(vgapm, vgapci, vgapm_driver, vgapm_devclass, 0, 0); > >> >+DRIVER_MODULE_ORDERED(vgapm, vgapci, vgapm_driver, vgapm_devclass, > >> >NULL, NULL, SI_ORDER_ANY); > >> > > >> >I made the edit for the diff on a clean tree, but I'm actually > >> >building from another :) > >> > > >> >The above is correct. However, I'm still not sure this pertains to > >> >your Intel video problem. > >> > > >> >-Brandon > >> > >> Yesterday, I upgrade my freebsd to FreeBSD 9.1-PRERELEASE. > >> This method did not work. > >> > >> And command 'shutdown -p now' can shutdown the system, > >> but the Screen is black and light, and Battery LED is light. > >> This command can't power off. > >> > >> Whethe in: > >> sysctl -w hw.acpi.reset_video=3D0 > >> sysctl -w hw.pci.do_power_suspend=3D1 > >> sysctl -w hw.pci.do_power_resume=3D1 > >> Or in: > >> sysctl -w hw.acpi.reset_video=3D0 > >> sysctl -w hw.pci.do_power_suspend=3D1 > >> sysctl -w hw.pci.do_power_resume=3D1 > >> > >> I can execute acpiconf -s 3, but can't resume the screen which is blac= k > >> and light. > >> > >> Log for command 'acpiconf -s 3': > >> > >> Jul 20 16:06:53 x201i acpi: suspend at 20120720 16:06:53 > >> Jul 20 16:06:56 x201i kernel: acpi_timer0: switching timecounter, > TSC-low > >> -> ACPI-safe > >> Jul 20 16:06:56 x201i kernel: (ada0:ahcich0:0:0:0): spin-down > >> Jul 20 16:07:00 x201i kernel: acpi_lid0: wake_prep enabled for > \_SB_.LID_ > >> (S3) > >> Jul 20 16:07:00 x201i kernel: acpi_button0: wake_prep enabled for > >> \_SB_.SLPB (S3) > >> Jul 20 16:07:00 x201i kernel: uhub0: at usbus0, port 1, addr 1 > >> (disconnected) > >> Jul 20 16:07:00 x201i kernel: ugen0.2: at usbus0 > >> (disconnected) > >> Jul 20 16:07:00 x201i kernel: uhub2: at uhub0, port 1, addr 2 > >> (disconnected) > >> Jul 20 16:07:00 x201i kernel: pci0:0:28:0: Transition from D0 to D3 > >> Jul 20 16:07:00 x201i kernel: pci0:0:28:3: Transition from D0 to D3 > >> Jul 20 16:07:00 x201i kernel: wlan0: link state changed to DOWN > >> Jul 20 16:07:00 x201i kernel: pci0:2:0:0: Transition from D0 to D3 > >> Jul 20 16:07:00 x201i kernel: pci0:0:28:4: Transition from D0 to D3 > >> Jul 20 16:07:00 x201i kernel: uhub1: at usbus1, port 1, addr 1 > >> (disconnected) > >> Jul 20 16:07:00 x201i kernel: ugen1.2: at usbus1 > >> (disconnected) > >> Jul 20 16:07:00 x201i kernel: uhub3: at uhub1, port 1, addr 2 > >> (disconnected) > >> Jul 20 16:07:00 x201i kernel: vga0: saving 4804 bytes of video state > >> Jul 20 16:07:00 x201i kernel: vga0: saving color palette > >> Jul 20 16:07:00 x201i kernel: pci0: failed to set ACPI power state D2 = on > >> \_SB_.PCI0.EXP1: AE_BAD_PARAMETER > >> Jul 20 16:07:00 x201i kernel: pci0: failed to set ACPI power state D2 = on > >> \_SB_.PCI0.EXP4: AE_BAD_PARAMETER > >> Jul 20 16:07:00 x201i kernel: pci0: failed to set ACPI power state D2 = on > >> \_SB_.PCI0.EXP5: AE_BAD_PARAMETER > >> Jul 20 16:07:00 x201i kernel: acpi_lid0: wake_prep enabled for > \_SB_.LID_ > >> (S3) > >> Jul 20 16:07:00 x201i kernel: acpi_button0: wake_prep enabled for > >> \_SB_.SLPB (S3) > >> Jul 20 16:07:00 x201i kernel: pci255: set ACPI power state D0 on > >> \_SB_.UNCR.SAD_ > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.VID_ > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.IGBE > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.EHC2 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.HDEF > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.EXP1 > >> Jul 20 16:07:00 x201i kernel: pci0:0:28:0: Transition from D3 to D0 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.EXP4 > >> Jul 20 16:07:00 x201i kernel: pci0:0:28:3: Transition from D3 to D0 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.EXP5 > >> Jul 20 16:07:00 x201i kernel: pci0:0:28:4: Transition from D3 to D0 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.EHC1 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.PCI1 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.LPC_ > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.SAT1 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.EXP1 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.EXP4 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.EXP5 > >> Jul 20 16:07:00 x201i kernel: pci0:2:0:0: Transition from D3 to D0 > >> Jul 20 16:07:00 x201i kernel: pci0: set ACPI power state D0 on > >> \_SB_.PCI0.PCI1 > >> Jul 20 16:07:00 x201i kernel: vga0: calling BIOS POST > >> Jul 20 16:07:00 x201i kernel: ahcich0: AHCI reset... > >> Jul 20 16:07:00 x201i kernel: ahcich0: SATA connect time=3D100us > >> status=3D00000123 > >> Jul 20 16:07:00 x201i kernel: ahcich0: AHCI reset: device found > >> Jul 20 16:07:00 x201i kernel: ahcich1: AHCI reset... > >> Jul 20 16:07:00 x201i kernel: ahcich1: SATA connect timeout time=3D100= 00us > >> status=3D00000000 > >> Jul 20 16:07:00 x201i kernel: ahcich1: AHCI reset: device not found > >> Jul 20 16:07:00 x201i kernel: ahcich4: AHCI reset... > >> Jul 20 16:07:00 x201i kernel: ahcich4: SATA connect timeout time=3D100= 00us > >> status=3D00000000 > >> Jul 20 16:07:00 x201i kernel: ahcich4: AHCI reset: device not found > >> Jul 20 16:07:00 x201i kernel: ahcich5: AHCI reset... > >> Jul 20 16:07:00 x201i kernel: ahcich5: SATA connect timeout time=3D100= 00us > >> status=3D00000000 > >> Jul 20 16:07:00 x201i kernel: ahcich5: AHCI reset: device not found > >> Jul 20 16:07:00 x201i kernel: atkbd: the current kbd controller comman= d > >> byte 0047 > >> Jul 20 16:07:00 x201i kernel: atkbd: keyboard ID 0x54ab (2) > >> Jul 20 16:07:00 x201i kernel: kbdc: RESET_KBD return code:00fa > >> Jul 20 16:07:00 x201i kernel: kbdc: RESET_KBD status:00aa > >> Jul 20 16:07:00 x201i kernel: kbdc: TEST_AUX_PORT status:0000 > >> Jul 20 16:07:00 x201i kernel: kbdc: RESET_AUX return code:00fa > >> Jul 20 16:07:00 x201i kernel: kbdc: RESET_AUX status:00aa > >> Jul 20 16:07:00 x201i kernel: kbdc: RESET_AUX ID:0000 > >> Jul 20 16:07:00 x201i kernel: battery0: battery initialization start > >> Jul 20 16:07:00 x201i kernel: ahcich0: AHCI reset: device ready after > >> 100ms > >> Jul 20 16:07:00 x201i kernel: battery0: battery initialization done, > tried > >> 1 times > >> Jul 20 16:07:00 x201i kernel: (ada0:ahcich0:0:0:0): resume > >> Jul 20 16:07:00 x201i kernel: acpi_timer0: restoring timecounter, > >> ACPI-safe -> TSC-low > >> Jul 20 16:07:00 x201i kernel: uhub0: rev > >> 2.00/1.00, addr 1> on usbus1 > >> Jul 20 16:07:00 x201i kernel: uhub1: rev > >> 2.00/1.00, addr 1> on usbus0 > >> Jul 20 16:07:00 x201i kernel: wlan0: link state changed to UP > >> Jul 20 16:07:00 x201i kernel: uhub0: 3 ports with 3 removable, self > >> powered > >> Jul 20 16:07:00 x201i kernel: uhub1: 3 ports with 3 removable, self > >> powered > >> Jul 20 16:06:57 x201i wpa_supplicant[525]: CTRL-EVENT-DISCONNECTED > >> bssid=3Dc0:c5:20:1b:59:aa reason=3D0 > >> Jul 20 16:06:57 x201i wpa_supplicant[525]: Failed to initiate AP scan. > >> Jul 20 16:06:59 x201i acpi: resumed at 20120720 16:06:59 > >> Jul 20 16:06:59 x201i wpa_supplicant[525]: Trying to associate with > >> c0:c5:20:1b:69:8a (SSID=3D'LITB-AP' freq=3D2417 MHz) > >> Jul 20 16:07:00 x201i wpa_supplicant[525]: Associated with > >> c0:c5:20:1b:69:8a > >> Jul 20 16:07:00 x201i wpa_supplicant[525]: WPA: Key negotiation > completed > >> with c0:c5:20:1b:69:8a [PTK=3DCCMP GTK=3DCCMP] > >> Jul 20 16:07:00 x201i wpa_supplicant[525]: CTRL-EVENT-CONNECTED - > >> Connection to c0:c5:20:1b:69:8a completed (reauth) [id=3D0 id_str=3D] > >> Jul 20 16:07:00 x201i dhclient: New IP Address (wlan0): 192.168.61.184 > >> Jul 20 16:07:00 x201i dhclient: New Subnet Mask (wlan0): 255.255.255.0 > >> Jul 20 16:07:00 x201i dhclient: New Broadcast Address (wlan0): > >> 192.168.61.255 > >> Jul 20 16:07:00 x201i dhclient: New Routers (wlan0): 192.168.61.1 > >> Jul 20 16:07:01 x201i kernel: ugen1.2: at usbus1 > >> Jul 20 16:07:01 x201i kernel: uhub2: class > >> 9/0, rev 2.00/0.00, addr 2> on usbus1 > >> Jul 20 16:07:01 x201i kernel: ugen0.2: at usbus0 > >> Jul 20 16:07:01 x201i kernel: uhub3: class > >> 9/0, rev 2.00/0.00, addr 2> on usbus0 > >> Jul 20 16:07:02 x201i kernel: uhub3: 6 ports with 6 removable, self > >> powered > >> Jul 20 16:07:02 x201i kernel: uhub2: 8 ports with 8 removable, self > >> powered > >> > >> _______________________________________________ > >> freebsd-acpi@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > >> To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org= " > >> > > > > Today , I build my kernel disabled vesa. > Now , there has so many error messages in dmesg: > Jul 22 16:42:18 x201i kernel: ACPI Error: No object attached to node > 0xfffffe00029a6780 (20110527/exresnte-139) > Jul 22 16:42:18 x201i kernel: ACPI Error: Method execution failed > [\_SB_.PCI0.LPC_.EC__.BAT0._HID] (Node 0xfffffe00029a6780), > AE_AML_NO_OPERAND (20110527/uteval-113) > > > > When I test acpiconf -s 3, it's hangup: > #sysctl debug.acpi.suspend_bounce=3D1 > #acpiconf -s 3 > ahcich0: AHCI reset: device not ready after 31000ms (tfd =3D 00000080) > ahcich0: Timeout on slot 12 port 0 > ...... > achich0: AHCI reset ... > ahcich0: SATA connect time=3D100us status=3D0000123 > ahcich0: AHCI reset: device found > (aprobe0:ahchih0:0:0:0): ATA_IDENTIFY. ACB: ec 00 00 00 00 40 00 00 00 00 > 00 00 > (aprobe0:ahchih0:0:0:0): CAM status: command timeout > (aprobe0:ahchih0:0:0:0): Error 5, Retry was blocked > > reboot by push power button: > #sysctl debug.acpi.suspend_bounce=3D0 > #acpiconf -s 3 > It's will suspend, and sleep LED will light. > But can't resume. No button can resume it. >