Comments on: Evdev Passthrough Explained — Cheap, Seamless VM Input https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/ Your baremetal source for virtual news Mon, 29 Aug 2022 15:40:52 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: txirrindulari https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-159 Wed, 17 Feb 2021 01:25:14 +0000 https://passthroughpo.st/?p=896#comment-159 In reply to Vortex.

make sure you uncomment the acl lines in qemu.conf.
Delete any # in this part.

If it still does not work, try to add /dev/input/* rw, in /etc/apparmor.d/abstractions/libvirt-qemu

]]>
By: Roburt https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-135 Tue, 13 Oct 2020 07:39:17 +0000 https://passthroughpo.st/?p=896#comment-135 I could only get round the permission issues by setting “user =
myusername group=kvm” in qemu config – so I can boot my vm, however
pressing both ctrl keys does absolutely nothing so something still isn’t
right. Why can’t anything just work?

]]>
By: Tarick Karkache https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-130 Tue, 01 Sep 2020 20:19:47 +0000 https://passthroughpo.st/?p=896#comment-130 Thank you good sir for this article! Huge help! I had to make changes to the apparmor config and ensure that my devices had the word event in them and everything went from there!

]]>
By: Oli https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-129 Sat, 22 Aug 2020 17:25:11 +0000 https://passthroughpo.st/?p=896#comment-129 I seem to be getting a permissions issue regardless of what I do!

libvirt.libvirtError: internal error: process exited while connecting to monitor: 2020-08-22T17:51:47.619425Z qemu-system-x86_64: -object input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Corsair: Could not open ‘/dev/input/by-id/usb-Corsair’: Permission denied

I’ve tried everything I can find and it always throws the same permission issue. Tried qemu.conf with user & group as root, tried with clear_emulator_capablities set, tried by-id, by-path and with events. Also had a go with /etc/apparmor.d/abstractions/libvirt-qemu giving rw on /dev/input/, disabling apparmor, with custom udev rules set “SUBSYSTEM==”usb”, ATTRS{idVendor}==”1ea7″, ATTRS{idProduct}==”0907″, MODE=”0666″”

Could there be something else messing with permissions / preventing it from working?

]]>
By: Ivan Dimitrov https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-112 Sun, 31 May 2020 14:29:18 +0000 https://passthroughpo.st/?p=896#comment-112 In reply to Vortex.

In a Redit thread I found a workaround for the permission issue – instead of passing the events by “by-id” pass “/dev/input/event3”.
This is less flexible and it will break if you move your mouse and KB but I have no will left to figure out the permissions.

]]>
By: Max https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-111 Wed, 20 May 2020 17:00:48 +0000 https://passthroughpo.st/?p=896#comment-111 I’m confused, does this work with a macOS guest? Do you need VirtIO drivers for the guest for the passthrough to function?

]]>
By: Sebastiaan Meijer https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-108 Sat, 16 May 2020 09:52:51 +0000 https://passthroughpo.st/?p=896#comment-108 In reply to Vortex.

You’re probably running into an Apparmor (if you’re on a Debian/Ubuntu based distro) or SELinux (if you’re on a CentOS/Fedora based distro) problem.
In case of AppArmor, /etc/apparmor.d/abstractions/libvirt-qemu contains the file to add additional permissions such as /dev/input and /dev/shm (needed for LookingGlass) which is parsed on VM startup. You’ll want to add the line /dev/input/* rw, and then restart AppArmor (or reboot).

In case of SELinux, you can refer to this document on how to whitelist your input devices.

]]>
By: Vortex https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-107 Sat, 16 May 2020 09:40:46 +0000 https://passthroughpo.st/?p=896#comment-107 I have an issue with evdev and it’s been bugging me for days. When I put the correct /dev/by-id/…… id in the xml. When i try to launch the vm on virt-manager it says this :

Error starting domain: internal error: process exited while connecting to monitor: 2020-05-16T13:26:14.566504Z qemu-system-x86_64: -object input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Logitech_Gaming_Mouse_G502_0E60386B3638-event-mouse: Could not open ‘/dev/input/by-id/usb-Logitech_Gaming_Mouse_G502_0E60386B3638-event-mouse’: No such file or directory

Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 111, in tmpcb
callback(*args, **kwargs)
File “/usr/share/virt-manager/virtManager/object/libvirtobject.py”, line 66, in newfn
ret = fn(self, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/object/domain.py”, line 1279, in startup
self._backend.create()
File “/usr/lib/python3/dist-packages/libvirt.py”, line 1234, in create
if ret == -1: raise libvirtError (‘virDomainCreate() failed’, dom=self)
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2020-05-16T13:26:14.566504Z qemu-system-x86_64: -object input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Logitech_Gaming_Mouse_G502_0E60386B3638-event-mouse: Could not open ‘/dev/input/by-id/usb-Logitech_Gaming_Mouse_G502_0E60386B3638-event-mouse’: No such file or directory

It constantly says no such file or directory and, before you ask i have added my user to the input and kvm group. I’ve tried removing all sandboxing as the guide suggested and i’ve also added my user to qemu.conf along with the id’s of the mouse and keyboard. I looked on reddit and I tried the things that they suggested there and to no avail. Can someone please suggest something to fix this?? I tried reddit and they suggested what i already tried.

I also checked /dev/input/by-id/ multiple times and this is the correct id, it just doesn’t seem to work?

]]>
By: AMD Ryzen VFIO GPU pass-through – gaming VM on new hardware – valo.at https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-55 Thu, 23 Jan 2020 00:00:17 +0000 https://passthroughpo.st/?p=896#comment-55 […] For input devices like keyboard and mouse there is a latency free alternative to passing-through an usb controller: EVDEV [5]. This is a seamless event pass-through method build into the windows kernel and there are even virtio drivers for windows.[5] Evdev Passthrough Explained — Cheap, Seamless VM Input […]

]]>
By: JB https://passthroughpo.st/using-evdev-passthrough-seamless-vm-input/#comment-35 Sun, 16 Dec 2018 04:24:00 +0000 https://passthroughpo.st/?p=896#comment-35 Awesome! Worked like a charm

]]>