Enabling both USB 3 and USB 2 ports for the ‘Gigabyte’ GA-970A-DS3P motherboard

The short version: With default BIOS settings (which enable USB 3 ports) for the Gigabyte GA-970A-DS3P motherboard, the USB 2 ports do not work (at least in Linux), only the two external USB 3 ports. In Linux, the GRUB configuration parameter “GRUB_CMDLINE_LINUX” must contain “iommu=soft” to get the USB 2 ports and USB 3 ports to work at the same time.

This is essentially the seminal 2013 blog post “GA-970A-DS3P revision 1 no USB 3.0“, but this provides one data point that the solution with “iommu=soft” actually works (and is required) for a particular BIOS version and works (and is required) for a particular version of a particular Linux distribution of vintage 2020. And hopefully it has clearer instructions with some additional checks to be confident in the solution.

It also shows that even in 2022, with the mainstream Ubuntu 22.04, the Linux community has still not solved the problem. This is ridiculous.

(Note: The motherboard is not to be confused with GA-970A-D3P (without “S”) which, for instance, has screen display output connectors (for HDMI, etc.), but fewer USB ports)

Introduction

With default settings in the BIOS and in Linux, the USB 2 ports on the GA-970A-DS3P motherboard do not work out of the box. With a USB hub on one of the USB 3 ports, the system nominally works fine, but there are six direct USB ports that can not be used (e.g., for keyboards and mice). For instance, this prevents using the workaround of using a USB 2 port instead of a USB 3 port for making macro keys on a QMK keyboard function properly.

It has nothing to do with the BIOS version

The motherboard used to test this on already had the latest version (FD, released 2016-05-02).

It has nothing to do with hardware

E.g., broken hardware. Some Internet searches will return such suggestions. Changing the BIOS setting “IOMMU” in menu “Peripherals” to “Enabled” will enable the USB 2 ports and they work just fine. Thus this problem has nothing to do with broken hardware.

Internet searches

It is not easy to come up with search terms that will not result in near 100% false positives, even using the very specific name of the motherboard (GA-970A-D3P). However, these search terms in combination turned out to be very effective:

IOMMU enable USB 2 ports

Linux version

Both distribution and kernel version.

Identifying the kernel version

In a terminal, on a Ubuntu/Debian derived system:

cat /proc/version_signature

Identifying the distribution, incl. version

In a terminal, on a Ubuntu/Debian derived system:

lsb_release -a

Results

These systems were found to exhibit the problem and the fix described here worked:

  • Ubuntu MATE 20.04 (Focal Fossa). Kernel version: 5.4.0-121.137-generic. Underlying distribution and version: Ubuntu 20.04.4 LTS. Released May 2020.
  • Ubuntu 22.04 (Jammy Jellyfish). Kernel version: 5.15.0-41-generic. Underlying distribution and version: Ubuntu 20.04.4 LTS. Released 2022-04-21.

These systems were found to work without needing the fix described here. In other words, Linux worked out of the box.

  • Fedora 36 KDE Plasma. Released 2022-05-02. It is not known if it is due to it being newer or quite different from Ubuntu or Debian.

The fix

This is essentially the mentioned blog post, but here are more direct instructions, e.g., to be confident that GRUB is actually used on a particular system.

The fix is to add “iommu=soft”, though an explanation is lacking. The closest I have found is this 2016 bug report that has some internal details: Enabling AMD IOMMU blocks function of Via VL805 USB 3.0 chipset

However, GRUB is sort of hidden in contemporary Linux distributions. Often, nothing is shown during startup. The screen is simply blank until the Linux GUI environment comes up.

Updating the GRUB configuration

Use this procedure to change any of the GRUB configuration settings mentioned below. In a terminal, do:

ls -ls /etc/default/grub
sudo vi /etc/default/grub
sudo update-grub

On Fedora, use this instead of “sudo update-grub”:

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

The first line is testing the existence of the GRUB configuration file. It should return something like:

4 -rw-r--r-- 1 root root 1228 Jul 13 18:51 /etc/default/grub

If not, the result is:

ls: cannot access '/etc/default/grub': No such file or directory

The second line is starting Vim. This assumes proficiency in using Vim (including quitting it…). If not, use another text editor. Note that, in order to make changes to the file, the editor must be run with administrative privileges.

The last step is crucial; otherwise the GRUB behaviour does not change at all…

Prerequisites for the fix

Optional: Change the BIOS configuration to show a full splash screen (this will display more keyboard shortcuts). Press ‘Del’ about once per second after the beep (it will not react until a few seconds after the beep and ‘Del’ should not be pressed too late). In menu “BIOS Features”, change “Full Screen LOGO Show” to “Enabled”. In menu “Save & Exit” (right most menu), choose “Save & Exit Setup” and “Yes”.

The first question is if GRUB used or not on a particular system. Using the procedure from the previous section (including “sudo update-grub”!), uncomment (by removing the leading “#”) the line with “GRUB_INIT_TUNE”, so that the line reads:

GRUB_INIT_TUNE="480 440 1"

Restart the computer. There should be two beeps: One is when the BIOS is ready shortly after power on. I observed it 8-9 seconds after power on. The second beep came about 7 seconds after the first beep (indicating entering the GRUB part of the startup process).

Optional: Enable the GRUB startup menu. This is to be more confident that GRUB is actually used (allegedly, as an alternative, the Shift key can be hold down while booting to make the menu show). Comment out (add a leading “#”) to the line with “GRUB_TIMEOUT_STYLE” in file “/etc/default/grub”, so the line reads:

#GRUB_TIMEOUT_STYLE=hidden

Optional: Shorten the time the GRUB startup menu is shown (it is usually set to 10 seconds). This can be done by commenting (add a leading “#”) the line with “GRUB_TIMEOUT” in file “/etc/default/grub” (this will use the default of 5 seconds) or change the “10” to a lower value. For the former, the line should read:

#GRUB_TIMEOUT=10

Optional: Change the GRUB menu entry that is chosen if the timeout period is reached. It is normally 0 for a simple setup, but for multi-boot systems it can be important. Sample changing it to the third GRUB menu item.

GRUB_DEFAULT=2

The actual fix

To the string for “GRUB_CMDLINE_LINUX_DEFAULT” in file “/etc/default/grub”, add “iommu=soft”. The line should read something like:

GRUB_CMDLINE_LINUX_DEFAULT="splash iommu=soft"

BIOS setting for enabling USB 2 ports

It is possible to enable the USB 2 ports by a BIOS setting alone, but then the USB 3 ports don’t work (in Linux)…

Enabling the setting “IOMMU” in menu “Peripherals” will enable them (though it is probably due to an incidental effect).

Conclusion

Even though this problem was identified in 2013 with a fairly mainstream and popular motherboard (presumably a particular popular chipset), nine years later in 2022 the Linux community still has not fixed the problem, so that Linux would work out of the box without the requirement for the fix described here.

This is very, very disappointing. They ought to make things work, instead of the minutia of how some window manager works slightly different than some other window manager.

Leave a Reply

Your email address will not be published.

*