From owner-freebsd-mobile@FreeBSD.ORG Fri Jun 13 13:47:38 2003 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E2FE37B401 for ; Fri, 13 Jun 2003 13:47:38 -0700 (PDT) Received: from gw.pelleg.org (gw.pelleg.org [205.201.13.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46C1B43F75 for ; Fri, 13 Jun 2003 13:47:37 -0700 (PDT) (envelope-from dpelleg@cs.cmu.edu) Received: from lank.auton.cs.cmu.edu (lank.wburn [192.168.3.41]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))OK)) by gw.pelleg.org (Postfix) with ESMTP id E59A15A2D; Fri, 13 Jun 2003 16:47:34 -0400 (EDT) Received: by lank.auton.cs.cmu.edu (Postfix, from userid 7675) id D2D80268; Fri, 13 Jun 2003 16:47:32 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16106.14436.85600.525104@gargle.gargle.HOWL> Date: Fri, 13 Jun 2003 16:47:32 -0400 To: David.E.Tweten@nasa.gov In-Reply-To: <4343.1055206419@gilmore.nas.nasa.gov> References: <4343.1055206419@gilmore.nas.nasa.gov> X-Mailer: VM 7.00 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid From: Dan Pelleg cc: mobile@freebsd.org Subject: Re: suspend on ThinkPad X31 hangs X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dan Pelleg List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2003 20:47:38 -0000 Dave Tweten writes: > daniel+bsd@pelleg.org said: > >I recently installed 4.8-RC on an IBM thinkpad X31. APM seems to work > >(reporting battery status), and hibernation to a special partition > >(created with the IBM tool) works. But suspend has problems resuming. > > That's strange, since FreeBSD 4.8 doesn't know about hibernation. It just > thinks it's being put to sleep. The BIOS knows to copy things to the > hibernation partition and shut down after the OS has gone to sleep. > > You didn't answer any of the following questions in your original message, > so: > > 1. Did you put > > options CPU_SUSP_HALT > > and > > device apm0 > > into your custom kernel config? > > 2. Did you put all of: > > apm_enable="YES" > apmd_enable="YES" > apmd_flags="-f /usr/local/etc/apmd.conf" > > into /etc/rc.conf (changing the path name to the location of your > customized apmd configuration file)? > > 3. Did you customize apmd.conf to incorporate > > apm_event SUSPENDREQ, USERSUSPENDREQ { > exec "/usr/local/etc/rc.suspend"; > } > > apm_event NORMRESUME, CRITRESUME, STANDBYRESUME { > exec "/usr/local/etc/rc.resume"; > } > > or the rough equivalent, to invoke your customized suspend and > resume scripts? > > 4. Does your customized suspend script do > > sync && sync && sync > sleep 3 > zzz > > to make sure all outstanding disk I/O is complete before you > actually suspend? > > 5. Are you running any detachable devices (PCCard or USB) when you > suspend? If so, you may want to detach them in rc.suspend and > re-attach them in rc.resume. > > You said you've already created a hibernation slice. If you've done all > these things, and if your X31 works at all like my T23, suspend and > hibernate should work well, except for the need to switch to a virtual > console and back to X when you wake up from hibernation. Thank you for the reply. I have CPU_SUSP_HALT and apm0. apmd_flags is not set in my rc.conf. But it seems that syncing is taken care of in /etc/rc.suspend. I tried this with and without detachable devices, and with and without X running. No luck. This is strange. My X23 suspends and resumes fine (I don't have an hibernation partition on it). Here is a more detailed description of the failure (from booting with -v): At resume, it shows: ata0: resetting devices .. ata0: mask=03 ostat0=50 ostat2=00 ad0: ATAPI 00 00 ata0-slave: ATAPI 00 00 ata0: mask=03 stat0=50 stat1=00 ad0: ATA 01 a5 ata0: devices=01 ad0: success setting WDMA2 on generic chip done ata1: resetting devices .. ata1: mask=03 ostat0=00 ostat2=00 ata1-master: ATAPI 00 00 ata1-slave: ATAPI 00 00 ata1: mask=o3 stat0=00 stat1=00 ata1: devices=00 done about a second later is shows: ad0: WRITE command timeout tag=0 serv=0 - resetting ata0: resetting devices .. and then locks sometimes it will instead show this before locking:: ad0: READ command timeout tag=0 serv=0 - restting ata0: resetting devices ..