From owner-freebsd-acpi@FreeBSD.ORG Sun Nov 13 20:10:25 2011 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03D2C106566B; Sun, 13 Nov 2011 20:10:25 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id A5EB48FC14; Sun, 13 Nov 2011 20:10:24 +0000 (UTC) Received: by ywe9 with SMTP id 9so2687024ywe.13 for ; Sun, 13 Nov 2011 12:10:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=CGnGL2xXJmRmvRvFxwpSkCQ/Kn9v6E7s+4t/Q1F+UTM=; b=LejLfeWatbyvx8TmXvBY8oxzWRHVMn6RYnRlOos/heDu9vHFKvrj7zW8IRTwzP2+VS iBliy25ESn2ER4uT2nbmfu97ESxNSMkfhZL+ASqpC1ktVz8rzAn+MPM2YdNgEe7PhH9F 6/wLfjMOqt0J2cSaRQtwcQd70aV917cnK1Dvg= MIME-Version: 1.0 Received: by 10.182.12.66 with SMTP id w2mr1256326obb.7.1321213362402; Sun, 13 Nov 2011 11:42:42 -0800 (PST) Received: by 10.182.7.34 with HTTP; Sun, 13 Nov 2011 11:42:42 -0800 (PST) In-Reply-To: <20111113.132924.396.1@DOMY-PC> References: <20111110.182948.630.1@DOMY-PC> <20111112002727.GD17792@michelle.cdnetworks.com> <20111112.144149.725.1@DOMY-PC> <20111113094810.GC80782@e-new.0x20.net> <20111113.132924.396.1@DOMY-PC> Date: Sun, 13 Nov 2011 11:42:42 -0800 Message-ID: From: Garrett Cooper To: rank1seeker@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: pyunyh@gmail.com, freebsd-acpi@freebsd.org, hackers@freebsd.org Subject: Re: Adventure into S3 state and back X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2011 20:10:25 -0000 On Sun, Nov 13, 2011 at 5:29 AM, wrote: > ----- Original Message ----- > From: Lars Engels > To: rank1seeker@gmail.com > Cc: pyunyh@gmail.com, hackers@freebsd.org, freebsd-acpi@freebsd.org > Date: Sun, 13 Nov 2011 10:48:10 +0100 > Subject: Re: Adventure into S3 state and back > >> On Sat, Nov 12, 2011 at 03:41:49PM +0100, rank1seeker@gmail.com wrote: >> > ----- Original Message ----- >> > From: YongHyeon PYUN >> > To: rank1seeker@gmail.com >> > Cc: hackers@freebsd.org, freebsd-acpi@freebsd.org >> > Date: Fri, 11 Nov 2011 16:27:27 -0800 >> > Subject: Re: Adventure into S3 state and back >> > >> > > On Thu, Nov 10, 2011 at 07:29:48PM +0100, rank1seeker@gmail.com wrot= e: >> > > > 8.2-p4 RELEASE amd64 >> > > > >> > > > I've built a custom kernel, only with drivers, that I need >> > > > After resuming from S3 ... >> > > > >> > > > I hit: >> > > > # ifconfig >> > > > and all hells breaks loose: >> > > > ---- >> > > > bge0: PHY read timed out (phy 1, reg 5, val 0xffffffff) >> > > > bge0: PHY read timed out (phy 1, reg 10, val 0xffffffff) >> > > > bge0: PHY read timed out (phy 1, reg 25, val 0xffffffff) >> > > > =A0 =A0 =A0 =A0 media: Ethernet autoselect >> > > > =A0 =A0 =A0 =A0 status: no carrier >> > > > bge0: PHY read timed out (phy 1, reg 1, val 0xffffffff) >> > > > bge0: PHY read timed out (phy 1, reg 1, val 0xffffffff) >> > > > bge0: PHY read timed out (phy 1, reg 0, val 0xffffffff) >> > > > ugen3.2: at usbus3 (disconnected) >> > > > ukbd0: at uhub3, port 1, addr 2 (disconnected) >> > > > ums0: at uhub3, port 1, addr 2 (disconnected) >> > > > uhid0: at uhub3, port 1, addr 2 (disconnected) >> > > > bge0: PHY read timed out (phy 1, reg 4, val 0xffffffff) >> > > > ugen3.2: at usbus3 >> > > > ukbd0: > on >> > usbus3 >> > > > kbd2 at ukbd0 >> > > > ums0: o= n >> > usbus3 >> > > > ums0: 16 buttons and [XYZT] coordinates ID=3D2 >> > > > uhid0: > on >> > usbus3 >> > > > bge0: PHY read timed out (phy 1, reg 5, val 0xffffffff) >> > > > bge0: PHY read timed out (phy 1, reg 10, val 0xffffffff) >> > > > bge0: PHY read timed out (phy 1, reg 25, val 0xffffffff) >> > > > pflog0: flags=3D141 metric 0 mtu 33152 >> > > > lo0: flags=3D8049 metric 0 mtu 1638= 4 >> > > > =A0 =A0 =A0 =A0 options=3D3 >> > > > =A0 =A0 =A0 =A0 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 >> > > > =A0 =A0 =A0 =A0 inet6 ::1 prefixlen 128 >> > > > =A0 =A0 =A0 =A0 inet 127.0.0.1 netmask 0xff000000 >> > > > =A0 =A0 =A0 =A0 nd6 options=3D3 >> > > > cruiser# ifconfig >> > > > bge0: flags=3D8802 metric 0 mtu 1500 >> > > > >> > > options=3D8009b >> > > > =A0 =A0 =A0 =A0 ether 00:21:70:70:01:df >> > > > bge0: PHY read timed out (phy 1, reg 1, val 0xffffffff) >> > > > bge0: PHY read timed out (phy 1, reg 1, val 0xffffffff) >> > > > >> > > > ... ... ... >> > > >> > > Known issue. kern/136876. >> > > Mobile bge(4) controllers seem to have this issue. >> > >> > I can see this has been reported, when 8.0-BETA1 was released. >> > Now is almost 8.3 out and problem is still present >> > >> > > > ---- >> > > > >> > > > So, taking into account: >> > > > "A common problem with suspend/resume is that many device drivers > do >> > not save, restore, or reinitialize their firmware, registers, or devic= e >> > memory properly." >> > > > >> > > > Next step was to get rid of 'bge' device from my KERNCONF and > recompile >> > it. >> > > > Voila! S3 works! >> > > > >> > > > But another, mouse problem, didn't go away! >> > > > In 9 out of 10 cases, mouse doesn't resume. >> > > > As it is USB mouse, I've did: >> > > > >> > > > # camcontrol rescan all >> > > > =A0 =A0 didn't help >> > > > >> > > > I've also tried adding into loader.conf and nada: >> > > > --- >> > > > hint.psm.0.flags=3D"0x3000" >> > > > --- >> > > > But i think it is PS/2 related >> > > > >> > > > What works 100% for a mouse is to unplug and then plug back it's > USB >> > receiver >> > > > >> > > > This is Dell D830 laptop >> > > > >> > >> > How do I solve mouse issue? >> > It is annoying to unplug and then plug back it's USB receiver, each > time. >> >> stop moused in rc.suspend and start it in rc.resume. >> > > Thanks, but it isn't that. > Even with it, mouse works on random, after resume from S3. > > But what I did figured out, looking kernel msgs on console, just after > resume, is that IF I see >1 of this: > -- > uhub_reattach_port: port 1 reset failed, error=3DUSB_ERR_TIMEOUT > uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling port 1 > -- > > Mouse won't work unless I unplug/plug it's USB receiver You may need to kldunload and kldload ums(4) in order to get things to work (which suggests a driver bug in the newbus suspend and resume functions). FWIW I only need to do /etc/rc.d/moused restart in rc.resume to get things to work, but I'm using psm(4). The mouse pointer is kind of braindead for a second, but then it comes to life and does the right thing. So, bottom line is that there's something that gets out of sync with some mice drivers and moused, and mice driver bugs or bugs with moused might be involved. HTH, -Garrett