unbindDev() {
echo -n > $DEV_LIST 2>/dev/null
for driver in $DRIVERS; do
DDIR=$DRIVERS_DIR/${driver}_hcd
for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; do
echo -n "$dev" > $DDIR/unbind
echo "$driver $dev" >> $DEV_LIST
done
done
}
bindDev() {
if [ -s $DEV_LIST ]; then
while read driver dev; do
DDIR=$DRIVERS_DIR/${driver}_hcd
while [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; do
echo -n "$dev" > $DDIR/bind
if [ ! -L "$DDIR/$dev" ]; then
sleep $BIND_WAIT
else
break
fi MAX_BIND_ATTEMPTS=$((MAX_BIND_ATTEMPTS-1))
done
done < $DEV_LIST
fi
rm $DEV_LIST 2>/dev/null
}
case "$1" in
hibernate|suspend) unbindDev;;
resume|thaw) bindDev;;
esac
I had this issue on my Asus U24E. The firewire blacklist did not work.
The script that Liny posted, above, works. Including here as a mirror.
From: http:// thecodecentral. com/2011/ 01/18/fix- ubuntu- 10-10-suspendhi bernate- not-working- bug
Create and make executable: /etc/pm/ sleep.d/ 20_custom- ehci_hcd
#!/bin/sh art.ubuntuforum s.org/showpost. php?p=9744970& postcount= 19 thecodecentral. com/2011/ 01/18/fix- ubuntu- 10-10-suspendhi bernate- not-working- bug
#inspired by http://
#...and http://
# tidied by tqzzaa :)
VERSION=1.1 /tmp/usb- dev-list DIR=/sys/ bus/pci/ drivers
DEV_LIST=
DRIVERS_
DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
HEX="[[:xdigit:]]"
MAX_BIND_ATTEMPTS=2
BIND_WAIT=0.1
unbindDev() { $DRIVERS_ DIR/${driver} _hcd :$HEX+: $HEX"`; do
echo -n > $DEV_LIST 2>/dev/null
for driver in $DRIVERS; do
DDIR=
for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+
echo -n "$dev" > $DDIR/unbind
echo "$driver $dev" >> $DEV_LIST
done
done
}
bindDev() { $DRIVERS_ DIR/${driver} _hcd BIND_ATTEMPTS) ) -gt 0 ]; do
MAX_ BIND_ATTEMPTS= $((MAX_ BIND_ATTEMPTS- 1))
if [ -s $DEV_LIST ]; then
while read driver dev; do
DDIR=
while [ $((MAX_
echo -n "$dev" > $DDIR/bind
if [ ! -L "$DDIR/$dev" ]; then
sleep $BIND_WAIT
else
break
fi
done
done < $DEV_LIST
fi
rm $DEV_LIST 2>/dev/null
}
case "$1" in suspend) unbindDev;;
hibernate|
resume|thaw) bindDev;;
esac