New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB Passthrough with RT2800USB does not work #3778

Open
QubesWirelessIssue opened this Issue Apr 2, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@QubesWirelessIssue

QubesWirelessIssue commented Apr 2, 2018

Qubes OS version:

Version 4

USB Pass through of RT2800USB chipset does not work.

Affected component(s):

Qubes4, with sys-usb qube involved, and a converted debian 9 -> kali qube.


Steps to reproduce the behavior:

Plug in RT2800USB wireless adapter. Use USB Pass through to a qube.

Expected behavior:

I can use the RT2800USB wireless adapter in the target qube.

Actual behavior:

In the target qube, I get the below logs:

[ 3207.128956] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(0)
[ 3207.128981] vhci_hcd vhci_hcd.0: devid(65542) speed(3) speed_str(high-speed)
[ 3207.345085] usb 1-1: new high-speed USB device number 20 using vhci_hcd
[ 3207.461155] usb 1-1: SetAddress Request (20) to port 0
[ 3207.493446] usb 1-1: New USB device found, idVendor=148f, idProduct=3070
[ 3207.493481] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3207.493509] usb 1-1: Product: 802.11 n WLAN
[ 3207.493518] usb 1-1: Manufacturer: Ralink
[ 3207.493526] usb 1-1: SerialNumber: 1.0
[ 3208.391263] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 3209.279250] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 3210.167066] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 3211.055282] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 3211.055479] ieee80211 phy2: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1000 with error -19
[ 3211.055638] ieee80211 phy2: rt2800_probe_rt: Error - Invalid RT chipset 0x0000, rev 0000 detected
[ 3211.055770] ieee80211 phy2: rt2x00lib_probe_dev: Error - Failed to allocate device
[ 3211.059753] usb 1-1: USB disconnect, device number 20
[ 3211.951092] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 3212.839286] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 3212.839394] usb usb1-port1: attempt power cycle
[ 3214.039259] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 3214.927061] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 3214.927122] usb usb1-port1: unable to enumerate USB device

Suffice to say, the wireless card does not work.

General notes:

I also tried blacklisting the loading of rt2800usb kernel modules in the sys-usb qube, and verified that after restarting the sys-usb qube, it did not have the kernel modules loaded, nor where they loaded when I plugged the card in. After trying to enable pass through again, it failed with the above error messages.


Related issues:

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Apr 2, 2018

Member

What do you see from kernel in sys-usb?

Member

marmarek commented Apr 2, 2018

What do you see from kernel in sys-usb?

@QubesWirelessIssue

This comment has been minimized.

Show comment
Hide comment
@QubesWirelessIssue

QubesWirelessIssue Apr 2, 2018

Nothing that leads me to believe that there's a kernel related issue:

Apr 02 14:22:30 sys-usb audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 02 14:22:30 sys-usb kernel: audit: type=1131 audit(1522693350.271:95): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? re
Apr 02 14:22:31 sys-usb pulseaudio[1450]: source cork req state =2, now state=1
Apr 02 14:22:31 sys-usb pulseaudio[1450]: sink cork req state =2, now state=1
Apr 02 14:22:45 sys-usb kernel: usb 1-5: new high-speed USB device number 6 using xhci_hcd
Apr 02 14:22:45 sys-usb kernel: usb 1-5: New USB device found, idVendor=148f, idProduct=3070
Apr 02 14:22:45 sys-usb kernel: usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 02 14:22:45 sys-usb kernel: usb 1-5: Product: 802.11 n WLAN
Apr 02 14:22:45 sys-usb kernel: usb 1-5: Manufacturer: Ralink
Apr 02 14:22:45 sys-usb kernel: usb 1-5: SerialNumber: 1.0
Apr 02 14:22:45 sys-usb mtp-probe[2011]: checking bus 1, device 6: "/sys/devices/pci0000:00/0000:00:05.0/usb1/1-5"
Apr 02 14:22:45 sys-usb mtp-probe[2011]: bus: 1, device: 6 was not an MTP device
Apr 02 14:22:55 sys-usb systemd[1]: Started Update time from ClockVM.

