From owner-freebsd-mobile@FreeBSD.ORG Wed Mar 30 08:04:55 2011 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8DC4106564A for ; Wed, 30 Mar 2011 08:04:55 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 0E98A8FC14 for ; Wed, 30 Mar 2011 08:04:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id p2U84jlM029833; Wed, 30 Mar 2011 19:04:45 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Wed, 30 Mar 2011 19:04:44 +1100 (EST) From: Ian Smith To: Lars Engels In-Reply-To: <20110330065828.GI27936@e.0x20.net> Message-ID: <20110330184300.H33521@sola.nimnet.asn.au> References: <201103281250.09703.josh@tcbug.org> <20110330065828.GI27936@e.0x20.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Josh Paetzel , freebsd-mobile@freebsd.org Subject: Re: Suspect/Resume success on Lenovo T510 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2011 08:04:55 -0000 On Wed, 30 Mar 2011, Lars Engels wrote: > On Mon, Mar 28, 2011 at 12:50:05PM -0500, Josh Paetzel wrote: > > I've had such bad luck with suspend and resume working on FreeBSD laptop that > > I didn't even try it on my new lenovo T510 and just assumed it was broken. > > > > Then the power failed this weekend and it went to sleep to conserve the > > battery. I tried waking it up and the only thing that didn't come back was > > the mouse. I'm running moused, and a simple /etc/rc.d/moused restart fixed > > that. Good to hear, Josh. > > Nvidia discreet video, intel 6100 wireless using iwn, PC-BSD 8.2 > > > > rc.resume: > > > > /usr/sbin/wpa_cli reassociate > > ifconfig em0 down > > ifconfig em0 up > > sleep 1 > > dhclient lagg0 > > /etc/rc.d/moused restart > > > > logger -t $subsystem resumed at `date +'%Y%m%d %H:%M:%S'` > > sync && sync && sync > > > > exit 0 > > I think moused should be restarted on every machine that wakes up. > Maybe this should be added to rc.resume: > > /etc/rc.d/moused forcestatus > /dev/null 2>&1 && /etc/rc.d/moused forcerestart Perhaps behind a '#' like some other example solutions in rc.resume? If mouse uses a PS/2 interface (including many/most? builtin pads and pointers) then I found the advice given below works well, after having also used 'moused restart' in rc.resume for some years previously, on both an old Compaq Armada and on my Thinkpad T23. cheers, Ian ======= Date: Mon, 27 Sep 2010 16:21:15 -0400 From: Jung-uk Kim To: freebsd-stable@FreeBSD.org Subject: Re: resume slow on Thinkpad T42 FreeBSD 8-STABLE [..] If the mouse is connected to PS/2 port, the following device flags may help. psm(4): bit 13 HOOKRESUME The built-in PS/2 pointing device of some laptop computers is somehow not operable immediately after the system `resumes' from the power saving mode, though it will eventually become available. There are reports that stimulating the device by performing I/O will help waking up the device quickly. This flag will enable a piece of code in the psm driver to hook the `resume' event and exercise some harmless I/O operations on the device. bit 14 INITAFTERSUSPEND This flag adds more drastic action for the above problem. It will cause the psm driver to reset and re-initialize the pointing device after the `resume' event. It has no effect unless the HOOKRESUME flag is set as well. I always use hint.psm.0.flags="0x6000" in /boot/loader.conf, i.e., turn on both HOOKRESUME and INITAFTERSUSPEND, to work around similar problem on different laptop. =======