dangle / akeydo

A systemd service that sends a D-Bus signal when the QEMU evdev hotkey is triggered.
MIT License
41 stars 0 forks source link

Error Starting VFIO-KVM service #16

Closed Andrew-J-Kennedy closed 2 years ago

Andrew-J-Kennedy commented 2 years ago

Just starting out with this. I get the following error:

Nov 02 13:28:41 #######-server01 systemd[1]: Started VFIO-KVM service.
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]: [ERROR] An exception ocurred when emitting ObjectManager.InterfacesAdded for vfio.kvm. Some properties will not be included in the signal.
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]: Traceback (most recent call last):
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]:   File "/usr/lib/python3.9/site-packages/dbus_next/message_bus.py", line 227, in get_properties_callback
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]:     raise e
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]:   File "/usr/lib/python3.9/site-packages/dbus_next/service.py", line 538, in get_property_callback
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]:     result[prop.name] = Variant(prop.signature, value)
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]:   File "/usr/lib/python3.9/site-packages/dbus_next/signature.py", line 405, in __init__
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]:     signature_type.verify(value)
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]:   File "/usr/lib/python3.9/site-packages/dbus_next/signature.py", line 259, in verify
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]:     raise SignatureBodyMismatchError('Cannot serialize Python type "None"')
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]: dbus_next.errors.SignatureBodyMismatchError: Cannot serialize Python type "None"
Nov 02 13:28:41 #######-server01 vfio-kvm[233505]: [INFO] Listening for libvirtd events

I assume this is a breaking error because the input mapping with "/dev/input/by-id/\<VM NAME>-\<DEVICE NAME>" is not happening.

dangle commented 2 years ago

I don't see a virtual machine being started. A couple of questions:

If you can, please enable debug logging. You can do this by setting LOGLEVEL=DEBUG. If you're using systemd, you can set this by running sudo systemctl edit vfio-kvm and adding this content between the comment areas:

[Service]
Environment=LOGLEVEL=DEBUG
Andrew-J-Kennedy commented 2 years ago

Yeah I think those initial log msgs are not relevant. I've had another crack with debug on and I must have misconfigured the xml.

Working now. thanks

dangle commented 2 years ago

Glad to hear. Any idea what was wrong with the XML? I'd like to add a better error message.

Andrew-J-Kennedy commented 2 years ago

The error message was fine, I just made a bad assumption about the first error on startup:

Nov 03 13:26:30 #######-server01 vfio-kvm[16190]: [ERROR] An exception occurred while preparing a virtual machine. Nov 03 13:26:30 #######-server01 vfio-kvm[16190]: Traceback (most recent call last): Nov 03 13:26:30 #######-server01 vfio-kvm[16190]: File "/usr/bin/vfio-kvm", line 585, in release Nov 03 13:26:30 #######-server01 vfio-kvm[16190]: self._destroy_devices( Nov 03 13:26:30 #######-server01 vfio-kvm[16190]: File "/usr/bin/vfio-kvm", line 674, in _destroy_devices Nov 03 13:26:30 #######-server01 vfio-kvm[16190]: device = self._devices[source] Nov 03 13:26:30 #######-server01 vfio-kvm[16190]: KeyError: '/dev/input/by-id/PixArt_Microsoft_USB_Optical_Mouse-event-mouse' (missing "usb-")

It turns out that this setup (evdev I guess) does not play nicely with my multi-seat setup so I am going to have to kick my daughter off my PC.

dangle commented 2 years ago

That's unfortunate. If you have any ideas on changes that would allow your multi-seat setup to work, let me know. I'm closing this for now.