Keyboard not working in Windows VM, please help!


Recommended Posts

Hello,

 

So I just bought and setup latest Unraid beta, installed Windows 10 using VNC. I passed through my graphics card and my Razer mouse and Corsair Keyboard, infact I specifically got a different brand keyboard because I heard Unraid has trouble passing through devices with same vendor.

 

My keyboard lights up  but doesn't work. Any help is appreciated.

 

XML:

 

<domain type='kvm'>
  <name>Windows 10</name>
  <uuid>5649dd49-0e96-e06c-58f3-12d7462f2292</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>12582912</memory>
  <currentMemory unit='KiB'>12582912</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>7</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
    <vcpupin vcpu='4' cpuset='5'/>
    <vcpupin vcpu='5' cpuset='6'/>
    <vcpupin vcpu='6' cpuset='7'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/5649dd49-0e96-e06c-58f3-12d7462f2292_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor id='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='7' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/Win10_1511_2_English_x64.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.118-1.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:84:1e:c5'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='connect'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1532'/>
        <product id='0x0043'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1b1c'/>
        <product id='0x1b37'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

Link to comment

Logs:

 

2016-07-07T05:25:07.201024Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/1-9/bConfigurationValue failed ret=-1 errno=2
2016-07-07T05:26:08.809308Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-07T05:26:08.809328Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-07T05:26:08.809335Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/1-10/bConfigurationValue failed ret=-1 errno=2
2016-07-07T05:27:21.472996Z qemu-system-x86_64: terminating on signal 15 from pid 11621
2016-07-07 05:27:21.520+0000: shutting down
2016-07-07 05:28:00.415+0000: shutting down
2016-07-07 05:28:08.394+0000: shutting down
2016-07-07 05:28:20.721+0000: shutting down
2016-07-07 05:28:39.517+0000: starting up libvirt version: 1.3.1, qemu version: 2.5.1, hostname: Tower
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/local/sbin/qemu -name 'Windows 10' -S -machine pc-i440fx-2.5,accel=kvm,usb=off,mem-merge=off -cpu host,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=none -drive file=/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/etc/libvirt/qemu/nvram/5649dd49-0e96-e06c-58f3-12d7462f2292_VARS-pure-efi.fd,if=pflash,format=raw,unit=1 -m 12288 -realtime mlock=on -smp 7,sockets=1,cores=7,threads=1 -uuid 5649dd49-0e96-e06c-58f3-12d7462f2292 -nographic -no-user-config -nodefaults -chardev 'socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-Windows 10/monitor.sock,server,nowait' -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-hpet -no-shutdown -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x7 -device ich9-usb-uhci2,masndows 10/org.qemu.guest_agent.0,server,nowait' -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0x5 -device vfio-pci,host=01:00.1,id=hostdev1,bus=pci.0,addr=0x6 -device usb-host,hostbus=1,hostaddr=8,id=hostdev2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -msg timestamp=on
Domain id=6 is tainted: high-privileges
Domain id=6 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
2016-07-07T05:29:57.762051Z qemu-system-x86_64: terminating on signal 15 from pid 11621
2016-07-07 05:29:58.011+0000: shutting down
2016-07-07 05:30:52.687+0000: starting up libvirt version: 1.3.1, qemu version: 2.5.1, hostname: Tower
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/local/sbin/qemu -name 'Windows 10' -S -machine pc-i440fx-2.5,accel=kvm,usb=off,mem-merge=off -cpu host,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=none -drive file=/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/etc/libvirt/qemu/nvram/5649dd49-0e96-e06c-58f3-12d7462f2292_VARS-pure-efi.fd,if=pflash,format=raw,unit=1 -m 12288 -realtime mlock=on -smp 7,sockets=1,cores=7,threads=1 -uuid 5649dd49-0e96-e06c-58f3-12d7462f2292 -nographic -no-user-config -nodefaults -chardev 'socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-Windows 10/monitor.sock,server,nowait' -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-hpet -no-shutdown -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x7 -device ich9-usb-uhci2,masndows 10/org.qemu.guest_agent.0,server,nowait' -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0x5 -device vfio-pci,host=01:00.1,id=hostdev1,bus=pci.0,addr=0x6 -device usb-host,hostbus=1,hostaddr=8,id=hostdev2 -device usb-host,hostbus=1,hostaddr=9,id=hostdev3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -msg timestamp=on
Domain id=7 is tainted: high-privileges
Domain id=7 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
2016-07-07T05:31:25.037547Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-07T05:31:25.037587Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-07T05:31:25.037594Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/009: No such device
2016-07-07T05:40:16.355059Z qemu-system-x86_64: terminating on signal 15 from pid 11621
2016-07-07 05:40:16.662+0000: shutting down
2016-07-07 06:20:11.141+0000: starting up libvirt version: 1.3.1, qemu version: 2.5.1, hostname: Tower
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/local/sbin/qemu -name 'Windows 10' -S -machine pc-i440fx-2.5,accel=kvm,usb=off,mem-merge=off -cpu host,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=none -drive file=/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/etc/libvirt/qemu/nvram/5649dd49-0e96-e06c-58f3-12d7462f2292_VARS-pure-efi.fd,if=pflash,format=raw,unit=1 -m 12288 -realtime mlock=on -smp 6,sockets=1,cores=3,threads=2 -uuid 5649dd49-0e96-e06c-58f3-12d7462f2292 -nographic -no-user-config -nodefaults -chardev 'socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-Windows 10/monitor.sock,server,nowait' -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-hpet -no-shutdown -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x7 -device ich9-usb-uhci2,masndows 10/org.qemu.guest_agent.0,server,nowait' -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0x5 -device vfio-pci,host=01:00.1,id=hostdev1,bus=pci.0,addr=0x6 -device usb-host,hostbus=1,hostaddr=8,id=hostdev2 -device usb-host,hostbus=1,hostaddr=10,id=hostdev3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -msg timestamp=on
Domain id=8 is tainted: high-privileges
Domain id=8 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
2016-07-07T06:20:38.408642Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-07T06:20:38.408708Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-07T06:20:38.408711Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/1-10/bConfigurationValue failed ret=-1 errno=2
libusb: error [_get_usbfs_fd] File doesn't exist, wait 10 ms and try again
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/010: No such file or directory

 

