From owner-freebsd-mobile@freebsd.org Tue Jul 14 00:34:37 2015 Return-Path: Delivered-To: freebsd-mobile@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA0F3999AF1 for ; Tue, 14 Jul 2015 00:34:36 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (207-172-209-89.c3-0.arl-ubr1.sbo-arl.ma.static.cable.rcn.com [207.172.209.89]) by mx1.freebsd.org (Postfix) with ESMTP id A8BEE1E39 for ; Tue, 14 Jul 2015 00:34:36 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [IPv6:2001:470:1f11:617:5ef7:830:9e60:2038] (unknown [IPv6:2001:470:1f11:617:5ef7:830:9e60:2038]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 946F6252 for ; Tue, 14 Jul 2015 00:34:28 +0000 (UTC) Message-ID: <55A45912.9010002@metricspace.net> Date: Mon, 13 Jul 2015 20:34:26 -0400 From: Eric McCorkle User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-mobile@freebsd.org Subject: Re: Attempting to diagnose suspend/resume issue References: <559F4B70.8060402@metricspace.net> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IpER313Wq1iwmgipk0cqgdFQtxwaoiqQP" X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2015 00:34:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IpER313Wq1iwmgipk0cqgdFQtxwaoiqQP Content-Type: multipart/mixed; boundary="------------040308080305040009000003" This is a multi-part message in MIME format. --------------040308080305040009000003 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Here is the output from before the problematic patch (ie. when the screen worked with suspend/resume). A couple of things: * It looks like the card is getting powered down twice. * It looks like the video state is saved after attempting to set the power state the first time. So that probably isn't the problem So the code that saves the card state is failing mysteriously after 274386. I doubt this is the fault of the ACPI changes that patch made. Add to that the fact that the efifb and vga text mode suspends apparently never worked, and I'd say it's probably something in the card state save/restore code. So I guess I'll go poke around in that code for a while and see what I can find. On 07/10/2015 02:10 PM, Adrian Chadd wrote: > Hi, >=20 > can you post some more debugging showing that the VGA driver is > restoring the VGA state before the power is applied? >=20 > Thanks! >=20 >=20 > -a >=20 >=20 > On 9 July 2015 at 21:34, Eric McCorkle wrote: >> A long while ago, I reported my screen not coming back on after resume= , >> shortly after r274386 went in. Unfortunately, the follow-on patch >> didn't seem to work for me. >> >> (r274386 changed the way devices get powered down/up, and r274397 fixe= d >> a typo in r274386 that tried to power down/up the wrong devices.) >> >> I finally found the time to try and track this thing down, and I got >> some information that might prove useful in tracking it down. >> >> >> * The screen comes back up only for syscons in pixel mode up to r27483= 5. >> As far as I can tell, it doesn't work for vt in any revision (not as >> sure about text-mode syscons, but there is at least one revision where= >> it works for pixel mode, but not text mode) >> >> * Comparing logs from r274385 and r274397, it seems the likely cause i= s >> that the changes in r274386 reordered things so that the VGA driver >> attempts to restore the state of the card before its power has been >> turned back on (you can clearly see this happening, and you can see th= e >> attempt to restore the state failing). >> >> * Suspend/resume works fine in Linux (I'm not sure how to get linux to= >> printout a debug trace similar to debug.bootverbose), so the hardware >> can't be /that/ broken. >> >> * The order in which things happen during resume seems to be different= >> between vt and syscons resumes, though I can't tell where vt restores >> the state of the card (or the efifb device) >> >> My guess as to the likely cause is that vt also tries to restore the >> state of the card before its power has been turned back on similar to >> what syscons does after r274386, or else the dual happens during suspe= nd >> (it tries to save the state after the device is powered down). It doe= s >> seem a little wierd that syscons would behave differently in that >> respect for pixel mode vs text mode, though. >> >> I'm open to suggestions as to what to look at next, or theories as to >> what might be the culprit. I also have dmesg logs for the various >> revisions and drivers. >> >> Best, >> Eric >> > _______________________________________________ > freebsd-mobile@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mobile > To unsubscribe, send any mail to "freebsd-mobile-unsubscribe@freebsd.or= g" >=20 --------------040308080305040009000003 Content-Type: text/plain; charset=UTF-8; name="suspend.sc.274085" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="suspend.sc.274085" Copyright (c) 1992-2014 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #3 r274085: Thu Jul 9 08:26:24 EDT 2015 root@atom-edge:/usr/obj/usr/src/sys/CUSTOM amd64 FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz (2394.51-MHz K8-class CPU)= Origin=3D"GenuineIntel" Id=3D0x306c3 Family=3D0x6 Model=3D0x3c Step= ping=3D3 Features=3D0xbfebfbff Features2=3D0x7fdafbbf,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,AESNI,= XSAVE,OSXSAVE,AVX,F16C,RDRAND> AMD Features=3D0x2c100800 AMD Features2=3D0x21 Structured Extended Features=3D0x27ab XSAVE Features=3D0x1 VT-x: (disabled in BIOS) PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, performance statistics real memory =3D 8589934592 (8192 MB) avail memory =3D 7825338368 (7462 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 SMT threads cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 cpu4 (AP): APIC ID: 4 cpu5 (AP): APIC ID: 5 cpu6 (AP): APIC ID: 6 cpu7 (AP): APIC ID: 7 ioapic0 irqs 0-23 on motherboard random: entropy device infrastructure driver random: selecting highest priority adaptor kbd1 at kbdmux0 random: SOFT: yarrow init() random: selecting highest priority adaptor random: live provider: "Intel Secure Key RNG" cryptosoft0: on motherboard acpi0: on motherboard acpi_ec0: port 0x62,0x66 on acpi0 acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, 7f900000 (3) failed cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 cpu4: on acpi0 cpu5: on acpi0 cpu6: on acpi0 cpu7: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 950 Event timer "HPET" frequency 14318180 Hz quality 550 atrtc0: port 0x70-0x71 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0 acpi_lid0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: irq 16 at device 1.0 on pci0 pci1: on pcib1 vgapci0: port 0x4000-0x407f mem 0xb0000000-0xb0f= fffff,0x80000000-0x8fffffff,0x90000000-0x91ffffff irq 16 at device 0.0 on= pci1 acpi_video0: on vgapci0 nvidia0: on vgapci0 vgapci0: child nvidia0 requested pci_enable_io vgapci0: child nvidia0 requested pci_enable_io vgapci1: port 0x5000-0x503f mem 0xb1400000-0xb17= fffff,0xa0000000-0xafffffff irq 16 at device 2.0 on pci0 acpi_video1: on vgapci1 vgapci1: Boot video device hdac0: mem 0xb2a30000-0xb2a33fff irq 16 at= device 3.0 on pci0 xhci0: mem 0xb2a20000-0xb2a2ffff ir= q 16 at device 20.0 on pci0 xhci0: 32 byte context size. xhci0: Port routing mask set to 0xffffffff usbus0 on xhci0 pci0: at device 22.0 (no driver attached) em0: port 0x5080-0x509f mem = 0xb2a00000-0xb2a1ffff,0xb2a3e000-0xb2a3efff irq 20 at device 25.0 on pci0= em0: Using an MSI interrupt em0: Ethernet address: 54:ee:75:16:eb:9d hdac1: mem 0xb2a34000-0xb2a37fff irq 22= at device 27.0 on pci0 pcib2: irq 16 at device 28.0 on pci0 pci2: on pcib2 sdhci_pci0: mem 0xb2901000-0xb2901fff,0xb2900000-0xb2900= 7ff irq 16 at device 0.0 on pci2 sdhci_pci0: Hardware doesn't specify timeout clock frequency, setting BRO= KEN_TIMEOUT quirk. sdhci_pci0: 1 slot(s) allocated mmc0: on sdhci_pci0 pcib3: irq 17 at device 28.1 on pci0 pci3: on pcib3 pci3: at device 0.0 (no driver attached) pcib4: irq 18 at device 28.2 on pci0 pci4: on pcib4 pcib5: irq 16 at device 28.4 on pci0 pci6: on pcib5 ehci0: mem 0xb2a3d000-0xb2a3d= 3ff irq 23 at device 29.0 on pci0 usbus1: EHCI version 1.0 usbus1 on ehci0 isab0: at device 31.0 on pci0 isa0: on isab0 ahci0: port 0x50a8-0x50af,0x50b4-= 0x50b7,0x50a0-0x50a7,0x50b0-0x50b3,0x5060-0x507f mem 0xb2a3c000-0xb2a3c7f= f irq 19 at device 31.2 on pci0 ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 ahcich4: at channel 4 on ahci0 ahcich5: at channel 5 on ahci0 ahciem0: on ahci0 ichsmb0: port 0xefa0-0xefbf mem 0xb2a= 38000-0xb2a380ff irq 18 at device 31.3 on pci0 smbus0: on ichsmb0 smb0: on smbus0 acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Synaptics Touchpad, device ID 0 battery0: on acpi0 acpi_acad0: on acpi0 acpi_ibm0: on acpi0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=3D0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0= coretemp0: on cpu0 est0: on cpu0 coretemp1: on cpu1 est1: on cpu1 coretemp2: on cpu2 est2: on cpu2 coretemp3: on cpu3 est3: on cpu3 coretemp4: on cpu4 est4: on cpu4 coretemp5: on cpu5 est5: on cpu5 coretemp6: on cpu6 est6: on cpu6 coretemp7: on cpu7 est7: on cpu7 ZFS filesystem version: 5 ZFS storage pool version: features support (5000) Timecounters tick every 1.000 msec hdacc0: at cad 0 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: at nid 3 on hdaa0 hdacc1: at cad 0 on hdac1 hdaa1: at nid 1 on hdacc1 pcm1: at nid 20,21 and 26 on hdaa1= pcm2: at nid 18 on hdaa1 usbus0: 5.0Gbps Super Speed USB v3.0 usbus1: 480Mbps High Speed USB v2.0 ugen0.1: <0x8086> at usbus0 uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0= ugen1.1: at usbus1 uhub1: on usbus1 mmc0: No compatible cards found on bus ses0 at ahciem0 bus 0 scbus3 target 0 lun 0 ses0: SEMB S-E-S 2.00 device ses0: SEMB SES Device cd0 at ahcich5 bus 0 scbus2 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device=20 cd0: Serial Number H086 757747 cd0: 150.000MB/s transfers (SATA 1.x, UDMA6, ATAPI 12bytes, PIO 8192bytes= ) cd0: Attempt to query device size failed: NOT READY, Medium not present -= tray closed ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA-8 SATA 3.x device ada0: Serial Number TF655AWH3WBHTL ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad4 ada1 at ahcich4 bus 0 scbus1 target 0 lun 0 ada1: ATA-8 SATA 3.x device ada1: Serial Number S0C41154Z1ZSCA151537 ada1: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada1: Command Queueing enabled ada1: 15272MB (31277232 512 byte sectors: 16H 63S/T 16383C) ada1: Previously was known as ad6 random: unblocking device. SMP: AP CPU #1 Launched! SMP: AP CPU #4 Launched! SMP: AP CPU #3 Launched! SMP: AP CPU #7 Launched! SMP: AP CPU #2 Launched! SMP: AP CPU #5 Launched! SMP: AP CPU #6 Launched! Timecounter "TSC-low" frequency 1197253950 Hz quality 1000 Root mount waiting for: usbus1 usbus0 uhub0: 21 ports with 21 removable, self powered uhub1: 3 ports with 3 removable, self powered Root mount waiting for: usbus1 usbus0 ugen1.2: at usbus1 uhub2: o= n usbus1 Root mount waiting for: usbus1 usbus0 uhub2: 8 ports with 8 removable, self powered Root mount waiting for: usbus0 Root mount waiting for: usbus0 Root mount waiting for: usbus0 Root mount waiting for: usbus0 Root mount waiting for: usbus0 Root mount waiting for: usbus0 Root mount waiting for: usbus0 Root mount waiting for: usbus0 ugen0.2: at usbus0 (disconnected) Root mount waiting for: usbus0 ugen0.2: at usbus0 Trying to mount root from zfs:data/freebsd []... acpi_timer0: switching timecounter, TSC-low -> ACPI-fast (ada0:ahcich0:0:0:0): spin-down (ada1:ahcich4:0:0:0): spin-down acpi_lid0: wake_prep enabled for \134_SB_.LID_ (S3) acpi_button0: wake_prep enabled for \134_SB_.SLPB (S3) pci0:1:0:0: Transition from D0 to D3 pci1: set ACPI power state D3 on \134_SB_.PCI0.PEG_.VID_ pci0:0:1:0: Transition from D0 to D3 pci0: set ACPI power state D3 on \134_SB_.PCI0.PEG_ pci0: failed to set ACPI power state D2 on \134_SB_.PCI0.PEG_: AE_BAD_PAR= AMETER uhub0: at usbus0, port 1, addr 1 (disconnected) ugen0.2: at usbus0 (disconnected) pci0:2:0:0: Transition from D0 to D3 pci0:0:28:0: Transition from D0 to D3 pci0: failed to set ACPI power state D2 on \134_SB_.PCI0.EXP1: AE_BAD_PAR= AMETER pci0:0:28:1: Transition from D0 to D3 pci0: failed to set ACPI power state D2 on \134_SB_.PCI0.EXP2: AE_BAD_PAR= AMETER pci0:0:28:2: Transition from D0 to D3 pci0: failed to set ACPI power state D2 on \134_SB_.PCI0.EXP3: AE_BAD_PAR= AMETER pci0:0:28:4: Transition from D0 to D3 pci0: failed to set ACPI power state D2 on \134_SB_.PCI0.EXP5: AE_BAD_PAR= AMETER uhub1: at usbus1, port 1, addr 1 (disconnected) ugen1.2: at usbus1 (disconnected) uhub2: at uhub1, port 1, addr 2 (disconnected) vga0: saving 6660 bytes of video state vga0: saving color palette acpi_lid0: wake_prep enabled for \134_SB_.LID_ (S3) acpi_button0: wake_prep enabled for \134_SB_.SLPB (S3) pci0: set ACPI power state D0 on \134_SB_.PCI0.PEG_ pci0:0:1:0: Transition from D3 to D0 pci0: set ACPI power state D0 on \134_SB_.PCI0.PEG_ pci1: set ACPI power state D0 on \134_SB_.PCI0.PEG_.VID_ pci0:1:0:0: Transition from D3 to D0 pci0: set ACPI power state D0 on \134_SB_.PCI0.VID_ pci0: set ACPI power state D0 on \134_SB_.PCI0.EXP1 pci0:0:28:0: Transition from D3 to D0 pci0: set ACPI power state D0 on \134_SB_.PCI0.EXP1 pci0:2:0:0: Transition from D3 to D0 sdhci_pci0-slot0: Divider 260 for freq 400000 (max 208000000) mmc0: Probing bus mmc0: SD probe: failed mmc0: MMC probe: failed mmc0: Current OCR: 0x00000000 mmc0: No compatible cards found on bus pci0: set ACPI power state D0 on \134_SB_.PCI0.EXP2 pci0:0:28:1: Transition from D3 to D0 pci0: set ACPI power state D0 on \134_SB_.PCI0.EXP2 pci0: set ACPI power state D0 on \134_SB_.PCI0.EXP3 pci0:0:28:2: Transition from D3 to D0 pci0: set ACPI power state D0 on \134_SB_.PCI0.EXP3 pci0: set ACPI power state D0 on \134_SB_.PCI0.EXP5 pci0:0:28:4: Transition from D3 to D0 pci0: set ACPI power state D0 on \134_SB_.PCI0.EXP5 pci0: set ACPI power state D0 on \134_SB_.PCI0.LPC_ vga0: calling BIOS POST pci0: set ACPI power state D0 on \134_SB_.PCI0.B0D3 pci0: set ACPI power state D0 on \134_SB_.PCI0.XHCI pci0: set ACPI power state D0 on \134_SB_.PCI0.IGBE em0: Link is Down em0: link state changed to DOWN pci0: set ACPI power state D0 on \134_SB_.PCI0.HDEF hdaa1: Headphones redirection for association 0 nid=3D21 using unsolicite= d responses. xhci0: 32 byte context size. pci0: set ACPI power state D0 on \134_SB_.PCI0.EHC1 pci0: set ACPI power state D0 on \134_SB_.PCI0.SAT1 ahcich0: AHCI reset... ahcich0: SATA connect time=3D100us status=3D00000133 ahcich0: AHCI reset: device found ahcich0: AHCI reset: device ready after 0ms ahcich4: AHCI reset... ahcich4: SATA connect time=3D100us status=3D00000133 ahcich4: AHCI reset: device found ahcich4: AHCI reset: device ready after 0ms ahcich5: AHCI reset... ahcich5: SATA connect time=3D1800us status=3D00000113 ahcich5: AHCI reset: device found ahcich5: AHCI reset: device ready after 0ms pci0: set ACPI power state D0 on \134_SB_.PCI0.SMBU atkbd: the current kbd controller command byte 0065 atkbd: keyboard ID 0x54ab (2) kbdc: RESET_KBD return code:00fa kbdc: RESET_KBD status:00aa kbdc: TEST_AUX_PORT status:0000 kbdc: RESET_AUX return code:00fa kbdc: RESET_AUX status:00aa kbdc: RESET_AUX ID:0000 (ada0:ahcich0:0:0:0): resume (ada1:ahcich4:0:0:0): resume xhci0: acpi_timer0: Port routing mask set to 0xffffffff restoring timecounter, ACPI-fast -> TSC-low uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0= uhub1: on usbus1 uhub0: 21 ports with 21 removable, self powered uhub1: 3 ports with 3 removable, self powered em0: Link is up 1000 Mbps Full Duplex em0: link state changed to UP ugen1.2: at usbus1 uhub2: o= n usbus1 uhub2: 8 ports with 8 removable, self powered ugen0.2: at usbus0 (disconnected) ugen0.2: at usbus0 --------------040308080305040009000003-- --IpER313Wq1iwmgipk0cqgdFQtxwaoiqQP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVpFkYAAoJECuREQPg1IcEA8YQAIRLQXZt5pRoGMudJF7fG755 RxNhtsMwWJx8oYYedTyihktPZJBewXe0tWMnKdN6RpGDy6m3F48Fwh0y3JuaqhN3 C41CQp99nw1IB83UI822iXS83EyTeiSenipb6QZLBU12KpcdBGVuwNGSVcCCGBDe xKyVpFE+YbtvkgrG9r0bxJ6xjqG+19ojTlHuxkMFUC7sKeWkZlEDoKfIYvMDz37O vGutSMHJKEiMGqSwVNpIs8ABu0Zivk9OTsCX0fPAZprt5IS4y1ax6f1FgvIVsYAW 20QOs/zZA81zBTP643ePuf0Z75Z0akEnkwmX0w9vex5A1cYedgdPlPjJ2OhDfQGO ADmMoNIDwz1YgQ1ehpe/hXZUcUBwoRRQHzROsW26lwQqiQQ0CeGQsx+A2Aoah7y9 mL8x6nmj9znB1/IOqgBxuGCqeWAt/sRo+3vGB902qgY+PRZMUuDcJ/3uPTb96Zh6 ylvZY92m4eqSaVWemQrev/rHuMC/Y86YXqMW2ZU6rgMDiOp2Q0/ifINAeJgYNTpq yZPgVI1e8eEN8RemA7j/FRNwOisSLJnQBQ4UVqN/m53mTeH/UIPuT4N9O9kToB1m VTfXSpNAM8Rs1qFcWDUBWGn9fjjtHijRUg2Zco4bpva1BcL/qXK8FS3cQ3P8+HAd Cb94knSoB5ZQyTz/aa+q =wNro -----END PGP SIGNATURE----- --IpER313Wq1iwmgipk0cqgdFQtxwaoiqQP--