From owner-freebsd-current@FreeBSD.ORG Thu Oct 21 04:21:04 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD0F8106566C for ; Thu, 21 Oct 2010 04:21:04 +0000 (UTC) (envelope-from sendtomatt@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 70F788FC0A for ; Thu, 21 Oct 2010 04:21:04 +0000 (UTC) Received: by gyd8 with SMTP id 8so1235129gyd.13 for ; Wed, 20 Oct 2010 21:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=XSugUmjjHT8i73BbfiyvuZP9Ku51AW3hKxAdmaZqswY=; b=T1hXhJmjVUqD7ZUWg45uAzC0rwpKo0FRgYtVLtOl1zNfUdNRzLCCVZK4OTUosHSJCk h+SMONta5+wXozfZ+vL7ONfAWHemR8vVX4oRZf8n9saU/Qve0dDNrj/EumefC+uTMLJG PZHispuXJS3qWBw5E9DT7pZEE4hyRdtXd62zQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=kfQTpUETQhK5GJAIF/EmMCc2KIWX06b3augzSAwIBBEMcnPyC6HHC83pkSULCXHBR1 ULixqikzdPjCY/4u+pTXrOt+6ucrVR7fZK3aDKzvH0nqq7/1o8AqBpgsFwkaSZ9tYIS2 2tmrSo/4WrFBfuHVrQ+THjnbjRpLOxXE6diUo= Received: by 10.150.206.6 with SMTP id d6mr2883996ybg.39.1287634863483; Wed, 20 Oct 2010 21:21:03 -0700 (PDT) Received: from ono-sendai.local ([75.111.34.169]) by mx.google.com with ESMTPS id t4sm7593804ybe.1.2010.10.20.21.20.52 (version=SSLv3 cipher=RC4-MD5); Wed, 20 Oct 2010 21:21:02 -0700 (PDT) Message-ID: <4CBFBF93.204@gmail.com> Date: Wed, 20 Oct 2010 21:20:35 -0700 From: Matt User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100918 Thunderbird/3.1.4 MIME-Version: 1.0 To: Jung-uk Kim References: <4C732522.1010400@gmail.com> <4CBF28D8.3090207@gmail.com> <4CBF2C6B.4030704@gmail.com> <201010201446.26383.jkim@FreeBSD.org> In-Reply-To: <201010201446.26383.jkim@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org Subject: Re: Sleep/Lenovo SL410 fails again after csup & clang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2010 04:21:04 -0000 On 10/20/10 11:46, Jung-uk Kim wrote: > On Wednesday 20 October 2010 01:52 pm, Matt wrote: >> On 10/20/10 10:37, Matt wrote: >>>> On Wed, 20 Oct 2010, Jung-uk Kim wrote: >>>>> On Tuesday 19 October 2010 09:15 pm, Matt wrote: >>>>>> My experience with a sleeping freebsd laptop has been >>>>>> shortlived! >>>>>> >>>>>> Today I rebuilt world using clang& this morning's csup >>>>>> current. Clang build went just swimmingly. >>>>>> >>>>>> Unthinkingly, I closed my laptop lid and put it in my case. >>>>>> When I got to my house, it was roasting with fans spinning and >>>>>> sleep light flashing. No damage, thankfully. >>>>>> >>>>>> Low and behold, hw.pci.do_power_resume=0 no longer lets my >>>>>> laptop sleep! >>>>>> >>>>>> I had recently fiddled with powerd, but problem persisted >>>>>> after reverting to previous configuration of associated >>>>>> sysctls etc. >>>>>> >>>>>> Interestingly, sleep bounce now fails with a hard freeze, >>>>>> which it never has in the past. >>>>>> >>>>>> Verbose output shows the wifi then re0 network interfaces >>>>>> going from D0->D3 as last living output. >>>>>> >>>>>> Please note problem persists regardless of user, X running, >>>>>> sleep_delay sysctl, do_power_resume, do_power_nodriver, powerd >>>>>> running/not running. >>>>>> >>>>>> Without sleep bounce, problem is characterized by flashing >>>>>> sleep light and spinning fans (CPU temperature is high). >>>>>> >>>>>> No devices added or removed, was sleeping this morning before >>>>>> buildworld. Is it worth rebuilding with gcc? Or a content >>>>>> change and not a compiler issue? Any major pci changes lately >>>>>> maybe? >>>>> Can you please update source and try again? If it does not >>>>> work, please set a new tunable "hw.pci.do_power_suspend=0" and >>>>> tell me whether it helps or not. FYI, hw.pci.do_power_resume >>>>> does not apply to suspend any more. So, if you want to restore >>>>> the previous behaviour, you need both >>>>> "hw.pci.do_power_resume=0" and "hw.pci.do_power_suspend=0". >>>>> However, my hunch tells me that you only need the latter. >>>>> >>>>> Also, if possible, I'd like to see 'devinfo -rv', 'pciconf >>>>> -clv', 'acpidump -dt', and 'lspci -vvv' output. Note lspci is >>>>> available via ports/sysutils/pciutils. >>>>> >>>>> Thanks, >>>>> >>>>> Jung-uk Kim >>>>> _______________________________________________ >>>>> freebsd-current@freebsd.org mailing list >>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>>>> To unsubscribe, send any mail to >>>>> "freebsd-current-unsubscribe@freebsd.org" >>> A>> dump file of the above commands in order: >>> http://pastebin.com/KhFn9xaK >>> >>> I'm grabbing a new csup now, glad it wasn't clang at least. When >>> I did Mac development, LLVM binaries were generally significantly >>> faster for some things. >>> >>> Interesting, I got some phone related topic added into your post, >>> and no direct mail, so hopefully you can get your hands on the >>> pastebin link. >>> >>> Thank you, I will let you know if the new tunable does the trick. >>> >>> Matt >> Build fails. I will also try gcc, but it seems like it doesn't know >> about do_power_suspend yet! >> >> >> cd /usr/obj/usr/src/sys/ONOSENDAI; MAKEOBJDIRPREFIX=/usr/obj >> MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE=nocona >> GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin >> GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font >> GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac >> _SHLIBDIRPREFIX=/usr/obj/usr/src/tmp VERSION="FreeBSD 9.0-CURRENT >> amd64 900023" INSTALL="sh /usr/src/tools/install.sh" >> PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/lega >> cy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tm >> p/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/gam >> es:/sbin:/bin:/usr/sbin:/usr/bin make KERNEL=kernel all >> -DNO_MODULES_OBJ >> clang -c -O2 -fno-strict-aliasing -pipe -march=nocona -std=c99 >> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes >> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef >> -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys >> -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS >> -include opt_global.h -fno-omit-frame-pointer -mcmodel=kernel >> -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx >> -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables >> -ffreestanding -fstack-protector /usr/src/sys/dev/pci/pci_pci.c >> clang: warning: argument unused during compilation: '-mfpmath=387' >> /usr/src/sys/dev/pci/pci_pci.c:450:20: error: use of undeclared >> identifier 'pci_do_power_suspend'; did you mean >> 'pci_do_power_resume'? if (error == 0&& pci_do_power_suspend) { >> ^~~~~~~~~~~~~~~~~~~~ >> pci_do_power_resume >> In file included from /usr/src/sys/dev/pci/pci_pci.c:51: >> /usr/src/sys/dev/pci/pci_private.h:41:13: note: >> 'pci_do_power_resume' declared >> here >> extern int pci_do_power_resume; >> ^ >> 1 error generated. >> *** Error code 1 >> >> Stop in /usr/obj/usr/src/sys/ONOSENDAI. >> *** Error code 1 >> >> Stop in /usr/src. >> *** Error code 1 >> >> Stop in /usr/src. > It seems your sys/dev/pci/pci_private.h is out of sync somehow. It > was updated with pci_pci.c in the same commit. Please try csup > again. > > Jung-uk Kim > After current cvsup, SL410 sleeps again (with both hw.pci.do_power_suspend and hw.pci.do_power_resume set to 0). Initial toggling indicated that at least would work, I will experiment more. Thank you all for a quick resolution to the problem! Matt