System freeze when going to suspend while an SD-Card is mounted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pm-utils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
If an SD-Card is mounted suspend (to RAM or to Disk) causes a System-Crash on Ubuntu 10.04 LTS.
This problem will be found in older Versions of Ubuntu too. People who are Using Netbooks with an SSD are facing it mostly, because they use SD-cards to store user-data.
I added the following Script to handle the Problem:
---
#!/bin/sh
# File: /etc/pm/
# This script fixes issius with sleep or suspend when a SD-card is mounted.
case "${1}" in
hibernate|suspend)
/bin/sync
# Find all SD/MMC-Devices
for drive in $( /bin/ls /dev/mmcblk?p* ); do
# Unmount each device
/bin/umount ${drive} > /dev/null
# If failed: abort suspend
if [ $? -ne 0 ]; then
# If the device really keeps mounted
/bin/mount | /bin/grep ${drive}
if [ $? -eq 0 ]; then
exit 1;
fi
fi
done
;;
resume|thaw)
# Mount all devices mentiond in /etc/fstab
mount -a > /dev/null
done
;;
esac
---
affects: | ubuntu → pm-utils (Ubuntu) |
While this may still be an issue on lucid, I think it doesn't exist in newer releases (at least, I haven't seen it!) I'm adding a Lucid task and closing out the development task.