Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My problem is that after installing Ubuntu 12.04 on my laptop, suspend did not work. Through this training, i solved the suspend problem. But after resume from suspend my USB ports become unavailable.

share|improve this question
Could u pls go through this post and find any useful info? askubuntu.com/questions/19356/how-to-diagnose-usb-issue –  beeju May 3 '12 at 6:58
Have the same problem on a Lenovo Thinkpad x201. Would prefer any solution that does not require me to re-compile the kernel every time there is an update! –  Pedro May 23 '12 at 7:54

2 Answers 2

I had a similar problem. And after a week of searching, I discovered what the problem was for me. In the Ubuntu kernel, the usb drivers are built-in. Therefore, upon suspend and resume, the drivers could not be unloaded and then reloaded as modules. So what I had to do was compile the linux kernel from source and made sure that the usb drivers(xhci_hcd, ehci_hcd) were made to be loadable modules.

From there, I created a file name 20_custom-ehci_hcd in /etc/pm/sleep.d/.

#inspired by http://art.ubuntuforums.org/showpost.php?p=9744970&postcount=19
#...and http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug
# tidied by tqzzaa :)
DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
unbindDev() {
echo -n > $DEV_LIST 2>/dev/null
for driver in $DRIVERS; do
for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; do
echo -n "$dev" > $DDIR/unbind
echo "$driver $dev" >> $DEV_LIST
bindDev() {
if [ -s $DEV_LIST ]; then
while read driver dev; do
while [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; do
echo -n "$dev" > $DDIR/bind
if [ ! -L "$DDIR/$dev" ]; then
sleep $BIND_WAIT
done fi
rm $DEV_LIST 2>/dev/null
case "$1" in
hibernate|suspend) unbindDev;;
resume|thaw) bindDev;;

I hope this works for you. I might have made another file somewhere, but I can't find it right now.

EDIT: I found that other file. In /etc/pm/config.d/, I created a file called modules.


SUSPEND_MODULES="xhci ehci_hcd xhci_hcd xhci-hcd ehci-hcd"
share|improve this answer

There is a simpler solution than rebuilding the kernel at http://ubuntuforums.org/showthread.php?t=1460790 I only needed the unbind/bind on my Asus N53SV

share|improve this answer
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  fossfreedom Jun 9 '12 at 18:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.