From owner-freebsd-acpi@FreeBSD.ORG Tue Sep 3 19:08:29 2013 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E5DB553C; Tue, 3 Sep 2013 19:08:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AF9312FB9; Tue, 3 Sep 2013 19:08:29 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7DE78B965; Tue, 3 Sep 2013 15:08:27 -0400 (EDT) From: John Baldwin To: freebsd-acpi@freebsd.org Subject: Re: suspend/resume on Lenovo X1 (regression from reports on wiki) Date: Tue, 3 Sep 2013 12:28:30 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <521D03AE.3050709@sics.se> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201309031228.30717.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 03 Sep 2013 15:08:27 -0400 (EDT) Cc: Laura Marie Feeney , Kevin Oberman , Gleb Smirnoff , "Sergey A. Osokin" X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 19:08:30 -0000 On Sunday, September 01, 2013 3:51:47 pm Adrian Chadd wrote: > (cc jkim) > > Hi! Would you mind taking a look at the -acpi list posts with this subject? > It looks like a lot of the video suspend/resume issues on these thinkpads > boil down to the VESA driver code. If it's disabled, (at least) x11 resume > works. > > Would you be able to help us track down what's going on? > > Thanks! Most likely vga_suspend()/vga_resume() in sys/isa/vga_isa.c is calling vidd_save_state() and vidd_load_state() which in the VESA case map to the _save_state() and _load_state() methods in sys/dev/fb/vesa.c. These methods look fairly sane to me, so it's probably either a BIOS bug, or the fact that KMS is bypassing the BIOS, so when KMS is active we should perhaps disable the VESA BIOS. I'd argue that we should be it is a BIOS bug regardless. However, one thing that might help is that this is being called at a "random" time rather than when vgapci0 is being suspended and resumed. Actually, it looks like jkim fixed this via the vgapm driver, except I have no vgapm0 device on my laptop. I wonder if it's supposed to be device_get_unit() instead of device_get_flags() in the vgapm identify routine? -- John Baldwin