From owner-freebsd-acpi@FreeBSD.ORG Thu Nov 27 21:09:33 2008 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 144831065687 for ; Thu, 27 Nov 2008 21:09:33 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id BBC548FC0A for ; Thu, 27 Nov 2008 21:09:32 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so502999ywe.13 for ; Thu, 27 Nov 2008 13:09:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=dco/k5PgfkZuwM7sf6m7FH/z9dV6aNYAR2yeZySSsnI=; b=dX+0DySSjcLCv2uyrclqySJPhbcxz3yJmq8852/R6qzxQUSGbTwoQfMdUctCKtVZEa WXKQma8xOny8i512rGd0RzUfp7rlVLlbPo8ot2aRRGkD/abBFXI/ldDRVaspReQMuvT/ GRZ9BDm77iTch3M3QT7o48Xy6pULeXUNMNzDQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=FcH39UKqtQOR/r5BA57aRNRf7gUsEgNzbXDUmQ7MRQ5WVB1xHiejP4baSiLIB4ikRu 5SpTAaCBSL7/7513k4LTpcPg9ShGQowm86HSsNOVacWRa2/T3ScTrPlAulhNMz4pfcc9 4Ik5wgU9GIRVMiglqDiYfv09Av7DVa+39HD0c= Received: by 10.231.19.72 with SMTP id z8mr249786iba.6.1227820171374; Thu, 27 Nov 2008 13:09:31 -0800 (PST) Received: by 10.231.10.195 with HTTP; Thu, 27 Nov 2008 13:09:31 -0800 (PST) Message-ID: <3a142e750811271309y714f5c5y38ca6fff577add5f@mail.gmail.com> Date: Thu, 27 Nov 2008 22:09:31 +0100 From: "Paul B. Mahol" To: freebsd-acpi@freebsd.org In-Reply-To: <3a142e750811251137se5091f8vc1ca13e5469413c3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3a142e750811240748o1923fdc4xca1ae55f44bf664d@mail.gmail.com> <3a142e750811241658i39097018x3c6f49aa62805fa7@mail.gmail.com> <3a142e750811251137se5091f8vc1ca13e5469413c3@mail.gmail.com> Subject: Re: Resume on hp nx7300 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, 27 Nov 2008 21:09:33 -0000 On 11/25/08, Paul B. Mahol wrote: > On 11/25/08, Paul B. Mahol wrote: >> On 11/24/08, Paul B. Mahol wrote: >>> Hi, >>> >>> I managed somehow to succesfully resume laptop from suspend, >>> setting hw.acpi.osname="Windows 2001" >> It appears that it's not required at all. >> >>> but lcd output is off and can not be turned on. >> >> It will work if vesa is kldloaded _before_ suspend. >> Also kldload i915 (agp+drm+i915) _before_ suspend will do it. >> >>> sysctl hw.acpi.reset_video=1 does'nt work, instead to resume, machine >>> remain in unknown state, keyboard input doesnt work. >>> >>> Also if powerd + cpufreq combination is used, some time after resume >>> system will reboot itself: >>> >>> db:0:kdb.enter.unknown> show pcpu >>> cpuid = 0 >>> curthread = 0xc3ff0240: pid 667 "powerd" >>> curpcb = 0xc3a72d90 >>> fpcurthread = none >>> idlethread = 0xc3d2fd80: pid 10 "idle: cpu0" >>> APIC ID = 0 >>> currentldt = 0x50 >>> spin locks held: >>> db:0:kdb.enter.unknown> bt >>> Tracing pid 667 tid 100036 td 0xc3ff0240 >>> mtrash_ctor(c3e21000,400,0,1,0,...) at mtrash_ctor+0x60 >>> uma_zalloc_arg(c108ba20,0,1,0,c3e2c400,...) at uma_zalloc_arg+0x137 >>> malloc(36c,c06d1bc0,1,210,c049b0c3,...) at malloc+0xcb >>> cf_levels_method(c3e0ae80,c446f000,c3a72b4c,c3a72ba8,c446f3b4,...) at >>> cf_levels_method+0x23d >>> cpufreq_curr_sysctl(c3e414c0,c3e4f000,0,c3a72ba8,c3a72ba8,4,4,c3e414c0) >>> at cpufreq_curr_sysctl+0x169 >>> sysctl_root(c3a72ba8,0,c069a48a,587,c3ff0240,...) at sysctl_root+0x138 >>> userland_sysctl(c3ff0240,c3a72c14,4,0,0,...) at userland_sysctl+0x115 >>> __sysctl(c3ff0240,c3a72cf8,18,c06a0480,c06ce1b0,...) at __sysctl+0xb7 >>> syscall(c3a72d38) at syscall+0x261 >>> Xint0x80_syscall() at Xint0x80_syscall+0x20 >>> --- syscall (202, FreeBSD ELF32, __sysctl), eip = 0x28172533, esp = >>> 0xbfbfe84c, ebp = 0xbfbfe878 --- >>> >>> >>> acpi_ec0: wait timed out (response), forcing polled mode >>> <5>wakeup from sleeping state (slept 00:00:14) >>> acpi_tz0: _CRT value is absurd, ignored (256.0C) >>> agp0: on vgapci0 >>> agp0: detected 7932k stolen memory >>> agp0: aperture size is 256M >>> Memory modified after free 0xc3e21000(1020) val=0 @ 0xc3e21000 >>> >> >> powerd + cpufreq combination just works, above panic >> probably happened because agp is loaded _after_ resume. >> >>> >>> Fatal trap 12: page fault while in kernel mode >>> cpuid = 0; apic id = 00 >>> fault virtual address = 0xffff0020 >>> fault code = supervisor read, page not present >>> instruction pointer = 0x20:0xc062c350 >>> stack pointer = 0x28:0xc3a72a04 >>> frame pointer = 0x28:0xc3a72a24 >>> code segment = base 0x0, limit 0xfffff, type 0x1b >>> = DPL 0, pres 1, def32 1, gran 1 >>> processor eflags = interrupt enabled, resume, IOPL = 0 >>> current process = 667 (powerd) >>> exclusive sx cpufreq lock (cpufreq lock) r = 0 (0xc3e4f000) locked @ >>> /usr/src/sys/kern/kern_cpu.c:528 >>> exclusive sx sysctl lock (sysctl lock) r = 0 (0xc070f404) locked @ >>> /usr/src/sys/kern/kern_sysctl.c:1415 >>> exclusive sleep mutex Giant (Giant) r = 0 (0xc070edf0) locked @ >>> /usr/src/sys/kern/kern_sysctl.c:1353 >>> exclusive sx cpufreq lock (cpufreq lock) r = 0 (0xc3e4f000) locked @ >>> /usr/src/sys/kern/kern_cpu.c:528 >>> exclusive sx sysctl lock (sysctl lock) r = 0 (0xc070f404) locked @ >>> /usr/src/sys/kern/kern_sysctl.c:1415 >>> exclusive sleep mutex Giant (Giant) r = 0 (0xc070edf0) locked @ >>> /usr/src/sys/kern/kern_sysctl.c:1353 >>> >>> >>> Do I need to build/install UP kernel, or I can use SMP one with smp >>> disabled via loader.conf? >> >> kern.smp.disabled="1" just works, and disabling dual core from bios is >> not required. >> >> Restarting moused after resume is must. >> pccard and ndis powered broadcom card do not work after resume, >> even if right driver was never loaded during/after boot - before suspend. >> >> Main problem is that shutdown button (S5) doesnt work after resume. >> Is there any know reason why that could happen? > > Problem with cardbus controller appears to be that it never got into D3 > state, > because its hdr=0x02 > > I encountered also that setting hw.pci.do_power_nodriver=2 in > /boot/loader.conf > have same nasty effect when using it with suspend/resume. > > After resume all devices will be put back into D0 state, but if you > kldunload > one driver, for example snd_hda and kldload it again, all devices that > do not have > driver attached (and with hdr=0x00) will be put into D3 again. > > Same scenario happen when unloading driver, device will remain in D0 state > until some other driver is loaded/attached to correct device. > > Current devices power state can be monitored with "pciconf -lvc". > > I think this is more general problem. Here is status of cardbus before suspend: 02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller Subsystem: Hewlett-Packard Company Unknown device 30a2 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset+ 16bInt+ PostWrite- 16-bit legacy interface ports at 0001 00: 4c 10 39 80 07 00 10 02 00 00 07 06 10 40 82 00 10: 00 00 10 f4 a0 00 00 02 02 03 03 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 00 00 00 00 12 01 c4 03 40: 3c 10 a2 30 01 00 00 00 00 00 00 00 00 00 00 00 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80: 60 10 44 08 19 00 a3 01 00 00 17 00 22 1b 01 01 90: c0 02 64 40 00 00 00 00 00 00 00 00 00 00 00 00 a0: 01 00 02 7e 00 00 c0 00 00 00 00 00 00 00 00 00 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0: 22 52 d0 6f 05 98 01 04 00 00 00 00 00 00 00 00 and after resume: 02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller Subsystem: Hewlett-Packard Company Unknown device 30a2 Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset+ 16bInt- PostWrite- 16-bit legacy interface ports at 0001 00: 4c 10 39 80 00 00 10 02 00 00 07 06 00 00 82 00 10: 00 00 00 00 a0 00 00 02 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 00 00 00 00 ff 01 40 03 40: 3c 10 a2 30 01 00 00 00 00 00 00 00 00 00 00 00 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80: 60 10 44 08 19 00 a3 01 00 00 17 00 22 1b 01 01 90: c0 02 64 40 00 00 00 00 00 00 00 00 00 00 00 00 a0: 01 00 02 7e 00 00 c0 00 00 00 00 00 00 00 00 00 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0: 22 52 d0 6f 05 98 01 04 00 00 00 00 00 00 00 00 -- Paul