A few questions about input devices

Short introduction:
Hello Qubes community, this is my first time installing/using qubes. My experience so far has been great! During this time (about 1-week), there’s been numerous times I’ve been pleasantly surprised as things just worked out-of-box and way more painlessly than I initially expected (e.g. albeit not directly related to Qubes, NVIDIA virtualization driver support released earlier this year made GPU passthrough a breeze (AFAICT, still haven’t extensively tested)). My background is a little bit of linux, but my daily driver has been Windows since forever. I’m excited to finally make the switch, and QubesOS just looks like a dream come true for me. A bit of a side-note: the initiating reason for this switch was that my computer got killed (malware?) again, 4th time in like 5 years now, running in Windows 10. I know that sounds bad on my part. After all of this, it just seems obvious to step-up my security, learning and implementing and setting up a more secure system. So, I can already see a brighter future for me now security-wise thanks to Qubes, so thank you to everyone involved for this opportunity.


So as mentioned in the introduction, I’ve gotten along pretty well. I just have a few questions I couldn’t yet figure out or find information on and was wondering if others have information they could share or point me to the correct resource I could read.

These questions are all in the context of GPU passthrough to a Windows 10 LTSC VM created with qvm-create-windows-qube:

  1. How are input peripherals normally handled between VMs, and how does GPU passthrough make things different in that regard? e.g. I’d like to send send key and mouse inputs to a VM, when it’s in the “shared gui” (for lack of a better word) this works out-of-box. But if using GPU passthrough to a VM displayed in a separate monitor, how do I send input to it? I’ve read some people suggesting passing through a whole separate USB controller to the VM. I’d like to understand why the GPU passthrough requires a different way of handling inputs, but unfortunately couldn’t find much information as I don’t really know the correct terms to search for here.

  2. I’ve tried passing the USB controller according to the docs, but to no avail. I kept getting the error of something similar to “dom0 doesn’t expose device”. How’s this supposed to work with sys-usb? I’m guessing I need to prevent the controller from attaching to sys-usb but couldn’t figure out how to do that. Is this correct understanding, and if so how to accomplish that?

  3. Ideally I could use a single keyboard to manage everything. So I’ve conceptualized a hardware setup and was wondering on it’s viability or if anyone has done something similar and has feedback. The idea is to take a usb keyboard, run it through a splitter-switch so it can switch between tow output ports, and on one output port attach a usb-> PS/2 adapter. A few concerns:

  • According to wikipedia, PS/2 isn’t designed for hotplugging. Since I only plan on doing this with the keyboard, which is supposedly better suited compared to mice – I hope that if I use a switch, then the possible damage from hotplugging is eliminated? Is this correct understanding? I understand this is likely unable to be conclusively answered as it depends on hardware and stuff (I do have modern components), but was wondering in general if this just sounds stupid or a reasonable idea.
  1. I’ve read that the latest updates to qubes and/or QWT has enabled support for USB attachment. I couldn’t get this to work on 4.0.4 so I might try moving to 4.1. Was just wondering (apologies for all these questions), is there a convenient change-log summary for each Qubes release that one could read?

Thanks again.

1 Like

Warning: lots of hypothetical and non-backed ideas/claims/statements:

Assuming I could use the split-switch setup as mentioned in question 3, would this be problematic if used conjunction with sys-usb USB qubes? For example, I’m hopeful that I’d be able to press the hardware switch to alternate inputs between Windows VM and dom0. Please correct me if I’m wrong, AFAIK this should be okay if passing the entire usb controller that the usb output of the keyboard split-switch is connected to, as the controller would simply “detect” it when the switch is on. But I’m not sure how it would behave with USB qubes (or how sys-usb works in general tbh). So for example, if I had switched on the usb output of the keyboard, then attached it to the Windows VM, then proceeded to switch the keyboard output back to PC/2 output then back to usb, I’m guessing the usb-qube could be “re-created” so maybe that’d add undesirable latency for this setup, and then it’d also need to be re-attached which would also be undesirable but this part could maybe be scripted to happen automatically.

Okay, I’m getting a bit ahead of myself here speculating a lot. I’d love to learn more about possible setups relating to this if others would like to share.

If you have a PS/2 keyboard or mouse, dom0 controls it and passes the input commands to the currently focused window.

If you have a USB keyboard/mouse, it may be the same or you can configure it to be handled by sys-usb (USB is inherently less secure than PS/2 as it’s not a dedicated bus), which then relays input commands to dom0 in a hopefully more secure manner. If that configuration goes wrong, you’ll be unable to pass input to Qubes OS…

You’d only need some sort of USB switch or KVM hub if you have two or more physical computers that you’d like to use a single keyboard for. Then that sys-usb approach would make sense to hopefully prevent the other machine from controlling your dom0.

Hey thanks for the reply.

So this makes sense, but then how are GPU passthrough’d vm’s receive input? AFAICT, it’s not possible for dom0 to focus such a vm. Is it possible?