From owner-freebsd-current@freebsd.org Mon Aug 31 06:33:12 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 A5BBC9C40B5; Mon, 31 Aug 2015 06:33:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (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 78717BC9; Mon, 31 Aug 2015 06:33:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacrd3 with SMTP id rd3so12552034pac.3; Sun, 30 Aug 2015 23:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6V1aAqH/LQ/aDvNVd8eztDlLUeH2YyQGOtYyZzpAhPE=; b=bOuvciuaAVT+f3RZIK6TCIRcCOqLJ+/vRH5niXE2BtAySzkW0aZW/FcZXwY2JzIFzU BqTTgFf4BIKx0Eh9xvl2owPhNnAVBg+C8/qWmtWQzICRLE7XqiI6NjzhCpzwGWSsxeYV mioqC2oqVJPbSw4XJnhb7FFlUA4L++ZmgwJTutTjusplf+lmKytjJRQsPj7qIO4dsiCI NHSEbhm/b2U+P18yigS/GA7Vb9pPGURYVJYXZk+XSk9h2r7G5HvWRgW+U+fhmVirBtic YHuEgd1TWKCf2FPf0YSJyxYnMR6qbbMdQGaM46Ai7sXSscMpTAzcCXHtXI1GGMFAfm06 eKDA== X-Received: by 10.68.181.34 with SMTP id dt2mr34387997pbc.7.1441002792084; Sun, 30 Aug 2015 23:33:12 -0700 (PDT) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id y8sm13208672pbt.7.2015.08.30.23.33.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Aug 2015 23:33:11 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: acpi suspend debugging techniques? From: Garrett Cooper In-Reply-To: <55E3F098.9060806@FreeBSD.org> Date: Sun, 30 Aug 2015 23:33:10 -0700 Cc: FreeBSD Current , "freebsd-acpi@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <55E3F098.9060806@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.2104) 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 06:33:12 -0000 > On Aug 30, 2015, at 23:13, Andriy Gapon wrote: >=20 >=20 > I would appreciate any pointers at how to debug an ACPI suspend = problem that I have. >=20 > What I have so far. The system hangs when I try to suspend it and it = gets 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. >=20 > 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 = across > 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_bus.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 = exercised 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 for X11 to come back in a sane manner at resume). Cheers, -NGie=