Qemu 2.0 Windows guest – mouse stops working (vnc) when using usb-passthrough

mouseqemuusbvnc

I have installed Qemu 2.0 on an Ubuntu Server 14.04 LTS computer. I use Qemu to run multiple virtual machines. One of them is using Windows 8.1 Pro (x64) and is used for back-ups.

The guest runs fine without any problems. But when I start passing through an usb-device (external hard drive) the mouse (keyboard still works fine) stops working on the vnc client. Reconnecting to the vnc-server does not work. Only a guest reboot will fix this issue.

It appears that this 'bug' only starts when I make the vnc client inactive (clicking somewhere else on another program/service) on the local computer where i run the vnc client from. When I get back (make it active again) to the vnc client/viewer, the mouse stops working/does not respond anymore.

It only happens when I use usb2 controller-mode and only when I add a new usb passthrough device. As long as I don't connect/pass through that usb-device, the mouse still works. But I need this usb2 controller in order for my external hard drives to work properly.

If the guest is on and I connect the external usb hard drive to reproduce this bug, I also notice that if I remove the device then the mouse starts working again. It's like the guest thinks the device is in place of the mouse input device. Still, the hard drive is working fine once it's connected, only the mouse is not.

I can't find any related problems on the internet and I hope someone here can help me solve this problem.

Best Answer

I finally found a fix for this bug/problem! It is in fact a bug, but I don't know whether it is a Windows bug or a Qemu/VNC-bug. After connecting a massive storage device to the Windows 8.1 guest, the mouse stops working because it goes into a sleep-state.

This bug can be fixed by going to WIN + X, Control Panel, Devices and Printers. There you can see the QEMU USB Tablet which is a tablet/mouse device used for the VNC-mouse to work on the guest. Right click it and select Properties. Next click on the tab Hardware. Normally you should see two devices (based on what hardware you assigned to the guest), HID-compliant mouse and USB Input Device.

Now select the USB Input Device and click Properties at the bottom. This will open a new window with the device's properties. Next click on Change settings (you'll need Admin.-powers for this) and go to the Power Management tab on the newly opened window. There you should see an option ticked with the following explanation: Allow the computer to turn off this device to save power.

Unchecking that option and pressing OK solves the problem. This whole route can be done with keyboard-only (as the keyboard still works). Press ENTER to open things, use TAB to move to different menus and press SPACE to simulate a single mouse-click (for unchecking the checkbox).

I still can't find any related topics of people having the same issues as I did, but it is a bug and should be fixed. I have no idea if it is Windows or Qemu related and I hope that the Qemu-team can further inspect this.

Related Question