<div dir="ltr">The patches apply to Qemu 2.5. You will need to recompile it after applying the patches. See your distro's help section on working with source files. You should be able to add these to the RPM/DEP/Ebuild scripts easily. There are script files inside RPMs and DEBs that tell rpm/deb how to build those packages, thus editing that will compile the patches in for you and build the installable RPM/DEB.<div><br></div><div>The following patches need to be applied in the order listed. They are taken from Gerd's qemu work branch. He's a qemu developer, btw. ;)</div><div><a href="https://www.kraxel.org/cgit/qemu/patch/?id=0d60ce8e719b5c49ba69c42080f7724fc7de5c1f">https://www.kraxel.org/cgit/qemu/patch/?id=0d60ce8e719b5c49ba69c42080f7724fc7de5c1f</a><br></div><div><a href="https://www.kraxel.org/cgit/qemu/patch/?id=f3617dde4efc245313694ec1c48a0c94e3da6632">https://www.kraxel.org/cgit/qemu/patch/?id=f3617dde4efc245313694ec1c48a0c94e3da6632</a><br></div><div><a href="https://www.kraxel.org/cgit/qemu/patch/?id=94cf5984085d74b3c1fc9bfb2713c3a931d19d08">https://www.kraxel.org/cgit/qemu/patch/?id=94cf5984085d74b3c1fc9bfb2713c3a931d19d08</a><br></div><div><a href="https://www.kraxel.org/cgit/qemu/patch/?id=caef8b88fecf1496fa5b623aa2c08544726e36f7">https://www.kraxel.org/cgit/qemu/patch/?id=caef8b88fecf1496fa5b623aa2c08544726e36f7</a><br></div><div><a href="https://www.kraxel.org/cgit/qemu/patch/?id=96c8276c04d609e880a0eb01298d73f46585225d">https://www.kraxel.org/cgit/qemu/patch/?id=96c8276c04d609e880a0eb01298d73f46585225d</a><br></div><div><a href="https://www.kraxel.org/cgit/qemu/patch/?id=9e129397cfd6a733fb4c865e1b605c5c1eb07cff">https://www.kraxel.org/cgit/qemu/patch/?id=9e129397cfd6a733fb4c865e1b605c5c1eb07cff</a><br></div><div><a href="https://www.kraxel.org/cgit/qemu/patch/?id=6c1c299b65af44e1d81142efb944a9b1009ad725">https://www.kraxel.org/cgit/qemu/patch/?id=6c1c299b65af44e1d81142efb944a9b1009ad725</a><br></div><div><a href="https://www.kraxel.org/cgit/qemu/patch/?id=0767759d388b0f1bdd9b0445b41b4e88bf980ede">https://www.kraxel.org/cgit/qemu/patch/?id=0767759d388b0f1bdd9b0445b41b4e88bf980ede</a><br></div><div><br></div><div>For ebuilds, I added this to the qemu ebuild:<br><div><span class="" style="white-space:pre">      </span># Add input patches</div><div><span class="" style="white-space:pre">        </span>epatch "${FILESDIR}"/${P}-input-01-add-qemu-input.patch</div><div><span class="" style="white-space:pre">  </span>epatch "${FILESDIR}"/${P}-input-02-linux-evdev-support.patch</div><div><span class="" style="white-space:pre">     </span>epatch "${FILESDIR}"/${P}-input-03-add-option-to-toggle-grab-on-all-devices.patch</div><div><span class="" style="white-space:pre">        </span>epatch "${FILESDIR}"/${P}-input-04-add-name-strings-for-linux-input-layer-defines.patch</div><div><span class="" style="white-space:pre">  </span>epatch "${FILESDIR}"/${P}-input-05-event-logging-to-stderr.patch</div><div><span class="" style="white-space:pre"> </span>epatch "${FILESDIR}"/${P}-input-06-catch-and-handle-read-errors.patch</div><div>#<span class="" style="white-space:pre">   </span>epatch "${FILESDIR}"/${P}-input-07-adapt-to-qapi-changes.patch <-- needs development branch to work. Don't use.</div><div><span class="" style="white-space:pre">   </span>epatch "${FILESDIR}"/${P}-input-08-EAGAIN-is-not-fatal.patch</div><div><span class="" style="white-space:pre">     </span>epatch "${FILESDIR}"/${P}-input-09-add-switch-to-enable-auto-repeat-events.patch</div></div><div><br></div><div>Then in my libvirt xml file, I enabled qemu direct commandline control:</div><div><div>  <qemu:commandline></div><div>    <qemu:arg value='-input-linux'/></div><div>    <qemu:arg value='/dev/input/by-path/pci-0000:00:14.0-usb-0:9.1:1.0-event-kbd,grab-all=on,repeat=on'/></div><div>    <qemu:arg value='-input-linux'/></div><div>    <qemu:arg value='/dev/input/by-path/pci-0000:00:14.0-usb-0:9.1:1.1-event-mouse'/></div><div>    <qemu:arg value='-input-linux'/></div><div>    <qemu:arg value='/dev/input/by-path/pci-0000:00:14.0-usb-0:9.1:1.2-event-joystick'/></div><div>  </qemu:commandline></div></div><div><br></div><div>The Joystick is actually the keypad. I have a Microsoft sculpt set that comes with three separate pieces.</div><div>Replace your keyboard and mouse with the correct paths in the /dev/input/by-path section.</div><div><br></div><div>It will be cool when the execute program on switch is added, then just pressing both CTRL keys will switch monitor inputs as well!</div><div><br></div><div>Jon</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 1 March 2016 at 12:43, thibaut noah <span dir="ltr"><<a href="mailto:thibaut.noah@gmail.com" target="_blank">thibaut.noah@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><br><div class="gmail_quote">2016-03-01 11:08 GMT+01:00 Jonathan Scruggs <span dir="ltr"><<a href="mailto:j.scruggs@gmail.com" target="_blank">j.scruggs@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have no lag. The patches make the keyboard/mouse directly available on the guest as a real device. This way I have one keyboard and mouse for both host and guest. The technical bit is that the input buffers are forwarded to the guest. Synergy is nice but there is lag with that. These patches are real time! I play the latest AAA games too. I haven't noticed anything. It doesn't hurt to try. I can post my libvirt config if need be. I'll need to get the git address of the latest version.</blockquote></div><br></span>That is pretty much why my synergy server is on the guest, but i have to swift my mouse every time i boot, not good for the usb ports.<br>Are the patches applied with patch -p1?<br>No kernel recompilation needed?<br>If so could you copy paste them please?<br>That would be indeed glorious, and free 2ports on my usb controller (also i have usb ports dedicated to gaming periph on my motherboard)</div></div>
</blockquote></div><br></div>