QubesWirelessIssue commented Apr 2, 2018

Nothing that leads me to believe that there's a kernel related issue:

Apr 02 14:22:30 sys-usb audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 02 14:22:30 sys-usb kernel: audit: type=1131 audit(1522693350.271:95): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? re
Apr 02 14:22:31 sys-usb pulseaudio[1450]: source cork req state =2, now state=1
Apr 02 14:22:31 sys-usb pulseaudio[1450]: sink cork req state =2, now state=1
Apr 02 14:22:45 sys-usb kernel: usb 1-5: new high-speed USB device number 6 using xhci_hcd
Apr 02 14:22:45 sys-usb kernel: usb 1-5: New USB device found, idVendor=148f, idProduct=3070
Apr 02 14:22:45 sys-usb kernel: usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 02 14:22:45 sys-usb kernel: usb 1-5: Product: 802.11 n WLAN
Apr 02 14:22:45 sys-usb kernel: usb 1-5: Manufacturer: Ralink
Apr 02 14:22:45 sys-usb kernel: usb 1-5: SerialNumber: 1.0
Apr 02 14:22:45 sys-usb mtp-probe[2011]: checking bus 1, device 6: "/sys/devices/pci0000:00/0000:00:05.0/usb1/1-5"
Apr 02 14:22:45 sys-usb mtp-probe[2011]: bus: 1, device: 6 was not an MTP device
Apr 02 14:22:55 sys-usb systemd[1]: Started Update time from ClockVM.
@QubesWirelessIssue

This comment has been minimized.

Show comment
Hide comment
@QubesWirelessIssue

QubesWirelessIssue Apr 3, 2018

For what it's worth, other people on qubes-user as well, without any suitable full solutions.

https://groups.google.com/forum/#!searchin/qubes-users/%22maybe$20the$20usb$20cable%22%7Csort:date

I might have to see if I can assign a full USB controller or so.

For what it's worth, other people on qubes-user as well, without any suitable full solutions.

https://groups.google.com/forum/#!searchin/qubes-users/%22maybe$20the$20usb$20cable%22%7Csort:date

I might have to see if I can assign a full USB controller or so.

@QubesWirelessIssue

This comment has been minimized.

Show comment
Hide comment
@QubesWirelessIssue

QubesWirelessIssue Apr 5, 2018

After trying a fedora 26 target qube, I get the following dmesg output

[36918.440918] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(0)
[36918.440944] vhci_hcd vhci_hcd.0: devid(131078) speed(3) speed_str(high-speed)
[36918.657096] usb 1-1: new high-speed USB device number 3 using vhci_hcd
[36918.774180] usb 1-1: SetAddress Request (3) to port 0
[36918.806317] usb 1-1: New USB device found, idVendor=148f, idProduct=3070
[36918.806366] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[36918.806383] usb 1-1: Product: 802.11 n WLAN
[36918.806391] usb 1-1: Manufacturer: Ralink
[36918.806413] usb 1-1: SerialNumber: 1.0
[36919.735197] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36920.623159] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36921.511282] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36922.034405] audit: type=1123 audit(1522885146.570:531): pid=31543 uid=1000 auid=1000 ses=1 msg='cwd="/home/user" cmd="dmesg" terminal=pts/2 res=success'
[36922.034557] audit: type=1110 audit(1522885146.570:532): pid=31543 uid=0 auid=1000 ses=1 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[36922.035651] audit: type=1105 audit(1522885146.571:533): pid=31543 uid=0 auid=1000 ses=1 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[36922.399290] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36922.399505] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1000 with error -19
[36922.399592] ieee80211 phy0: rt2800_probe_rt: Error - Invalid RT chipset 0x0000, rev 0000 detected
[36922.399670] ieee80211 phy0: rt2x00lib_probe_dev: Error - Failed to allocate device
[36922.400834] usbcore: registered new interface driver rt2800usb
[36922.401274] usb 1-1: USB disconnect, device number 3
[36923.295307] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36924.183100] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36924.183187] usb usb1-port1: attempt power cycle
[36925.383368] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36926.271287] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36926.271427] usb usb1-port1: unable to enumerate USB device

