From owner-freebsd-current@freebsd.org Mon Aug 31 08:53:19 2015 Return-Path: Delivered-To: freebsd-current@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 4952E9C6423; Mon, 31 Aug 2015 08:53:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 272861BE2; Mon, 31 Aug 2015 08:53:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iog7 with SMTP id 7so27277505iog.2; Mon, 31 Aug 2015 01:53:18 -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:content-transfer-encoding; bh=1NxR8qSMiSeBVk3N02mMlUd/QAAqowcAAg36VCqCrXw=; b=XVhwQyeghghNEQtE6Z0dfGOOig+h4aqfnemR2k/lSDXuUcOpF3Nje/Y34BcZUCxCRU frv385NjbCNqNivXwhhlj3ZZHerVbY9lXGRUn6RA3Z/lJGgvMGGL4cxlmAGkVGvh5WWL hGQxd+kcCJduhj0Bj3z5Fem4rnC1SByAYztQW0EUXuLNQas4Qv4Alvm7wcULthLsPy3Q Q+lql/XLYOsI/fRdA2pv+HtqffS8wIhtiIqI3nbZK/zFtUHGBVzMv+xOX+QgVWXhAbk+ +zShhUAzWviJmrbr5+l0cxahVAKS+RVPwkWYYbXSw+0/I/Zn66h5nwF6t5PrYY4siDOO OemA== MIME-Version: 1.0 X-Received: by 10.107.131.196 with SMTP id n65mr22517051ioi.75.1441011197566; Mon, 31 Aug 2015 01:53:17 -0700 (PDT) Received: by 10.36.28.208 with HTTP; Mon, 31 Aug 2015 01:53:17 -0700 (PDT) In-Reply-To: References: <55E3F098.9060806@FreeBSD.org> Date: Mon, 31 Aug 2015 01:53:17 -0700 Message-ID: Subject: Re: acpi suspend debugging techniques? From: Adrian Chadd To: Garrett Cooper Cc: Andriy Gapon , FreeBSD Current , "freebsd-acpi@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 31 Aug 2015 08:53:19 -0000 hi, Try disabling hardware one at a time. Ie, unload usb; unload wifi; leave kms loaded for mostly obvious reasons. I hit a few of these which turned out to be an issue in the suspend path of a driver - and once I found it was the USB hardware but the BIOS itself that was hanging - FreeBSD put USB hardware into S3, but the ACPI BIOS requested S2 and just hung if we had USB in S3. :( -adrian On 30 August 2015 at 23:33, Garrett Cooper wrote: > >> On Aug 30, 2015, at 23:13, Andriy Gapon wrote: >> >> >> I would appreciate any pointers at how to debug an ACPI suspend problem = that I have. >> >> What I have so far. The system hangs when I try to suspend it and it ge= ts reset >> by a watchdog. Setting debug.acpi.suspend_bounce=3D1 does not make any >> difference, so the hang happens before the final sleep code is executed.= I >> think that the device suspend stage is executed, because disks get spun = down and >> video signals gets cut off. >> >> I could enable / add some debug printfs, but I suppose that their output= would >> get lost due to the above. RAM content unfortunately does not survive a= cross >> the resets. > > When I last had to do this to figure out what magic formula was required = to get my netbook working, I did something like this: > > 1. Stripped down the kernel to just the storage driver and core pieces. > 2. Loaded all other modules after boot, if necessary. > 3. Called zzz with the appropriate ACPI tunables/sysctls set. > > That got me pointed in the right direction (IIRC it was psm at the time).= What I did to get a real smoking gun was I put printf statements in subr_b= us.c (IIRC) to track device quiescing at suspend and reawakening at resume. > > There=E2=80=99s `options BUS_DEBUG` too, which may or may not help. > > FWIW I found debug.acpi.suspend_bounce less useful, but it still exercise= d the quiesce->reawaken cycle, sorta. > > There=E2=80=99s also `hw.acpi.reset_video` and `debug.acpi.resume_beep`. > > You might need to hack /etc/rc.resume and /etc/rc.suspend, BTW, depending= on what you discover (switching my vty was definitely required in order fo= r X11 to come back in a sane manner at resume). > > Cheers, > -NGie > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= "