Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jan 2012 21:03:11 +0100
From:      David Demelier <demelier.david@gmail.com>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: Suspend to ram almost work on desktop computer
Message-ID:  <4F0DEAFF.1080601@gmail.com>
In-Reply-To: <201201112025.38901.hselasky@c2i.net>
References:  <4F0C64E3.8020500@gmail.com> <201201111912.28632.hselasky@c2i.net> <4F0DDBC3.9030704@gmail.com> <201201112025.38901.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/01/2012 20:25, Hans Petter Selasky wrote:
> 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:<BTC>     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:<vendor 0x0a12>     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:<vendor 0x0a12>     at
>>>>>>>> usbus1 Jan 10 17:09:14 Groseille kernel: ubt0:<vendor 0x0a12
>>>>>>>> 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

Before, I can't do after because my keyboard is USB and after resume no 
device can be used.

-- 
David Demelier



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F0DEAFF.1080601>