How can I tell linux to ignore one USB port?
July 10, 2012 12:15 PM   Subscribe

How can I tell Linux to ignore a bad USB port?

I've googled around a fair amount, but I only find people ASKING this question - so far no answers.

The system in question is Ubuntu 12.04 - this is the output of uname -a
Linux stampy2 3.2.0-26-generic-pae #41-Ubuntu SMP Thu Jun 14 16:45:14 UTC 2012 i686 i686 i386 GNU/Linux
One of the USB ports on my motherboard appears to have gone bad a few months ago. It doesn't work, and syslog is flooded with:
kernel: [483594.300230] hub 2-1:1.0: unable to enumerate USB device on port 6
This motherboard has approximately 70 hojillion usb ports, so I REALLY don't care if that one doesn't work. But I also don't want to disable USB entirely. Is there any way to tell the kernel this so it stops trying multiple times a second?

Failing that, just suppressing the log message would be nice - it's making my syslog completely useless to me.
posted by flaterik to Computers & Internet (6 answers total) 1 user marked this as a favorite
Stack Overflow might help: Controlling a USB power supply (on/off) with linux

Replace usb1 with your USB port ID.
posted by Blazecock Pileon at 12:18 PM on July 10, 2012

You could put this in an init script, if it works for you. Then it is shutdown on every boot-up.
posted by Blazecock Pileon at 12:19 PM on July 10, 2012

Response by poster: i've tried a couple of variations of that tip, and I'm never able to write to level. (the wakeup part works ok)
root@stampy2:/sys/bus/usb/devices/usb2/power# echo suspend > /sys/bus/usb/devices/usb2/power/level
bash: echo: write error: Invalid argument

posted by flaterik at 12:25 PM on July 10, 2012

Best answer: The program in this mailing list post apparently attempts to power down and also remove the port from the kernel.
posted by zsazsa at 12:35 PM on July 10, 2012

You might also take a look at the Ubuntu mailing lists, as well as Superuser.
posted by Blazecock Pileon at 12:40 PM on July 10, 2012

Response by poster: Aha! zsazsa, that does it.
./hubpower 2:2 power 6 off
Makes the log message stop.

Also of interest to me is the fact that the status for that hub says "Port 6 status: 0101 Power-On Connected". I'm wondering if there's just some physical gunk stuck in there. I should try cleaning it out again (that was my first instinct, but I don't know how good of a job I did)

Thank you!
posted by flaterik at 1:07 PM on July 10, 2012

« Older Work appropriate bicycle commuter fashion?   |   Lids for bail-top jars? Newer »
This thread is closed to new comments.