From owner-freebsd-acpi@FreeBSD.ORG Wed Jan 11 19:27:56 2012 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 C654B106566C for ; Wed, 11 Jan 2012 19:27:56 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.c2i.net [212.247.154.162]) by mx1.freebsd.org (Postfix) with ESMTP id 3602B8FC17 for ; Wed, 11 Jan 2012 19:27:55 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 225681792; Wed, 11 Jan 2012 20:27:53 +0100 From: Hans Petter Selasky To: David Demelier Date: Wed, 11 Jan 2012 20:25:38 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <4F0C64E3.8020500@gmail.com> <201201111912.28632.hselasky@c2i.net> <4F0DDBC3.9030704@gmail.com> In-Reply-To: <4F0DDBC3.9030704@gmail.com> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201201112025.38901.hselasky@c2i.net> Cc: freebsd-acpi@freebsd.org Subject: Re: Suspend to ram almost work on desktop computer 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: Wed, 11 Jan 2012 19:27:56 -0000 On Wednesday 11 January 2012 19:58:11 David Demelier wrote: > On 11/01/2012 19:12, Hans Petter Selasky wrote: > > On Tuesday 10 January 2012 22:20:48 David Demelier wrote: > >> On 10/01/2012 22:08, Hans Petter Selasky wrote: > >>> On Tuesday 10 January 2012 19:55:57 David Demelier wrote: > >>>> On 10/01/2012 20:06, Bernhard Schmidt wrote: > >>>>> On Tuesday 10 January 2012 17:18:43 David Demelier wrote: > >>>>>> Hello, > >>>>>> > >>>>>> I have a desktop computer on a Intel DH55HC mainboard. Suspend to > >>>>>> ram almost works on 9.0-RELEASE. > >>>>>> > >>>>>> The resume works, I can get back to X and it works, started > >>>>>> applications still run but all my USB stuff is dead. I can't use my > >>>>>> mouse neither my keyboard so I can't do anything. > >>>>>> > >>>>>> This is the last messages : > >>>>>> > >>>>>> Jan 10 17:08:45 Groseille acpi: suspend at 20120110 17:08:45 > >>>>>> Jan 10 17:08:49 Groseille kernel: ugen0.2: at usbus0 > >>>>>> (disconnected) Jan 10 17:08:49 Groseille kernel: ukbd0: at uhub0, > >>>>>> port 1, addr 2 (disconnected) > >>>>>> Jan 10 17:08:49 Groseille kernel: uhid0: at uhub0, port 1, addr 2 > >>>>>> (disconnected) > >>>>>> Jan 10 17:09:14 Groseille kernel: pcm1: chn_write(): > >>>>>> pcm1:virtual:dsp1.vp0: play interrupt timeout, channel dead > >>>>>> Jan 10 17:09:14 Groseille kernel: ugen1.2: at > >>>>>> usbus1 (disconnected) > >>>>>> Jan 10 17:09:14 Groseille kernel: ubt0: at uhub1, port 2, addr 2 > >>>>>> (disconnected) > >>>>>> Jan 10 17:09:14 Groseille kernel: ugen1.2: at > >>>>>> usbus1 Jan 10 17:09:14 Groseille kernel: ubt0: >>>>>> EDRClassone, class 224/1, rev 2.00/19.58, addr 2> on usbus1 > >>>>>> Jan 10 17:09:15 Groseille acpi: resumed at 20120110 17:09:15 > >>>>> > >>>>> Applying the diff of > >>>>> http://docs.freebsd.org/cgi/getmsg.cgi?fetch=199056+0+archive/2012/sv > >>>>> n- s rc-head/20120108.svn-src-head should fix that I guess. > >>>> > >>>> Someone gave me that diff on IRC, I updated all the kernel to -STABLE > >>>> and verified that this diff were present, it is. Unfortunately it > >>>> didn't fixed :(. > >>> > >>> Are you running 9-stable? > >>> > >>> --HPS > >> > >> FreeBSD Groseille.malikania.fr 9.0-STABLE FreeBSD 9.0-STABLE #0: Tue Jan > >> 10 17:50:05 CET 2012 > >> root@Groseille.malikania.fr:/usr/obj/usr/src/sys/Groseille amd64 > >> > >> markand@Groseille ~ $ head -n 490 > >> /usr/src/sys/dev/usb/controller/usb_controller.c | tail -n 59 > >> > >> /*---------------------------------------------------------------------- > >> --* > >> > >> * usb_bus_resume > >> * > >> * This function is used to resume the USB contoller. > >> > >> *----------------------------------------------------------------------- > >> -*/ static void > >> usb_bus_resume(struct usb_proc_msg *pm) > >> { > >> > >> struct usb_bus *bus; > >> struct usb_device *udev; > >> usb_error_t err; > >> > >> bus = ((struct usb_bus_msg *)pm)->bus; > >> udev = bus->devices[USB_ROOT_HUB_ADDR]; > >> > >> if (udev == NULL || bus->bdev == NULL) > >> > >> return; > >> > >> USB_BUS_UNLOCK(bus); > >> > >> usbd_enum_lock(udev); > >> > >> #if 0 > >> > >> DEVMETHOD(usb_take_controller, NULL); /* dummy */ > >> > >> #endif > >> > >> USB_TAKE_CONTROLLER(device_get_parent(bus->bdev)); > >> > >> USB_BUS_LOCK(bus); > >> > >> bus->hw_power_state = > >> > >> USB_HW_POWER_CONTROL | > >> USB_HW_POWER_BULK | > >> USB_HW_POWER_INTERRUPT | > >> USB_HW_POWER_ISOC | > >> USB_HW_POWER_NON_ROOT_HUB; > >> > >> bus->no_explore = 0; > >> USB_BUS_UNLOCK(bus); > >> > >> if (bus->methods->set_hw_power_sleep != NULL) > >> > >> (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_RESUME); > >> > >> if (bus->methods->set_hw_power != NULL) > >> > >> (bus->methods->set_hw_power) (bus); > >> > >> /* restore USB configuration to index 0 */ > >> err = usbd_set_config_index(udev, 0); > >> if (err) > >> > >> device_printf(bus->bdev, "Could not configure root HUB\n"); > >> > >> /* probe and attach */ > >> err = usb_probe_and_attach(udev, USB_IFACE_INDEX_ANY); > >> if (err) { > >> > >> device_printf(bus->bdev, "Could not probe and " > >> > >> "attach root HUB\n"); > >> > >> } > >> > >> usbd_enum_unlock(udev); > >> > >> USB_BUS_LOCK(bus); > >> > >> } > > > > Hi, > > > >> So I guess yes :)) > > > > What does usbconfig say? > > > > Try to set the configuration to 255 or 0 on the Root-Hubs. > > What? Can you tell me more, I can't understand The usbconfig output you posted, is that before or after resume? --HPS