However, it seems that the sys-usb says:

[24249.182018] usb 2-5: new high-speed USB device number 6 using xhci_hcd
[24249.328539] usb 2-5: New USB device found, idVendor=148f, idProduct=3070
[24249.328621] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24249.328702] usb 2-5: Product: 802.11 n WLAN
[24249.328744] usb 2-5: Manufacturer: Ralink
[24249.328786] usb 2-5: SerialNumber: 1.0
[24257.261140] usbcore: registered new device driver usbip-host
[24257.266368] usbip-host 2-5: usbip-host: register new device (bus 2 dev 6)
[24257.273079] usbip-host 2-5: stub up

After seeing the xhci_hcd (USB3) driver being used, I tried to find out if usbip supports USB3.. which leads me to https://www.spinics.net/lists/linux-usb/msg126277.html (which is old), but there's also https://www.systutorials.com/linux-kernels/51710/usbip-vhci-hcd-add-usb3-superspeed-support-linux-3-18-95/ which indicates it should be supported. That said, I wonder if it's possible to disable the USB3 support and just use USB2 kernel drivers. Let's see

After trying a fedora 26 target qube, I get the following dmesg output

[36918.440918] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(0)
[36918.440944] vhci_hcd vhci_hcd.0: devid(131078) speed(3) speed_str(high-speed)
[36918.657096] usb 1-1: new high-speed USB device number 3 using vhci_hcd
[36918.774180] usb 1-1: SetAddress Request (3) to port 0
[36918.806317] usb 1-1: New USB device found, idVendor=148f, idProduct=3070
[36918.806366] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[36918.806383] usb 1-1: Product: 802.11 n WLAN
[36918.806391] usb 1-1: Manufacturer: Ralink
[36918.806413] usb 1-1: SerialNumber: 1.0
[36919.735197] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36920.623159] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36921.511282] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36922.034405] audit: type=1123 audit(1522885146.570:531): pid=31543 uid=1000 auid=1000 ses=1 msg='cwd="/home/user" cmd="dmesg" terminal=pts/2 res=success'
[36922.034557] audit: type=1110 audit(1522885146.570:532): pid=31543 uid=0 auid=1000 ses=1 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[36922.035651] audit: type=1105 audit(1522885146.571:533): pid=31543 uid=0 auid=1000 ses=1 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[36922.399290] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36922.399505] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1000 with error -19
[36922.399592] ieee80211 phy0: rt2800_probe_rt: Error - Invalid RT chipset 0x0000, rev 0000 detected
[36922.399670] ieee80211 phy0: rt2x00lib_probe_dev: Error - Failed to allocate device
[36922.400834] usbcore: registered new interface driver rt2800usb
[36922.401274] usb 1-1: USB disconnect, device number 3
[36923.295307] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36924.183100] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36924.183187] usb usb1-port1: attempt power cycle
[36925.383368] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36926.271287] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[36926.271427] usb usb1-port1: unable to enumerate USB device

However, it seems that the sys-usb says:

[24249.182018] usb 2-5: new high-speed USB device number 6 using xhci_hcd
[24249.328539] usb 2-5: New USB device found, idVendor=148f, idProduct=3070
[24249.328621] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24249.328702] usb 2-5: Product: 802.11 n WLAN
[24249.328744] usb 2-5: Manufacturer: Ralink
[24249.328786] usb 2-5: SerialNumber: 1.0
[24257.261140] usbcore: registered new device driver usbip-host
[24257.266368] usbip-host 2-5: usbip-host: register new device (bus 2 dev 6)
[24257.273079] usbip-host 2-5: stub up

After seeing the xhci_hcd (USB3) driver being used, I tried to find out if usbip supports USB3.. which leads me to https://www.spinics.net/lists/linux-usb/msg126277.html (which is old), but there's also https://www.systutorials.com/linux-kernels/51710/usbip-vhci-hcd-add-usb3-superspeed-support-linux-3-18-95/ which indicates it should be supported. That said, I wonder if it's possible to disable the USB3 support and just use USB2 kernel drivers. Let's see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment