From owner-freebsd-acpi@FreeBSD.ORG Thu Jun 13 14:00:21 2013 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A3D6D4E1 for ; Thu, 13 Jun 2013 14:00:21 +0000 (UTC) (envelope-from ganael.laplanche@martymac.org) Received: from lmtp.galacsys.net (webmail.galacsys.net [IPv6:2001:1b78:0:1:d918:51d7:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 1BE611E72 for ; Thu, 13 Jun 2013 14:00:20 +0000 (UTC) Received: from martymac.org (webmail.galacsys.net [217.24.81.215]) by lmtp.galacsys.net (Postfix) with ESMTP id 027EA1FA5D56 for ; Thu, 13 Jun 2013 16:00:19 +0200 (CEST) From: "Ganael LAPLANCHE" To: freebsd-acpi@FreeBSD.org Subject: Fixing suspend/resume on Lenovo x220 X-Openwebmail-Date: Thu, 13 Jun 2013 17:00:18 +0200 Message-Id: <20130613134922.M8280@martymac.org> X-Mailer: Open WebMail 2.01 20030425 X-OriginatingIP: 157.99.64.43 (ganael.laplanche@martymac.org) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Date: Thu, 13 Jun 2013 14:00:21 +0000 (UTC) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2013 14:00:21 -0000 Hi, As you may know, suspend/resume has been broken on Lenovo x220 for a long time now, see : http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/174504 I have been able to do a suspend(S3)/resume operation in text mode (it works, but console stays dark at resume, I had to connect through ssh ; also, resume hangs if X is started with i915kms.ko loaded) and collect the following verbose logs : Jun 13 14:39:59 laptop acpi: suspend at 20130613 14:39:59 Jun 13 14:40:03 laptop kernel: acpi_timer0: switching timecounter, TSC-low -> ACPI-fast Jun 13 14:40:03 laptop kernel: (ada0:ahcich0:0:0:0): spin-down Jun 13 14:40:03 laptop kernel: acpi_lid0: wake_prep enabled for \_SB_.LID_ (S3) Jun 13 14:40:03 laptop kernel: acpi_button0: wake_prep enabled for \_SB_.SLPB (S3) Jun 13 14:40:03 laptop kernel: uhub0: at usbus0, port 1, addr 1 (disconnected) Jun 13 14:40:03 laptop kernel: ugen0.2: at usbus0 (disconnected) Jun 13 14:40:03 laptop kernel: uhub3: at uhub0, port 1, addr 2 (disconnected) Jun 13 14:40:03 laptop kernel: ugen0.3: at usbus0 (disconnected) Jun 13 14:40:03 laptop kernel: pci0:0:28:0: Transition from D0 to D3 Jun 13 14:40:14 laptop kernel: pci0:3:0:0: Transition from D0 to D3 Jun 13 14:40:14 laptop kernel: pci0:0:28:1: Transition from D0 to D3 Jun 13 14:40:14 laptop kernel: pci0:13:0:0: Transition from D0 to D3 Jun 13 14:40:14 laptop kernel: pci0:0:28:4: Transition from D0 to D3 Jun 13 14:40:14 laptop kernel: uhub2: at usbus1, port 1, addr 1 (disconnected) Jun 13 14:40:14 laptop kernel: pci0:14:0:0: Transition from D0 to D3 Jun 13 14:40:14 laptop kernel: pci0:0:28:6: Transition from D0 to D3 Jun 13 14:40:14 laptop kernel: uhub1: at usbus2, port 1, addr 1 (disconnected) Jun 13 14:40:14 laptop kernel: ugen2.2: at usbus2 (disconnected) Jun 13 14:40:14 laptop kernel: uhub4: at uhub1, port 1, addr 2 (disconnected) Jun 13 14:40:14 laptop kernel: vga0: saving 6724 bytes of video state Jun 13 14:40:14 laptop kernel: vga0: saving color palette Jun 13 14:40:14 laptop kernel: pci0: failed to set ACPI power state D2 on \_SB_.PCI0.EXP1: AE_BAD_PARAMETER Jun 13 14:40:14 laptop kernel: pci0: failed to set ACPI power state D2 on \_SB_.PCI0.EXP2: AE_BAD_PARAMETER Jun 13 14:40:14 laptop kernel: pci0: failed to set ACPI power state D2 on \_SB_.PCI0.EXP5: AE_BAD_PARAMETER Jun 13 14:40:14 laptop kernel: pci0: failed to set ACPI power state D2 on \_SB_.PCI0.EXP7: AE_BAD_PARAMETER Jun 13 14:40:14 laptop kernel: acpi0: cleared fixed power button status Jun 13 14:40:14 laptop kernel: acpi_lid0: run_prep cleaned up for \_SB_.LID_ Jun 13 14:40:14 laptop kernel: acpi_button0: run_prep cleaned up for \_SB_.SLPB Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.VID_ Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.IGBE Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EHC2 Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.HDEF Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EXP1 Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EXP2 Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EXP5 Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EXP7 Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EHC1 Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.LPC_ Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.SAT1 Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.SMBU Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EXP1 Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EXP2 Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EXP5 Jun 13 14:40:14 laptop kernel: pci13: set ACPI power state D0 on \_SB_.PCI0.EXP5.SLOT Jun 13 14:40:14 laptop kernel: sdhci_pci0-slot0: Divider 1023 for freq 24437 (max 50000000) Jun 13 14:40:14 laptop kernel: mmc0: Probing bus Jun 13 14:40:14 laptop kernel: mmc0: SD probe: OK (OCR: 0x00ff8000) Jun 13 14:40:14 laptop kernel: mmc0: Current OCR: 0x00ff8000 Jun 13 14:40:14 laptop kernel: mmc0: Probing cards Jun 13 14:40:14 laptop kernel: mmc0: Card detected (CID 0353445344323536432007e04a003600) Jun 13 14:40:14 laptop kernel: mmc0: Card detected (CSD 002600321f5983c4ecb6cfff92404000) Jun 13 14:40:14 laptop kernel: mmc0: Card at relative address 47376: Jun 13 14:40:14 laptop kernel: mmc0: card: SD SD256 4.3 SN 537387082 MFG 06/2003 by 3 SD Jun 13 14:40:14 laptop kernel: mmc0: bus: 4bit, 25MHz Jun 13 14:40:14 laptop kernel: mmc0: memory: 494080 blocks, erase sector 32 blocks Jun 13 14:40:14 laptop kernel: mmc0: setting transfer rate to 25.000MHz Jun 13 14:40:14 laptop kernel: sdhci_pci0-slot0: Divider 1 for freq 25000000 (max 50000000) Jun 13 14:40:14 laptop kernel: pci0: set ACPI power state D0 on \_SB_.PCI0.EXP7 Jun 13 14:40:14 laptop kernel: vga0: calling BIOS POST Jun 13 14:40:14 laptop kernel: em0: Link is Down Jun 13 14:40:14 laptop kernel: em0: link state changed to DOWN Jun 13 14:40:14 laptop kernel: hdaa0: Headphones redirection for association 0 nid=25 using unsolicited responses. Jun 13 14:40:14 laptop kernel: ahcich0: AHCI reset... Jun 13 14:40:14 laptop kernel: ahcich0: SATA connect time=900us status=00000123 Jun 13 14:40:14 laptop kernel: ahcich0: AHCI reset: device found Jun 13 14:40:14 laptop kernel: ahcich0: AHCI reset: device ready after 0ms Jun 13 14:40:14 laptop kernel: ahcich4: AHCI reset... Jun 13 14:40:14 laptop kernel: ahcich4: SATA connect timeout time=10000us status=00000000 Jun 13 14:40:14 laptop kernel: ahcich4: AHCI reset: device not found Jun 13 14:40:14 laptop kernel: atkbd: the current kbd controller command byte 0065 Jun 13 14:40:14 laptop kernel: atkbd: keyboard ID 0x54ab (2) Jun 13 14:40:14 laptop kernel: kbdc: RESET_KBD return code:00fa Jun 13 14:40:14 laptop kernel: kbdc: RESET_KBD status:00aa Jun 13 14:40:14 laptop kernel: kbdc: TEST_AUX_PORT status:0000 Jun 13 14:40:14 laptop kernel: kbdc: RESET_AUX return code:00fa Jun 13 14:40:14 laptop kernel: kbdc: RESET_AUX status:00aa Jun 13 14:40:14 laptop kernel: kbdc: RESET_AUX ID:0000 Jun 13 14:40:14 laptop kernel: battery0: battery initialization start Jun 13 14:40:14 laptop kernel: xhci0: 32 byte context size. Jun 13 14:40:14 laptop kernel: uhub0: <0x1033 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1 Jun 13 14:40:14 laptop kernel: uhub1: on usbus2 Jun 13 14:40:14 laptop kernel: uhub2: on usbus0 Jun 13 14:40:14 laptop kernel: battery0: battery initialization done, tried 1 times Jun 13 14:40:14 laptop kernel: (ada0:ahcich0:0:0:0): resume Jun 13 14:40:14 laptop kernel: acpi_timer0: restoring timecounter, ACPI-fast -> TSC-low Jun 13 14:40:14 laptop acpi: resumed at 20130613 14:40:14 Jun 13 14:40:14 laptop kernel: uhub0: 4 ports with 4 removable, self powered Jun 13 14:40:15 laptop kernel: em0: Link is up 1000 Mbps Full Duplex Jun 13 14:40:15 laptop kernel: em0: link state changed to UP Jun 13 14:40:16 laptop kernel: uhub2: 3 ports with 3 removable, self powered Jun 13 14:40:16 laptop kernel: uhub1: 3 ports with 3 removable, self powered Jun 13 14:40:16 laptop kernel: ugen0.2: at usbus0 Jun 13 14:40:16 laptop kernel: uhub3: on usbus0 Jun 13 14:40:16 laptop kernel: ugen2.2: at usbus2 Jun 13 14:40:16 laptop kernel: uhub4: on usbus2 Jun 13 14:40:17 laptop kernel: uhub3: 6 ports with 6 removable, self powered Jun 13 14:40:18 laptop kernel: uhub4: 8 ports with 8 removable, self powered Jun 13 14:40:18 laptop root: Unknown USB device: vendor 0x04f2 product 0xb217 bus uhub3 Jun 13 14:40:18 laptop kernel: ugen0.3: at usbus0 Jun 13 14:40:18 laptop root: Unknown USB device: vendor 0x04f2 product 0xb217 bus uhub3 Jun 13 14:40:34 laptop dhclient: New IP Address (em0): XXX.XX.XX.XXX Jun 13 14:40:34 laptop dhclient: New Subnet Mask (em0): 255.255.255.0 Jun 13 14:40:34 laptop dhclient: New Broadcast Address (em0): XXX.XX.XX.255 Jun 13 14:40:34 laptop dhclient: New Routers (em0): XXX.XX.XX.1 I have a recent kernel : FreeBSD laptop.martymac.org 10.0-CURRENT FreeBSD 10.0-CURRENT #9 r251648M: Wed Jun 12 13:47:02 CEST 2013 martymac@laptop.martymac.org:/usr/obj/files/Src/sys/GENERIC amd64 Could someone help debugging this issue ? I can test things, if needed... Thanks in advance, -- Ganael LAPLANCHE http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac , http://www.FreeBSD.org