Why is USB not working in Linux when it works in UEFI/BIOS?

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.

I just learned, with my GA-990FXA-UD7, that for both the USB 2.0 and USB 3.0 controllers and the onboard Ethernet controller to function properly in Linux (I'm using Mint 17.1) it required the following settings in the BIOS:

  • xHCI handoff - Enabled
  • EHCI handoff - Enabled
  • IOMMU controller - Enabled

Don't forget to disable UEFI and change all boot options to "Legacy Only".

If you really need to boot from a HDD of >2.2TB capacity, you might have a different problem on your hands.

I'm using a 256GB SSD for my boot drive and a pair of 3TB HDDs in a RAID 1 (mirrored) array using mdadm for my /home and all is working well.

Having worked with Gigabyte boards quite a lot, I know the 990FXA-UD5 and 990FXA-UD3 boards have very similar BIOS, so it is likely the same will apply with those boards as well.

FYI, the technical reasons why Linux can't use devices "through" the BIOS: once the OS has transitioned to "protected mode" (32-bit) or "long mode" (64-bit), it can no longer send interrupts to the BIOS. In "real mode" (16-bit, at boot) it can call BIOS interrupts to have disks read, keyboard input, etc.

But it's also got downsides. For one, you don't even have a megabyte of addressable memory. So modern OS's switch out of real mode nearly first thing. (Actually, I believe grub switches to protected mode before it even loads the kernel).

More details: http://wiki.osdev.org/Real_Mode http://wiki.osdev.org/Protected_Mode