[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[vfio-users] Using input-linux in qemu-git; mouse works, but keyboard doesn't



Hello,

I installed the qemu-git AUR package on my Arch system, so that I could try the new input-linux patches.  I use virt-manager, so I added this to the XML for the Windows 10 guest using "virsh edit win10":

 <qemu:commandline>
    <qemu:arg value='-object'/>
    <qemu:arg value='input-linux,id=kbd1,evdev=/dev/input/event1,grab_all=on'/>
    <qemu:arg value='-object'/>
    <qemu:arg value='input-linux,id=mouse1,evdev=/dev/input/event2'/>
  </qemu:commandline>

I also had to whitelist /dev/input/event1 and /dev/input/event2 in /etc/libvirt/qemu.conf under "cgroup_device_acl" (I also chmod'd /dev/input/event1 and 2 as 777.  Just trying to get things working right now).

After doing all that, the machine boots and grabs my mouse.  The mouse works in the guest, but the keyboard does not respond.  The hotkey to toggle control back to the host doesn't work.  The only way I can release the mouse is to shutdown the VM.

There are no errors listed in /var/log/libvirt/qemu/win10.log.  I double checked that event1 is the right dev by running evtest.  I see all my keyboard events when I do that.  evtest sees KEY_LEFTCTRL and KEY_RIGHTCTRL, so those keys work.  When I start the VM, evtest stops showing events, so clearly qemu is grabbing the devices.  I've looked over the code in input-linux.c and can't see why it wouldn't at least respond to the hotkey.

I'm not sure how to do further debugging at this point.  I don't know the QEMU codebase, so I don't know how to add logging to input-linux.c.  Not sure if printing to stdout works or where that output would go.  I might try adding a few printf statements to see if I can get QEMU to tell me if it is at least receiving the keyboard events correctly or what's going on.

Any help would be appreciated, thank you.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]