potential pitfall? changing configuration while PC in hibernate (fwd)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
It is real stupid, that Linux kernel freezes when simply during hibernate I change Bluetooth dongle to USB mouse in my USB port.
And it is not uncommon problem - I have BT dongle that starts in HID proxy mode and then I switch it to HCI mode. So I hibernate with BT dongle and after hibernate Linux only reads image from Swap and then freezes! :( Problem is, that It delete image from swap imeditially after reading it, so when I tried is simply with USB mouse (hibernate without it and plug it when notebook was switched off) it doesn't read it from swap ever and I lost all my memory :(
I can do nothing with this behavior of my dongle and there is no known way how to switch it back to HID-proxy mode before hibernate (Marcel correct me if I am wrong) - CSR based dongle D-Link with Apple firmware.
Windows knows it and doesn't have problem with it for 5 years! :)
Laptop is all Intel based, kernel 2.6.11.5-vanilla, gcc 3.4.3, Debian testing
Michal
Quoted 33 lines
----- Forwarded message from David Brownell <[email protected]> -----
X-Original-To: [email protected]
To: [email protected]
Subject: Re: [linux-pm] potential pitfall? changing configuration while PC in hibernate Cc: Pavel Machek <[email protected]>, Arioch <[email protected]>
X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on
atrey.karlin.mff.cuni.cz
X-Spam-Level: *
X-Spam-Status: No, score=1.8 required=5.0 tests=DNS_FROM_RFC_ABUSE,
DNS_FROM_RFC_POSTautolearn=no version=3.0.2
X-CRM114-Status: Good ( pR: 18.5243 )Quoted 6 lines · Pavel Machek
Quoted 2 lines · Arioch
I wonder, if hardware configuration asked for changes when resuming from hibernate ?
Current position is "don't do this". You *will* be able to recover by passing noresume, but if you change hw configuration, it may crash&burn.
That may be Pavel's position, but USB-wise we absolutely consider it a bug if Linux misbehaves in the face of routine actions like unplugging a device during suspend (or plugging in a new one). Regardless of "noresume" etc.
I'd say that's true for all hotpluggable busses, in fact, but I rarely submit patches for non-USB ones like PCMCIA or CardBus.
- Dave
----- End forwarded message -----
Signature · 3 lines
S pozdravem Michal Semler
Quoted 12 lines · Michal Semler
It is real stupid, that Linux kernel freezes when simply during hibernate I change Bluetooth dongle to USB mouse in my USB port.
And it is not uncommon problem - I have BT dongle that starts in HID proxy mode and then I switch it to HCI mode. So I hibernate with BT dongle and after hibernate Linux only reads image from Swap and then freezes! :( Problem is, that It delete image from swap imeditially after reading it, so when I tried is simply with USB mouse (hibernate without it and plug it when notebook was switched off) it doesn't read it from swap ever and I lost all my memory :(
Quoted 7 lines
I can do nothing with this behavior of my dongle and there is no known way how to switch it back to HID-proxy mode before hibernate (Marcel correct me if I am wrong) - CSR based dongle D-Link with Apple firmware.
Windows knows it and doesn't have problem with it for 5 years! :)
Laptop is all Intel based, kernel 2.6.11.5-vanilla, gcc 3.4.3, Debian testing
Can you please retest 2.6.12-rc5, see if this bug is still there?
Thanks.
Quoted 4 lines · Andrew Morton
Quoted 3 lines · Michal Semler
It is real stupid, that Linux kernel freezes when simply during hibernate I change Bluetooth dongle to USB mouse in my USB port.
That is, you unplug the dongle -- breaking the USB power session -- and then plug in a mouse? And the kernel does something other than disconnecting the dongle, and then enumerate a new mouse? That'd be a bug. Somewhere. It'd probably help a lot if the bluetooth USB driver had a suspend() method.
It's not clear to me what you mean by "hibernate". If that's an "everything powered off" pseudo-suspend state, then the dongle should always be getting disconnected, and USB always re-enumerated by Linux. Only "real suspend" states, like suspend-to-RAM, can normally maintain USB power sessions. And even then, the device drivers need to be prepared to maintain them ... and do things like stop active I/O requests, and resume them later.
You said this was an all-Intel system. So which host controller driver is in use here ... UHCI? EHCI? With RC5 and CONFIG_USB_DEBUG, what do the USB debug messages say is happening? Does CONFIG_USB_SUSPEND change things? Try this with purely modular USB for now.
- Dave