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

Re: [vfio-users] Looking for recommendations for screen-switching



That will be because I wasn't very clear so my apologies. It's part of qemu, and a very useful way of passing kb+m to and from your host and a passthrough context. You can search this list for input-linux but the scripty bit I use to pass it through looks as follows. Got some script that digs through /sys/class/input to find my keyboard as I have a corsair keyboard with lights, but you can probably just find your in /dev/input and replace the ${ev} below. I need the virtio devices (there are win drivers in the Fedora driver iso) to prevent problems with key ups during games.

OPTS="$OPTS -object input-linux,id=kbd,evdev=${ev},grab_all=yes,repeat=off"
OPTS="$OPTS -object input-linux,id=mse,evdev=/dev/input/by-id/usb-Areson_USB_Device-event-mouse "

OPTS="$OPTS -device virtio-keyboard-pci,addr=1d.0,multifunction=on,serial=SN0000 "
OPTS="$OPTS -device virtio-mouse-pci,addr=1d.1,multifunction=on,serial=SN15471500079 "

I think it's criminally underappreciated and underdocumented in qemu but maybe that's just me.  It's been in qemu since 2.7 I think so won't work with older versions. Switch contexts by pressing both ctrl keys so easily worked into however you change the screen too.

Regards,

Dan Oram.

On 20/03/17 16:16, Patrick O'Callaghan wrote:

On 20 March 2017 at 12:36, Daniel Oram <daniel oram gmail com> wrote:
Try ddcutil

http://www.ddcutil.com/

Much more comprehensive. Using something like:

sudo modprobe i2c-dev
sudo ddcutil capabilities

To list any standard recognised capabilities for your monitor (it is up to date). You may have it but vpd may not be standardised and ddcutil gives you the tools to work that out if you have the patience.

I bought a KVM in the end ... and it's so awful I only use it as an HDMI switch and use the input-linux framework in qemu to switch the keyboard/mouse. USB switches do work, but only good ones will work with every device and udev can make a mess of rapidly switching devices in and out, especially if they have some sort of custom software as the device won't come back to the same location as it left. In Windows a mess is normal but it will probably get worse. HDMI switches may have limitations on max resolution, bandwidth and types of data so be careful when buying.
/
The input-linux framework can have the odd problem with missed key ups but they are all easily surmountable by attaching a USB or virtio keyboard device to the VM so are far preferable to hardware related limitations or problems of the switch and constant device plugging in the VMs. After all, that is one of the major motivations for using a VM.

Thanks, I'll look at that.

What do you mean exactly by "the input-linux framework"? I'm an old Linux hand but some of this stuff is new to me. Maybe it's just a question of terminology.

poc



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