Help reverse engineering USB->dom0->Qube inputs

You should create separate sys-usb for each controller, and name 'em for example sys-usb-d and sys-usb-14(or xHCI). Then it’ll be easy to follow visually via device widget.

2 Likes

Simpler still.
With the two sys-usb set up, start one.
Insert USB device in to ports - note which ones are working.pop up
notification will appear.
Shut down that usb qube, start the other.
Insert USB device in to ports - note which ones are working.

You may find that some controllers don’t apparently match any port, or
some ports are linked to two controllers.
former - controller is linked to internal devices.
latter - probably one controller is usb2, one usb3 in dual speed port.

@enmus @unman I can’t just casually start and stop sys-usbs because my keyboard is a USB keyboard.

What I’m getting out of this is there’s NO WAY to tell which device is on which controller without potentially freezing up my system. There’s no command to show the mapping, it just happens somewhere.

I didn’t say that.

SUre, you didn’t…but what happens to my keyboard when I am transitioning from one sys-usb to two?

In fact, just doing that will involve starting and stopping a controller, since I can’t remove the controll from one sys-usb, and assign it to the other without stopping the sys-usb.

Unman used to say to me what Aretha used to say to all of us: Think!

Well, I tried.

I cloned sys-usb to two new qubes. Since they were turned off I could assign devices to them.

I then wrote a script to shut sys-usb down and start the two new guys up. (Before running the script I disabled the cron job I have that runs once a minute, it restarts sys-usb if it’s not running. I did that after one too many fat fingers in the qui-domains widget as it was shuffling the qubes it shows, and shutting off sys-usb and having to reboot.)

I found myself locked out of my system. After looking up the “qubes.skip_autostart” trick via my phone I was able to get back in, and tried some more experiments. d won’t start at all by itself; 1e locks me out.

OK, so do you have a more specific suggestion to make?

I don’t think you have multiple controllers. To me, it looks like you have one USB controller and one thunderbolt controller.

I have a laptop with a similar setup, the thunderbolt controller only controls the thunderbolt port, and the USB controller controls all the USB ports.

If your laptops work the same way, and you want to use it as two separate controllers, you are going to need a dock you can connect to the thunderbolt port.

What about your mouse? You can’t use it too?
What about your computer? Is it a laptop which both keyboard and trackpad are on the usb controller? Or, is it a desktop without PS/2 ports?

Edit: I didn’t see renehoj’s post prior to posting mine.

I’m on an intel NUC. (It’s almost perfect…if it were twice as tall it would be cubical.) It’s a desktop, a very small one, and has no ps2 ports.

Both keyboard and mouse froze. On rebooting, both were frozen at the password prompt; fortunately I found the skip_autostart suggestion via my phone. (I’ve now written it down.) I’ve restored things back the way they were, so the next reboot shouldn’t be so problematic. (And if it is, I have my cheat sheet now.)

Does it have 2 standard USB ports and one USB-C with a lightning icon?

@Sven, @deeplow should probably split this topic?

Picture of the back:

And the front has two more of those 3.0 type A ports, both labeled with the superscript 10:

I use the two “mere” USB-3 ports on the back for the mouse and keyboard. The type C ports go to other peripherals (one of them a printer). That leaves the front two, which I can actually SEE, for things like sticks, a plug in blueray, etc.

I think 00:14.0 is controlling the 4 standard USB ports, and 00:0d.x is only controlling the thunderbolt/USB-C port.

You can pass the 4 ports directly to dom0 and use them for mouse and keyboard, but without a port replicator you can connect to the USB-C port you lose the ability to connect any USB devices to qubes though sys-usb.

Totally.

That’s interesting because the two USB-C ports are the ones conected to peripherals, and I have no trouble hooking them up to my printer and a camera I operate in “tethered” mode, via sys-usb.

The thought occurred to me that this might explain why I can’t get the scanner (integrated with the printer) to work…but then I realized it does work with my Windows 7 qube. Still it might be worth an experiment some day; move the printer/scanner to one of the front ports. (From what I can see, the printer/scanner doesn’t see a “computer” on the other end of its USB cable when it’s a Linux qube. So it can certainly receive a print job, but it doesn’t think it has any place to send scan data to.) I gave up a couple of months ago on scanning into a Linux system; I just use Windoze for that.

You can use the thunderbolt ports in sys-usb, they should function as regular USB ports, you just can’t connect USB-A devices.

If all your devices use USB-C it shouldn’t be a problem.

Steve, I don’t know if you’ve resolved all your issues here.
I did notice that when you were testing, you said that you were locked
out after 1e - was this just a typo ?
You also say that d wont start by itself.

You didn’t say which ports are working when you started the qube with
only 00:14.0 attached. (I may have missed that.)
Can you confirm?

Actually since all of my peripherals use USB-A (only my phone has USB-C) I have bought a ton of female USB-A to male USB-C adapters. And I’m using them on my system as my peripherals are all quite old.

(For some reason, most of the adapters out there are the other way around…and you cannot get Google to NOT show you those even with quotes around the phrases ‘male USB-C’ and ‘female USB-A’; I’ve tried. I guess most people are finding themselves using new USB-C devices with USB-A outlets; unfortunately I’m in the opposite situation; my car is entirely USB-C.)