Linux USB Troubleshooting – Why is USB Not Working in Linux When It Works in UEFI/BIOS?

bioslinuxtroubleshootinguefiusb

For background I have just built a new machine with modern hardware including:

  • AMD FX-8350
  • Gigabyte GA-990FXA-UD3 motherboard
  • 16GB RAM
  • NVidia GTX 650 Ti
  • Kingston SSD

Given that, I tried to install various versions of Linux on the SSD and was met with failure almost every time. I tried installing Arch, Debian stable, Debian sid, and Ubuntu 12.10 from a USB thumb drive but while the BIOS saw the USB drive and started to boot from it, as soon as the OS attempted to enumerate the USB devices I lost all USB functionality (including the boot device).

Eventually I burned a DVD and installed Ubuntu 12.10 onto the SSD. It should be noted that my USB keyboard (and mouse) work fine while in the American Megatrends UEFI/BIOS. Even when I'm in the pre-installation menus on the Live Ubuntu DVD the keyboard works fine.

As soon as Linux is booted (either Live DVD or from the SSD) I lose all USB functionality and can only navigate the OS using a PS/2 keyboard.

What I see in the dmesg/syslog is a few lines about "failed to load microcode amd_ucode/microcode_amd_fam15h.bin" and I can see USB devices failing to initialize.

If I do an lsusb I can see all the USB host controllers but none of the devices. Doing an lspci shows me all the hardware I'd expect. And doing an lsmod I do not see any usb modules loaded (usb_ehci for example).

I tried passing noapic to the kernel boot string and it had no effect on this problem.

The motherboard supports USB 3.0 but all the devices I have plugged into normal USB 2.0 ports.

I'm rather baffled at what could be killing/preventing USB (and my on-board network card) from working in Linux. There doesn't seem to be any problem with any of these devices working in BIOS and I do not have a Windows installation available to test and see if it works.

I've already RMA'd the motherboard once but the second one has exactly the same behavior so I think I can safely rule out hardware failure (since the behavior is identical, I don't think the odd of me getting two identically defective boards are greater than the odds of this being a Linux problem).

What else can I try to get USB (and ideally my network, but we'll stick to USB for now) working?

Edit #1:

Since I have no networking I can only relate interesting bits from dmesg here.

Of interest in dmesg I can see I have 11 USB host controllers (OHCI, EHCI, and xHCI). It detects my USB devices and then fails immediately as follows:

usb 3-1: new high-speed USB device number 2 using ehci_hcd
usb 3-1: device descriptor read/64, error -32

That repeats several times incrementing the number and trying other USB Host controllers until it falls back to OHCI controllers which also fail but have an additional message:

usb 8-1: device not accepting address 4, error -32

I think my networking problems have to do with the fact that I don't have IPv6 enabled on my router and that seems to be a problem

eth1: no IPv6 routers present

Edit #2:

lspci -vvv shows that my network adapters (both onboard and expansion) are Realtek Semiconductor (no surprise); RTL8111/8168B and RTL8169/8110 respectively. My USB controllers are Etron Technology EJ168 (xHCI) and AMD nee ATI SB7x0/SB8x0/SB9x0 (EHCI & OHCI)

Now running Debian wheezy modprobe shows usb_common, usbcore, xhci_hcd, ehci_hcd, and ohci_hcd all loaded and functioning.

Best Answer

I found the answer from this thread (http://ubuntuforums.org/showthread.php?t=2114055) over at ubuntuforums.org.

It seems with newer Gigabyte mainboards (at least) there is a BIOS option called IOMMU Controller that is disabled by default and gives no clue or indication as to what it is for.

Enabling this setting and rebooting "magically" restores all my USB and networking problems in a 64-bit Linux OS (doesn't matter which one).

I am rather shocked and elated that it was such a long search for such a simple fix.

Thanks everyone for your help and suggestions. Hopefully others will find this helpful.

Update: I'd just like to add that my current BIOS settings also include enabling XHCI Handoff and EHCI Handoff in addition to IOMMU Controller. Others have mentioned this as well and enabling those two handoffs also allows my USB 3.0 ports to function as expected.

Related Question