How to force a USB 3.0 port to work in USB 2.0 mode in Linux?

I am aware that I can disable USB 3.0 in the BIOS. But is there a way to force a USB 3.0 port to work in USB 2.0 mode inside a running Linux?

asked Oct 14, 2015 by anonymous

1 Answer

On Linux on some platforms in BIOS modes, you can use the following command to force USB 2.0 modes for your USB ports:

lspci -nn | grep USB \
| cut -d '[' -f3 | cut -d ']' -f1 \
| xargs -I@ setpci -H1 -d @ d0.l=0

Following is an explanation of what the commands do.

The controllers have a register XUSB2PR - xHC USB 2.0 Port Routing Register - at address 0xd0 (check http://www.intel.com/content/www/us/en/chipsets/7-series-chipset-pch-datasheet.html for more details). When the XUSB2PR register is set to 0, it routes all the corresponding USB 2.0 port pins to the EHCI controller and RMH #1. The USB 2.0 port is masked from the xHC and the USB 2.0 port’s OC pin is routed to the EHCI controller. The command setpci -H1 -d @ d0.l=0 does this.

setpci needs the vendor and device ID. So the first 2 lines find all USB controller's IDs and pass them to xargs to invoke setpci.

If you would like to do the settings manually, one example is as follows for your reference:

# lspci -nn | grep USB
00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 05)
00:1a.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 [8086:8c2d] (rev 05)
00:1d.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 [8086:8c26] (rev 05)

# setpci -H1 -d 8086:8c31 d0.l=0
# setpci -H1 -d 8086:8c26 d0.l=0
# setpci -H1 -d 8086:8c2d d0.l=0
answered Oct 16, 2015 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...