From owner-freebsd-current@FreeBSD.ORG Sun Feb 15 18:53:19 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AB50ECE; Sun, 15 Feb 2015 18:53:19 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 952349BA; Sun, 15 Feb 2015 18:53:17 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t1FIrCoh044848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 15 Feb 2015 21:53:12 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t1FIrChp044847; Sun, 15 Feb 2015 21:53:12 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 15 Feb 2015 21:53:12 +0300 From: Gleb Smirnoff To: "Ranjan1018 ." <214748mv@gmail.com> Subject: Re: Suspend/resume on i915 stop working between r278348 and r278741. Message-ID: <20150215185311.GP15484@FreeBSD.org> References: <20150215151141.GB34251@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , Adrian Chadd , FreeBSD CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sun, 15 Feb 2015 18:53:19 -0000 On Sun, Feb 15, 2015 at 07:45:44PM +0100, Ranjan1018 . wrote: R> > On Sun, Feb 15, 2015 at 03:37:17PM +0100, Ranjan1018 . wrote: R> > > Hi, R> > > the bug was introduced in r278473. Suspend/resume works again if I R> > disable R> > > the x2APIC support with hw.x2apic_enable=0 in /boot/loader.conf, tested R> > in R> > > r278473 and r278741. R> > R> > So how it is related to i915 ? R> > R> > Sorry, just my guess. R> R> R> > Try the patch. R> > R> > diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c R> > index 1809fa6..c8ea35e 100644 R> > --- a/sys/x86/x86/local_apic.c R> > +++ b/sys/x86/x86/local_apic.c R> > @@ -541,6 +541,9 @@ native_lapic_setup(int boot) R> > R> > saveintr = intr_disable(); R> > R> > + if (!boot && x2apic_mode) R> > + native_lapic_enable_x2apic(); R> > + R> > la = &lapics[lapic_id()]; R> > KASSERT(la->la_present, ("missing APIC structure")); R> > maxlvt = (lapic_read32(LAPIC_VERSION) & APIC_VER_MAXLVT) >> R> > MAXLVTSHIFT; R> > R> R> Unfortunately does not work for me. Tested with r278803. Me neither. Also, I noticed that in my case the suspend sequence is also behaving differently from pre-x2apic kernel. With new kernel, suspend sequence doesn't switch from X to vt(4), screen switches to black directly from X. So, probably the resume isn't broken at all, instead suspend is broken: it puts machine in a state that can't be resumed. -- Totus tuus, Glebius.