Visit Our UNIX and Linux User Community

Evdev and joystick on passtrough,windows see it as mouse

Thread Tools Search this Thread
Operating Systems Linux Evdev and joystick on passtrough,windows see it as mouse
# 1  
Old 11-21-2018
Evdev and joystick on passtrough,windows see it as mouse

I have setup a working vm with gpu passtrough
To avoid the use of synergi(commercial) or double keyboard/mouse(sic!) I passtrough my three usb devices using EVDEV
Editing the vm I put those lines
    <qemu:arg value='-object'/>
    <qemu:arg value='input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse'/>
    <qemu:arg value='-object'/>
    <qemu:arg value='input-linux,id=kbd1,evdev=/dev/input/by-id/usb-_USB_Keyboard-event-kbd,grab_all=on,repeat=on'/>
    <qemu:arg value='-object'/> 
    <qemu:arg value='input-linux,id=joypad1,evdev=/dev/input/by-id/usb-Logitech_Logitech_R__Precision_TM__Gamepad-event-joystick'/> 

And i can swith between the machine with gpu and linux host simply use ctrlLEFT+ctrlright
Mouse work..
Keyboard too...
But joystick recognized as hid mouse(sic!),if I pass it using spice is recognized as joypad(which is good).
# 2  
Old 11-22-2018
Does your system have this log file?


I read somewhere on the net in an archive that some admins said they needed to have the parameters grab_all=on and repeat=on added in the config for all the entries.

You might have more luck getting help if you post the full details of your system.
# 3  
Old 11-22-2018
Tried the options grab_all=on and repeat=on...nothing happen
My conf is
For host
Two vga: one ati for linxux,one Matrox for guest.
This is the guest xml

<domain type='kvm' id='35' xmlns:qemu=''>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
    <type arch='x86_64' machine='pc-i440fx-2.11'>hvm</type>
    <bootmenu enable='yes'/>
      <hidden state='on'/>
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>Opteron_G3</model>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='x2apic'/>
    <feature policy='require' name='tsc-deadline'/>
    <feature policy='require' name='hypervisor'/>
    <feature policy='require' name='arat'/>
    <feature policy='require' name='mmxext'/>
    <feature policy='require' name='fxsr_opt'/>
    <feature policy='require' name='pdpe1gb'/>
    <feature policy='require' name='3dnowext'/>
    <feature policy='require' name='3dnow'/>
    <feature policy='require' name='cmp_legacy'/>
    <feature policy='require' name='cr8legacy'/>
    <feature policy='require' name='3dnowprefetch'/>
    <feature policy='require' name='osvw'/>
    <feature policy='disable' name='monitor'/>
    <feature policy='disable' name='rdtscp'/>
    <feature policy='disable' name='svm'/>
  <clock offset='localtime'/>
    <disk type='file' device='floppy'>
      <driver name='qemu' type='raw'/>
      <source file='/tmp/vmwarevga32-kvm.img'/>
      <target dev='fda' bus='fdc'/>
      <alias name='fdc0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='unsafe'/>
      <source file='/home/user/.local/share/libvirt/images/Windows2000.qcow2'/>
      <target dev='hda' bus='ide'/>
      <boot order='2'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/tmp/pc.iso'/>
      <target dev='hdb' bus='ide'/>
      <boot order='1'/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    <controller type='fdc' index='0'>
      <alias name='fdc0'/>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
    <interface type='network'>
      <mac address='********'/>
      <source network='private' bridge='virbr3'/>
      <target dev='vnet2'/>
      <model type='pcnet'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    <graphics type='spice' port='5901' autoport='yes' listen='' keymap='it'>
      <listen type='address' address=''/>
      <gl enable='no' rendernode='/dev/dri/renderD128'/>
    <sound model='ac97'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
      <model type='vmvga' vram='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    <memballoon model='none'/>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <qemu:arg value='-object'/>
    <qemu:arg value='input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse'/>
    <qemu:arg value='-object'/>
    <qemu:arg value='input-linux,id=kbd1,evdev=/dev/input/by-id/usb-_USB_Keyboard-event-kbd,grab_all=on,repeat=on'/>
    <qemu:arg value='-object'/>
    <qemu:arg value='input-linux,id=joypad1,evdev=/dev/input/by-id/usb-Logitech_Logitech_R__Precision_TM__Gamepad-event-joystick,grab_all=on,repeat=on'/>

The machine is old windows 2000 because I like to play only with old games
But I've tried also with XP and Windows8.1
Same result,keyboard ok,mouse ok..joystick not,Windows 2000 cannot see it
XP and 8.1 see it as mouse!

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Linux

Vfio passtrough gpu, a question about hdmi

The situation videocard n1 Nvidia Ge-force(used on host linux) videocard n2 Ati radeon(used on guest windows 7) host is Slackware 14.2,kernel 4.18.15 I had set vfio to pass a ati card to windows7 guest Configure /etc/modprobe.d/vfio.conf options vfio-pci... (1 Reply)
Discussion started by: Linusolaradm1
1 Replies

2. Linux

Vga passtrough with only one monitor,is possible?

I have one monitor,two vga cards,one is nvidia(host) the other ati rs450(guest),I use this script for use a vm windows with a native gpu(the ati rs450) I see this video and seems to be possible using only one monitor,but I don't understand how to do The video QEMU VGA passthrough without a... (0 Replies)
Discussion started by: Linusolaradm1
0 Replies

3. UNIX for Dummies Questions & Answers

Windows to Linux remote console using VNC brings up blank console screen with only mouse pointer

:confused:Hi This was installed on the Linux box a few weeks back by a guy that no longer works for us. All worked fine until last week. Now when we connect its just a blank screen with no icons. I get a whole bunch of errors when starting the service too: Tue Feb 23 14:29:45 2010 ... (1 Reply)
Discussion started by: wbdevilliers
1 Replies

4. UNIX for Dummies Questions & Answers

Changing middle mouse button for pasting to right mouse button in cygwin rxvt

Hi, I'm using rxvt in Cygwin and I'm wondering how to change my mouse bindings from the middle button for pasting to the right button. The main reason why I want to do this is because my laptop doesn't have a middle mouse button. Thanks for any help! (2 Replies)
Discussion started by: sayeo
2 Replies

5. Shell Programming and Scripting

Building a better mouse trap, or How many lines of code does it take to trap a mouse?

Hello all, I'm hoping to get a little insight from some of the wily veterans amongst you. I've written a script to check for new outgoing files to our vendors located on our ssl server. It seems to be working ok, but the final question here, will be one of logic, and/or a better way to... (4 Replies)
Discussion started by: mph
4 Replies

Featured Tech Videos