[linux-pm] Suspended devices and drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 6 Sep 2005, David Brownell wrote:

> > > > With the USB device, things are more interesting.  If you unplug the
> > > > device (even while it's not in use), Windows warns you not to do this
> > > > ...
> > > 
> > > So it's inconsistent in behavior, since this isn't how it handles
> > > the same thing during resume-from-hibernate ...
> >
> > ...
> > If you describe the behavior as "Windows warns you whenever it learns that
> > you ejected removable media without permission", then Windows _is_
> > consistent.
> 
> No, it's inconsistent ... when you ejected the media before that
> resume-from-snapshot, it could tell.  And it ignored it, even though
> you'd not told Windows you were going to do that.

It sounds like we've got a failure to communicate.  There were two 
experiments.  In the first, I simply unplugged the device.  Windows did 
detect this and did warn me.  In the second experiment, I first did the 
snapshot-and-poweroff, then removed the device, then replaced the device, 
then did resume-from-snapshot.  In that experiment Windows could _not_ 
tell and did not warn me.

In none of the experiments was there a case where Windows could have
realized that I unplugged the device and failed to warn me about it.


> > I say this is a case where we should try, at least to some extent; users 
> > will feel that "Powerdown-swsusp automatically removes all hot-pluggable 
> > devices" is too Draconian.
> 
> The simple solution is to use _real_ suspend states if you're going
> to expect real suspend/resume behavior ... :)

It will probably be easier to add the code needed to verify devices and 
media after restore-from-snapshot than it would be to educate users about 
the difference between suspend/resume vs. snapshot/restore!  :-)

> Note that for things like HID devices (mice etc), users rarely notice
> this since the HID driver masks enumeration through /dev/input/mice.

Yes, certainly.  Mostly I'm concerned about storage devices.  Although the 
same concerns affect other things too, like audio/video devices.

> Also, that we've been aiming at that "removes devices" as the default
> for drivers without suspend()/resume() support, because it's the ONLY
> choice that's both reliable (all drivers can handle it) and safe (since
> users and applications must already handle "live" unplug).

Yes.  Eventually it would be good to get suspend/resume support into all 
the drivers that could stand to benefit from it.

Alan Stern


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux