> > > This last two lines doesn't make sense to me. Isn't the grab > > > toggling entirely in control of the QEMU process, regardless > > > of what state the guest is at ? > > > > Actually, you're right, they do not make sense. This issue of having the > > guest > > taking a while to start and the toggle keys not working, only seem to appear > > when running the VM under libvirt. I was not able to reproduce this issue > > when > > running qemu directly from the command line. So either this is a libvirt > > issue > > or something related to my setup (VFIO with GPU passthrough, so a lot can go > > wrong). > > > > Should I send a new version of the patch with an updated commit message that > > does not mention this issue? > > If that probem does not exist, what is the compelling reason to > add this patch ?
I still think this patch is useful. Having the guest "steal" the kb/mouse from the host immediately upon starting is frankly annoying and most of the time unnecessary as at this point the guest is barely booting anyway. Most of the time I don't need/want to redirect the kb/mouse until the guest is fully booted and instead want to do something on the host while the guest is starting in the background. So I end up having to press the toggle keys every time after starting the guest just so I can keep control of my inputs. This might seem like a minor annoyance but it is still that, an annoyance. This can get particularly annoying if the guest is started from a script. In this situation the guest may not necessarily be started immediately upon running the script depending on what the script is doing prior to the `virsh start` command. So you can't tell exactly when your kb/mouse are going to be grabbed from you. If you do something else on your host in the meantime, while the script is running in the background, you end up having your inputs grabbed from you without notice. There are a few posts[1][2] on the internet asking how to prevent evdev grabbing upon boot, so it seems that I am not the only one that would like to see such an option. [1] https://www.reddit.com/r/VFIO/comments/14xuksq/evedv_passthough_dont_grab_on_start/ [2] https://www.reddit.com/r/VFIO/comments/frbk0q/disabling_auto_keyboard_grab_evdev/