RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
digitsun
Established Member
Posts: 91
Joined: Thu Mar 04, 2021 1:50 am
Has thanked: 13 times
Been thanked: 14 times

RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Post by digitsun »

I'm using the rtirq script of the great Rui Nuno Capela. This script allow me select the order of my audio interface for give it a higher priority. For default the config file looks like this:

Code: Select all

RTIRQ_NAME_LIST="snd usb i8042"
Well, I'm using a Focusrite Scarlett 2i2 [first generation], a old USB2 audio interface. So with a chain of linux commands I can know the IRQ service name of my 2i2 and give it a higher priority. In many places say that linux' USB2 driver is ehci_hcd but when I search the IRQ of my audio interface I only have the linux' USB3 driver runs: xhci_hcd.

I have connected my 2i2 to USB2 port of my PC, so I don't know what happen here. Or my OS (Ubuntu 20.04) doesn't have the USB2 driver or the USB3 driver can handle usb2 and usb3 devices.

So, for pick the IRQ and know the usb driver (xhci_hcd), I follow this proccess:

1. Look my USB hardware. On terminal type lsusb:

Code: Select all

$lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1235:8006 Focusrite-Novation Focusrite Scarlett 2i2
Bus 001 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
2. Using the next command: cat /proc/interrupts; I only look to xhci_hcd driver works, no traces of ehci_hcd:

Code: Select all

   9:           0          5          0          0   IO-APIC    9-fasteoi   acpi
  16:          0          0          0          0   IO-APIC   16-fasteoi   i801_smbus
  17:          0        213          0          0   IO-APIC   17-fasteoi   snd_hda_intel:card3
 124:         0      98934   36922631          0   PCI-MSI 327680-edge      xhci_hcd
 125:         0          0          0     383622   PCI-MSI 1572864-edge      enp3s0
 126:  33747          0          0          0   PCI-MSI 376832-edge      ahci[0000:00:17.0]
 127:         0          0         42          0   PCI-MSI 360448-edge      mei_me
 128:         0          0      13255         33   PCI-MSI 524288-edge      nvkm
 129:      418    1278051          0          0   PCI-MSI 32768-edge      i915
 130:         0          0       1156          0   PCI-MSI 514048-edge      snd_hda_intel:card2
3. Ok, for to localize the driver of my interface, I need to know the IRQ of the BUS, because 'individual devices don't get an IRQ' (viewtopic.php?p=4382&sid=1711c5c13f7ef7 ... 409b#p4382). So I need to type another command: sudo lsusb -D /dev/bus/usb/001/001 to find the iSerial for 'Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub':

Code: Select all

iSerial                 1 0000:00:14.0
4. Run sudo lspci -v to find the IRQ of the listed iSerial:

Code: Select all

00:14.0 USB controller: Intel Corporation 120 Series Chipset Family USB 3.0 xHCI Controller (rev 31) (prog-if 30 [XHCI])
	Subsystem: ASUSTeK Computer Inc. 120 Series Chipset Family USB 3.0 xHCI Controller
	Flags: bus master, medium devsel, latency 0, IRQ 124
5. Aha! the Focusrite Bus is using the xhci_hcd driver (But why?), and IRQ is 124

Finally, for a 'correct' hardware priorities I need change the rtirq config file with 'xhci_hcd' (RTIRQ_NAME_LIST="xhci_hcd snd i8042"), but I don't know if that configuration is good, remember Focusrite Scarlett is a USB2 interface and I've connected a USB2 from my PC. Maybe I miss something, please Do you have a hint for me?
User avatar
autostatic
Established Member
Posts: 1823
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 1 time
Been thanked: 53 times
Contact:

Re: RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Post by autostatic »

xhci_hcd is backwards compatible with USB2. So with the configuration you have now you should be OK.
User avatar
lilith
Established Member
Posts: 1656
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 76 times
Been thanked: 41 times
Contact:

Re: RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Post by lilith »

It's exactly the same on my PC. Interface is connected to USB 2, but when I check the interrupts I get xhci.

GuntherT
Established Member
Posts: 134
Joined: Sun Jun 07, 2015 2:15 am
Has thanked: 1 time
Been thanked: 10 times

Re: RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Post by GuntherT »

I have a USB 2.0 device plugged into a USB3 port, and this works fine for me:

RTIRQ_NAME_LIST="usb snd"

Gps
Established Member
Posts: 922
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 176 times
Been thanked: 92 times

Re: RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Post by Gps »

https://www.partitionwizard.com/partiti ... 0-006.html

USB 2.0 vs 3.0 Compatibility

USB 3.0 ports are backward compatible. For example, if you connect a USB 2.0 drive or earlier versions to a USB 3.0 port, the drive will work as normal.

USB 3.0 devices are also backward compatible. That is to say, if you plug a USB 3.0 flash drive into a USB 2.0 port on your PC, it still can be read. However, the US 3.0 will work at the speed of the port, in which case the super-fast transfer rate of USB 3.0 is not fully realized.

User avatar
lilith
Established Member
Posts: 1656
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 76 times
Been thanked: 41 times
Contact:

Re: RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Post by lilith »

Gps wrote: Thu Jan 19, 2023 9:08 pm

https://www.partitionwizard.com/partiti ... 0-006.html

USB 2.0 vs 3.0 Compatibility

USB 3.0 ports are backward compatible. For example, if you connect a USB 2.0 drive or earlier versions to a USB 3.0 port, the drive will work as normal.

USB 3.0 devices are also backward compatible. That is to say, if you plug a USB 3.0 flash drive into a USB 2.0 port on your PC, it still can be read. However, the US 3.0 will work at the speed of the port, in which case the super-fast transfer rate of USB 3.0 is not fully realized.

That's not the point. I have the interface connected to an usb 2 port.

Gps
Established Member
Posts: 922
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 176 times
Been thanked: 92 times

Re: RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Post by Gps »

I am reading exactly what the topic starter asked. :?

Connecting an USB2 device to an USB3 port.

For example, if you connect a USB 2.0 drive or earlier versions to a USB 3.0 port, the drive will work as normal.

Maybe I need to add this is not only true for drives. My scarlett solo is an USB2 device, and the other side of the cable goes into a blue USB(3) port on my mobo.

User avatar
rncbc
Established Member
Posts: 962
Joined: Mon Apr 19, 2010 12:20 pm
Has thanked: 27 times
Been thanked: 135 times
Contact:

Re: RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Post by rncbc »

erm,

if you don't give a dang to your internal soundcard, (pci or hda? for whichever stands the "snd" moniker) then get rid of it from the RTIRQ_NAME_LIST;

the "usb" particle will take care of ALL USB controllers, whether that being USB 1, 2 or 3. just like the "firewire" one, back in the good old days of radical top notch performance ;)

not anymore, live with it
cheers

ps. btw. on the other news, if you're considering pipewire for a jack replacement, then, be advised that any tweks regarding IRQs and PREEMPT_RT kernels are of no concern. at all. but again, PW can't cope with insane low-latencies anyhow, so why bother?

GuntherT
Established Member
Posts: 134
Joined: Sun Jun 07, 2015 2:15 am
Has thanked: 1 time
Been thanked: 10 times

Re: RTIRQ: My OS only has USB3 driver but I'm using a USB2 interface

Post by GuntherT »

The author of the script hath spoken.

Post Reply