Unraid 6.10. Win10 VM not able to start Intel BT/WIFi 3168 Device Error Code 10


Go to solution Solved by ghost82,

Recommended Posts

Dear all,

 

i have a weired issue and was not able to resolve this on my own so far. i think it is related to this already existing topic

alright lets share some information:

unraid 6.10 running a windows 10 1909 (i think, maybe 2104) vm with qemu q35-6.2.

i have linked some usb devices into this machine,

- 1x usb mouse

- 1x rgb adruino board

- and the problematic bluetooth adapter which sits together with the wifi adapter as onboard device on the motherboard

 

this is how it looks in the gui

as far as i understood i have to forward both devices (bluetooth and wifi) because we can not split this device, this should be done right?

 

notice: the logitech mouse as well as the arduino board run totally fine

 

when the vm is started, the wifi devices seems to work fine, no errors in the device manager, but when trying to active the wifi it is not activating nor searching for wifi networks

 

the bluetooth adapter directly fails to run, error code 10 inside the device manager

 

what have i done so far, as far as i remember:

- restarted unraid completly

- stopped unraid, real shutdown, and started again

- deleted both devices completly from the device manager including the drivers

- rerun the virtio guest tools including the drivers

- manually checked for updates on the newest virt io 215 for bluetooth/wifi and all the other known devices

- unticked the devices, relaunched vm, stop and readded the devices to force a new installation

- tried to follow the solution on the linked topic above, but i was not able to change the bus, it did not allow it cause the bus number did not exists,

 

i am not able to copy & paste the xml sheet, since 6.10, it always copies "-" instead of the content, so i have added this screenshot

 

I would be thankfull for any help or suggestion to find the cause of this issue.

 

best regards

Edited by astronax
added screenshot
Link to comment

you are right, diagnostics attached

 

 

related maschine is qemu -> kodi

 

i was not able to add a screenshot to the initial topic so i have attached it here, sorry for the german gui, but it is only showing error code 10 <.< guess this is not an issue to read

errorcode10.png

Edited by astronax
diagnostics no longer needed
Link to comment
37 minutes ago, astronax said:

diagnostics attached

much better :D

in your vm log you have this:

2022-05-23T17:00:13.773914Z qemu-system-x86_64: libusb_set_interface_alt_setting: -5 [NOT_FOUND]

Searching for that error it seems common when passing through that usb bluetooth device (vendor id 0x8087) and attaching it to a virtual usb controller inside the vm.

A reddit user proposed this fix:

<qemu:capabilities>  
  <qemu:del capability='usb-host.hostdevice'/>  
</qemu:capabilities>

that seems to work for some users, so it's worth a try!

 

Open your kody vm settings, switch to xml view (advanced), top right, before the closing </domain> tag paste the above, so it looks like:

 

  <qemu:capabilities>  
    <qemu:del capability='usb-host.hostdevice'/>  
  </qemu:capabilities>
</domain>

 

Boot the vm and report back, if it doesn't work attach new diagnostics please.

 

Note that you could have better luck if you could passthrough the whole usb controller to which your usb bluetooth is attached, instead of passing through the single usb bluetooth device.

Edited by ghost82
Link to comment
12 hours ago, ghost82 said:

From your latest attachment it doesn't seem tou pasted and saved the block.

well what shall i say, i have added the block to the end , and clicked save.

point of proof added, but i do see what you mean, it is not saving as expected

maybe this corelates with the issue that i can not copy anything from the xml to the clipboard, this issue started with 6.10, it was working fine with 6.9.2

 

is there a way to change the xml via the console directly?

GIF.gif

Link to comment
2 hours ago, astronax said:

well what shall i say, i have added the block to the end , and clicked save.

Don't take it bad :D I should had ask...

It seems you are not alone, it seems someone else is having issue in saving the xml with custom things...I cannot access my unraid and test myself, sorry, I should had test myself first.

You can open a bug in the proper section.

 

In the meantime, yes you can try the virsh command to edit your vm, from an unraid terminal:

virsh edit 'name of the vm'

make your edits then press ctrl+o to save it.

Try to rerun the command and check if your edits are saved.

Link to comment
  • Solution

@astronax I think I found the culprit for the issue "xml is not saving".

I had a spare usb key with unraid 6.10.1, I had also an additional pendrive, so made the array on that usb pendrive :D just to test the qemu/libvirt behavior.

Just a note on my above post: one, before using the virsh command should export nano as default editor with this command (in terminal):

export EDITOR='/usr/bin/nano'

then run the virsh command.

--------

However it is not needed to run the virsh command and unraid gui in xml view can be used.

 

The issue is that the domain type line is stripped by unraid.

 

When you view your xml in unraid make 2 changes:

1. on the top you will see a line with this:

<domain type='kvm'>

Change it to:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

 

Then to the bottom add:

  <qemu:capabilities>  
    <qemu:del capability='usb-host.hostdevice'/>  
  </qemu:capabilities>

before the </domain> tag.

 

This time it will save.

 

I found this because using the virsh command failed to validate too, because qemu schemas was not defined.

 

PS: not sure if this will solve your bluetooth/wifi issue, just try...

Edited by ghost82
  • Like 1
  • Thanks 1
Link to comment

that is the totally the solution

i was able to save and revisit the xml after adding the additional xmlns tag into the domain

and yes the qemu capabilites, what ever they do, i do not understand it to be honest, but the bluetooth error code 10 is gone, and i was able to connect my bluetooth devices again.

 

thank you so much for resolving this issue

 

PS: note if someone else wants to use this solution for his wifi controller, this did not work, the wifi controller is not return an error code, but i was not able to activate the wifi, but it is not needed for purposes so regarding the BT issue it is resolve 👨‍⚕️

  • Like 1
Link to comment

About the wifi issue, maybe changing the target bus, as pointed by you in your first message, could fix it.

Unfortunately you deleted the diagnostics file so I cannot check at what address the wifi is, but from your gif it should be at source 03:00.0 and target 07:00.0.

You have another device passed through at source 01:00.0 (maybe an usb controller?).

 

If the wifi is at 03:00.0 in the host you can try to make it "built-in" in the vm (i.e. change the target address to bus 0), if it will work or not it will depend on how the windows driver for the wifi behaves.

 

So you could change from this:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </hostdev>

 

to this:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </hostdev>

 

put it in bus 0, slot 2 which should be free

Edited by ghost82
Link to comment

just for fun, i changed the bus/slot but in the end the wifi controller now reports error code 10, kind a de ja vu :D, it was not reporting any error before this change, so i reverted it back.

i dont see any error inside the windows event logs regarding the wifi module, neither in the qemu logs, i does no matter for me, so lets leave it as it is ;)

  • Like 1
Link to comment
1 minute ago, ghost82 said:

Thanks for testing, I read again the link in the first post and that user solved not by putting it on bus 0, but the opposite....sorry....you already had it on a bus different than 0, so no more idea...but luckily having wifi is not a must for this vm.

absolutely :D

Link to comment
  • 4 weeks later...

This worked for me too with a cheap eBay Bluetooth 5.0 USB dongle, it would passthrough to a Win10 VM but had the error 10 code "could not start device".

My cheap eBay dongle reported in device manager properties  as "Cambridge Silicon Radio Ltd." for reference.

As detailed above in this post adding the 2 lines of code in the XML did the trick.

 

Big shout to ghost82 for the solution :)

Link to comment

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.