Thanks.

Link to comment

Was the diagnostic made after you started the VM or before? If before, please start the VM and run the diagnostics again.

 

- Have you checked if the keyboard works in unraid console?

- How did you connect the keyboard? On USB3 ports, only one cable should be connected. On USB2 both cables connected.

- Have you connected the mouse in the pass-through port? If so, please remove it and try again.

- Are you running any USB hubs? or connected directly?

- Please post the output of the below command when connected through ssh to the server. From before starting the VM and after.

 

lsusb

Link to comment

Was the diagnostic made after you started the VM or before? If before, please start the VM and run the diagnostics again.

 

That makes sense, attached diagnostics zip with the vm running.

 

-

Have you checked if the keyboard works in unraid console?

 

Yep, works in Unraid GUI mode and console.

 

-

How did you connect the keyboard? On USB3 ports, only one cable should be connected. On USB2 both cables connected.[\quote]

 

Tried both USB 2 and 3 ports in both 1 and 2 configurations.

 

-

Have you connected the mouse in the pass-through port? If so, please remove it and try again.

 

When the mouse is connected in Passthrough, mouse works, keyboard doesn't. Same as when it is connected to a separate USB port.

 

-

Are you running any USB hubs? or connected directly?

 

Connected directly at the back to the 2.0 ports.

-

Please post the output of the below command when connected through ssh to the server. From before starting the VM and after.

 

Before starting the VM:

 

 

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0781:5583 SanDisk Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 1b1c:1b37 Corsair 
Bus 001 Device 002: ID 1532:0043 Razer USA, Ltd 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

After logging into windows VM:

 

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0781:5583 SanDisk Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 009: ID 1b1c:1b37 Corsair 
Bus 001 Device 002: ID 1532:0043 Razer USA, Ltd 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

It looks like the Corsair device id is changing after the VM is started.

 

 

tower-diagnostics-20160707-0811.zip

Link to comment
  • 7 months later...
  • 2 years later...
  • 9 months later...
  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.