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.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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.
Method 2
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.
Method 3
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
Method 4
Oddly enough, even though I have an almost identical setup (same motherboard, FX8350 processor), enabling the IOMMU didn’t make any difference for me. Still no USB, networking, etc.
What did help, though, was adding “iommu=soft” to the kernel command line. Now it all works fine (except that, for some strange reason, my Logitech Zone Touch Mouse doesn’t work).
Method 5
These steps worked for me with a GIGABYTE 970A-DS3P and AMD-FX-8320 running Ubuntu 15.04
- xHCI handoff – Enabled
- EHCI handoff – Enabled
- IOMMU controller – Enabled
- UEFI – Disabled
- All boot options – Legacy Only
Method 6
I’ve got the same proc (but 8-cores)
the same MB (rev 3)
the same amount of RAM (Kingston)
The tip with IOMMU helped a little – all ports can see a usb keyboard, a monitor usb-hub, and a usb (Realtek) wifi adapter, but no flash drive.
It seems, that this solution helped me:
cd /sys/bus/pci/drivers/ehci_hcd ls
You will see a file with 0000:00:xx.x format. Execute the following command:
sudo sh -c 'echo -n "0000:00:xx.x" > unbind'
Replace the xx.x with the numbers displayed on your file. It should disable the ehci_hcd.
You can now use the following script to disable ehci_hcd.
cd /sys/bus/pci/drivers/ehci_hcd/ sudo sh -c 'find ./ -name "0000:00:*" -print| sed "s/.///">unbind'
http://www.geekdevs.com/2010/04/solved-unable-to-enumerate-usb-device-disabling-ehci_hcd/
Method 7
I have the same FX8350 running on a Gigabyte 990FXA-UD3 using OpenSuse 13.1. The solution that worked for me was to edit the bootloader using YAST, the default selection (or the selection you are using to load OpenSuse 13.1 in my case), “iommu=pt” after “quiet showopts”.
For example:
“resume=/dev/disk/by-id/ata-Hitachi_HDS721010CLA332_JP2921HQ1076NA-part2 splash=silent quiet showopts iommu=pt”
Now all my USB ports 2.0 and 3.0 are working and my internet networking is working too!. Also make sure IOMMU is enabled in BIOS.
Method 8
Yesterday I got this problem while installing Ubuntu on my ASUSTek M5A99X motherboard. My objective was to re-install Ubuntu from USB stick in UEFI mode, to fix IOMMU detection by OS (my system was installed via “Legacy BIOS” mode, i thought this could be a reason).
Previously, I tried that by installing Ubuntu from USB stick. Fine with Legacy, UEFI always was a problem – either my keyboard/mouse/Wifi was not functioning properly (power only) when entering installer, or installer was failing to load UI with messages in console:
(…) device descriptor read/64, error -32(for each USB device)(…) unable to find a live medium containing a live file system(after 5-6 minutes of reading from stick). This error has a workaround with changing USB stick type to “Force Hard Disk”, but booting system caused other issues later after install.
I was thinking the issues are from “Unetbootin” or “Startup Disk Creator” – they’re not. Spent more than 2 hours on trying all the settings in BIOS (i don’t have IOMMU Controller or xHCI Handoff settings in mine), but the only thing helped – upgrading BIOS to newest version with ROM file downloaded from Asus website for my motherboard model. It’s easy as unzipping and copying the ROM file on the USB stick and using “EZ Flash utility” (in BIOS) to flash firmware.
Doing this fixed all kind of errors I had; I was able to install and use Ubuntu in UEFI mode. More, IOMMU is now detected by Ubuntu magically with no trouble. This means, my problems were caused by BIOS firmware bugs related to the USB 2.0/3.0 support, and IOMMU support. (if you don’t need IOMMU you should disable this in “Advanced” section cuz it’s not a common thing).
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0