Should prevent hibernation with mounted usb devices

Bug #359836 reported by Nikolaus Rath
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Invalid
Undecided
Unassigned
pm-utils (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: pm-utils

Currently it is possible to hibernate/suspend and thaw/resume the system with usb devices mounted. Unfortunately these mounts do not survive this cycle. I have observed that
 - The device is still reported as mounted, but the mountpoint is empty
 - The mountpoint is totally inaccessible, the kernel complains about read errors
 - the filesystem on the device is messed up (probably because some writes were still pending in the cache).

Hence pm-utils should:

0. Run a sync before suspending/hiberating so that at least the filesystem does not get corrupted

1. Try to umount all usb devices before going to suspend or hibernate.

2. Abort hibernation/suspend if not all devices can be unmounted.

Similar problems might arise with other removable devices and network mounts.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

#0 is done.
#1 (and consequently #2) is not done.

Changed in pm-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

I just tried out:
plug in usb device which gets mounted --> suspend and then remove media. After wake up usb device isn't shown any more!

So isn't it fixed yet?

Revision history for this message
Nikolaus Rath (nikratio) wrote :

chdir into the mountpoint before hibernating.

Revision history for this message
ShawnJGoff (shawnjgoff) wrote :

Does this happen when you have the directory open in Nautilus or just if you are in the directory on the console?

Revision history for this message
Nikolaus Rath (nikratio) wrote :

It happens whenever there is a process running which has opened files or directories from the mountpoint, i.e. whenever umount <mntpnt> fails.

Revision history for this message
Martin Albisetti (beuno) wrote :

Thank you for bringing this bug to our attention. Unfortunately a paper cut should be a small usability issue that affects many people and is quick and easy to fix. I'm afraid this bug can't be addressed as part of this project.
A paper cut is a minor usability annoyance that an average user would encounter on his/her first day of using a new installation of Ubuntu 9.10.

Changed in hundredpapercuts:
status: New → Invalid
Revision history for this message
Henrique Ferreiro (henrique-ferreiro) wrote :

For me, it works as expected on Ubuntu 10.04. In fact, if the computer suspends or hibernates while copying some files, after resume, the copy finishes as if it had never gone to sleep.

I am closing this bug unless you are able to reproduce it on an up-to-date system.

Changed in pm-utils (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.