Public bug reported:

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/sleep.d/10_umount_sd
# 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
     Importance: Undecided
         Status: New


** Tags: power sd-card suspend

-- 
System freeze when going to suspend while an SD-Card is mounted
https://bugs.launchpad.net/bugs/680476
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to