Had the same problem in xubuntu 11.04.

Published patch corrects pm-utils behaviour. I use a pm hook to umount
SD cards on suspend, in order to avoid data corruption on resume (as
described on
https://bugs.launchpad.net/ubuntu/karmic/+source/linux/+bug/424877).

My hook looks like this:
#!/bin/sh
# Drop to: /etc/pm/sleep.d
# Use this script to prevent data loss on gnome-mounted MMC/SD
# cards. It syncs data and umounts all mmcblk devices prior to
# suspend, and cancels suspend if umounting was not posssible
# (i.e: something locks a file)
case "$1" in
        hibernate|suspend)
                sync
                for drive in $( ls /dev/mmcblk?p* ); do
                    umount ${drive} > /dev/null
                    # If umount failed: abort suspend
                    if [ $? -gt 0 ]; then
                        # Test if device keeps mounted. Previous command could 
fail
                        # (i.e device was not mounted) with a non-stopper
                        # problem for the suspend precess
                        mount | grep ${drive}
                        if [ $? -eq 0 ]; then
                            echo "Failed to umount ${drive}" > /tmp/suspend.log
                            exit 1
                        fi
                    fi
                done
                ;;
esac

My hook doesn't work without published patch, and without this hook data
corruption  is possible... so, I vote for high importance on this bug.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/665651

Title:
  pm-utils does not follow requests to inhibit suspend/hibernate from
  scripts in /etc/pm/sleep.d

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/665651/+subscriptions

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

Reply via email to