casperse Posted April 13, 2022 Share Posted April 13, 2022 (edited) Hi All UPDATE: Known problem from 6.10.RC1 - still a problem in RC4 I took the plunge and upgraded to 6.10.rc4 and I am getting this in the logfile (My hope was to get my UI up on my local monitor again if I upgraded, - This actually resolved the local UI is now working!) But the error I have after reboot is this: kernel: usb 1-1: usbfs: process 17779 (qemu-system-x86) did not claim interface 1 before use Its filling up and have been running since my reboot I found that my Hassio VM - running Home assistant was the cause of this since its using the USB After stopping this VM it stopped complaining about the USB Apr 13 14:38:27 SERVER kernel: br0: port 2(vnet0) entered disabled state Apr 13 14:38:27 SERVER kernel: device vnet0 left promiscuous mode Apr 13 14:38:27 SERVER kernel: br0: port 2(vnet0) entered disabled state Apr 13 14:38:27 SERVER avahi-daemon[15666]: Withdrawing address record for fe80::fc27:ebff:feb8:e5c9 on vnet0. Apr 13 14:38:27 SERVER kernel: usb 1-11: reset full-speed USB device number 4 using xhci_hcd Apr 13 14:38:27 SERVER kernel: cdc_acm 1-11:1.0: ttyACM0: USB ACM device Apr 13 14:38:28 SERVER kernel: usb 1-1: reset full-speed USB device number 10 using xhci_hcd Apr 13 14:38:28 SERVER kernel: cdc_acm 1-1:1.0: ttyACM1: USB ACM device Apr 13 14:38:28 SERVER usb_manager: Info: rc.usb_manager vm_action Hassio 1 stopped end - Apr 13 14:38:28 SERVER usb_manager: Info: rc.usb_manager VM Shutdown dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2421314 vm: Hassio 1 Apr 13 14:38:28 > usb_manager: Info: rc.usb_manager VM Shutdown 0658_0200 vm: Hassio 1 I am only using the USB manager plugin to control them in the VM (So I think thats the cause of the bug) [Plugin] USB_Manager - Plugin Support - Unraid I have included my diag. file here. Diagnostics-20220413-1450.zip Edited April 13, 2022 by casperse 1 Quote Link to comment
casperse Posted April 13, 2022 Author Share Posted April 13, 2022 (edited) Update: I disabled the "USB manager" plugin and selected the two USB in the Hassio VM and I still get the same error? So this USB passthrough in VM might be related to some other problem after upgrade of Unraid? Edited April 13, 2022 by casperse Quote Link to comment
casperse Posted April 13, 2022 Author Share Posted April 13, 2022 I can confirm that the USB problem is not related to the USB manager (I removed the plugin) and after a reboot I selected the USB from the VM: And then afterwards I get the log running forever: Apr 13 16:45:09 UNRAID kernel: usb 1-1: usbfs: process 19810 (qemu-system-x86) did not claim interface 1 before use Anyone have any way to fix this? - Would really like to keep the 6.10.rc4 but I need Home assistant to run the smart house 🙂 Quote Link to comment
casperse Posted April 13, 2022 Author Share Posted April 13, 2022 Seems to be a known problem back to 6.10.rc2? Seem strange that it works in 6.9.... Quote Link to comment
casperse Posted April 13, 2022 Author Share Posted April 13, 2022 I did the insert this in the XML for Home assistant if using the Conbee2 stick! </memballoon> placed under this line: <serial type='dev'> <source path='/dev/serial/by-id/usb-0000_0000-if00'/> <target type='usb-serial' port='1'> <model name='usb-serial'/> </target> <alias name='serial1'/> <address type='usb' bus='0' port='4'/> </serial> Get USB ID by console: ls /dev/serial/by-id/ But even if I got the VM started then Home assistant cant access the Conbee stick? 1 Quote Link to comment
casperse Posted April 13, 2022 Author Share Posted April 13, 2022 If anyone come here to get Home assistant working in a VM running UNraid 6.10,RC4 and you don't want to start over configuring your ZIGBEE HA then do this: https://community.home-assistant.io/t/conbee2-stick-dev-path-configuration-problem/411424 1 1 Quote Link to comment
SimonF Posted April 14, 2022 Share Posted April 14, 2022 12 hours ago, casperse said: Hi All UPDATE: Known problem from 6.10.RC1 - still a problem in RC4 I took the plunge and upgraded to 6.10.rc4 and I am getting this in the logfile (My hope was to get my UI up on my local monitor again if I upgraded, - This actually resolved the local UI is now working!) But the error I have after reboot is this: kernel: usb 1-1: usbfs: process 17779 (qemu-system-x86) did not claim interface 1 before use Its filling up and have been running since my reboot I found that my Hassio VM - running Home assistant was the cause of this since its using the USB After stopping this VM it stopped complaining about the USB Apr 13 14:38:27 SERVER kernel: br0: port 2(vnet0) entered disabled state Apr 13 14:38:27 SERVER kernel: device vnet0 left promiscuous mode Apr 13 14:38:27 SERVER kernel: br0: port 2(vnet0) entered disabled state Apr 13 14:38:27 SERVER avahi-daemon[15666]: Withdrawing address record for fe80::fc27:ebff:feb8:e5c9 on vnet0. Apr 13 14:38:27 SERVER kernel: usb 1-11: reset full-speed USB device number 4 using xhci_hcd Apr 13 14:38:27 SERVER kernel: cdc_acm 1-11:1.0: ttyACM0: USB ACM device Apr 13 14:38:28 SERVER kernel: usb 1-1: reset full-speed USB device number 10 using xhci_hcd Apr 13 14:38:28 SERVER kernel: cdc_acm 1-1:1.0: ttyACM1: USB ACM device Apr 13 14:38:28 SERVER usb_manager: Info: rc.usb_manager vm_action Hassio 1 stopped end - Apr 13 14:38:28 SERVER usb_manager: Info: rc.usb_manager VM Shutdown dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2421314 vm: Hassio 1 Apr 13 14:38:28 > usb_manager: Info: rc.usb_manager VM Shutdown 0658_0200 vm: Hassio 1 I am only using the USB manager plugin to control them in the VM (So I think thats the cause of the bug) [Plugin] USB_Manager - Plugin Support - Unraid I have included my diag. file here. Diagnostics-20220413-1450.zip 306.19 kB · 0 downloads Hi I am away at present but will look when back home around 23rd. Did you fix the issue? Quote Link to comment
casperse Posted April 14, 2022 Author Share Posted April 14, 2022 Yes thanks! I had to do the XML changes to get the serial USB device added in the VM - and then the HA process above to change the Zigbee HA path and keeping the DB for all my existing devices 🙂 - so I am really happy to now be on 6.10.rc4 Quote Link to comment
SimonF Posted April 22, 2022 Share Posted April 22, 2022 (edited) On 4/14/2022 at 12:59 PM, casperse said: Yes thanks! I had to do the XML changes to get the serial USB device added in the VM - and then the HA process above to change the Zigbee HA path and keeping the DB for all my existing devices 🙂 - so I am really happy to now be on 6.10.rc4 Are you running on RC4 now? can provide output of cat /etc/libvirt/hooks/qemu and ls /etc/libvirt/hooks/qemu.d/ I think I am missing removal of the 6.9.2 vers updates during upgrade to 6.10 vers Just checked should be removing. Edited April 22, 2022 by SimonF Quote Link to comment
casperse Posted April 26, 2022 Author Share Posted April 26, 2022 On 4/22/2022 at 4:59 PM, SimonF said: Are you running on RC4 now? can provide output of cat /etc/libvirt/hooks/qemu and On 4/22/2022 at 4:59 PM, SimonF said: I think I am missing removal of the 6.9.2 vers updates during upgrade to 6.10 vers Just checked should be removing. Yes of course, anything to help #!/usr/bin/env php <?php #begin USB_MANAGER if ($argv[2] == 'prepare' || $argv[2] == 'stopped'){ shell_exec("/usr/local/emhttp/plugins/usb_manager/scripts/rc.usb_manager vm_action '{$argv[1]}' {$argv[2]} {$argv[3]} {$argv[4]} >/dev/null 2>&1 & disown") ; } #end USB_MANAGER if (!isset($argv[2]) || $argv[2] != 'start') { exit(0); } $strXML = file_get_contents('php://stdin'); $doc = new DOMDocument(); $doc->loadXML($strXML); $xpath = new DOMXpath($doc); $args = $xpath->evaluate("//domain/*[name()='qemu:commandline']/*[name()='qemu:arg']/@value"); for ($i = 0; $i < $args->length; $i++){ $arg_list = explode(',', $args->item($i)->nodeValue); if ($arg_list[0] !== 'vfio-pci') { continue; } foreach ($arg_list as $arg) { $keypair = explode('=', $arg); if ($keypair[0] == 'host' && !empty($keypair[1])) { vfio_bind($keypair[1]); break; } } } exit(0); // end of script function vfio_bind($strPassthruDevice) { // Ensure we have leading 0000: $strPassthruDeviceShort = str_replace('0000:', '', $strPassthruDevice); $strPassthruDeviceLong = '0000:' . $strPassthruDeviceShort; // Determine the driver currently assigned to the device $strDriverSymlink = @readlink('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/driver'); if ($strDriverSymlink !== false) { // Device is bound to a Driver already if (strpos($strDriverSymlink, 'vfio-pci') !== false) { // Driver bound to vfio-pci already - nothing left to do for this device now regarding vfio return true; } // Driver bound to some other driver - attempt to unbind driver if (file_put_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/driver/unbind', $strPassthruDeviceLong) === false) { file_put_contents('php://stderr', 'Failed to unbind device ' . $strPassthruDeviceShort . ' from current driver'); exit(1); return false; } } // Get Vendor and Device IDs for the passthru device $strVendor = file_get_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/vendor'); $strDevice = file_get_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/device'); // Attempt to bind driver to vfio-pci if (file_put_contents('/sys/bus/pci/drivers/vfio-pci/new_id', $strVendor . ' ' . $strDevice) === false) { file_put_contents('php://stderr', 'Failed to bind device ' . $strPassthruDeviceShort . ' to vfio-pci driver'); exit(1); return false; } return true; } could do the list /bin/ls: cannot access '/etc/libvirt/hooks/qemu.d/': No such file or directory? Quote Link to comment
SimonF Posted May 1, 2022 Share Posted May 1, 2022 On 4/26/2022 at 6:36 PM, casperse said: /bin/ls: cannot access '/etc/libvirt/hooks/qemu.d/': No such file or directory? This is fine as you are not on 6.10rc. When you upgrade the entries should be removed from the qemu file and a new file created in qemu.d Quote Link to comment
casperse Posted May 8, 2022 Author Share Posted May 8, 2022 On 5/1/2022 at 2:04 PM, SimonF said: This is fine as you are not on 6.10rc. When you upgrade the entries should be removed from the qemu file and a new file created in qemu.d I was on RC4 I am now on RC5 Do you need anymore info or additional running commands from me? :--) Quote Link to comment
SimonF Posted May 8, 2022 Share Posted May 8, 2022 1 hour ago, casperse said: I was on RC4 I am now on RC5 Do you need anymore info or additional running commands from me? :--) I dont think so. Are you seeing any issues? cat /etc/libvirt/hooks/qemu and ls /etc/libvirt/hooks/qemu.d/ There should be no entries in the qemu file and a file in qemu.d dir called usb_manager. Quote Link to comment
casperse Posted May 10, 2022 Author Share Posted May 10, 2022 Yes I get this no - no further problems 🙂 Quote Link to comment
PR. Posted May 20, 2022 Share Posted May 20, 2022 Thanks for this fix, the issue still seems to be in 6.10 final, and after making the XML adjustments and the naming changes in my HA file my Zigbee is back up and running. Quote Link to comment
nmethod Posted May 29, 2022 Share Posted May 29, 2022 (edited) This is definitely still an issue -- currently reading through past threads after upgrading to 6.10.2 and being flooded with the following messages and an unusable ConBee II: May 29 10:32:30 Unraid kernel: usb 2-1.4: usbfs: process 32050 (qemu-system-x86) did not claim interface 1 before use Solution as posted in this thread (and others) was to obtain the proper device path for the ConBee II and manually add this in to the virtual machine XML as per https://community.home-assistant.io/t/unraid-vm-conbee-ii-stick-dev-path-change-configuration-problem/411424. Edited May 29, 2022 by nmethod Quote Link to comment
fgy41 Posted May 29, 2022 Share Posted May 29, 2022 Even after the solution in the link from the previous post I still receive a flood of the error that nmethod posted above. Running Unraid 6.10.2 Quote Link to comment
alex3305 Posted May 31, 2022 Share Posted May 31, 2022 I just tried upgrading to Unraid 6.10.2 but experiencing the same issue. Also with the USB Manager plugin. IMHO editing the XML for device mapping is quite a poor solution. I hope the Unraid developers can provide a real bug fix. Luckily downgrading Unraid is a breeze, so thanks for that. Quote Link to comment
SimonG Posted June 3, 2022 Share Posted June 3, 2022 A backward step for me. Conbee II working reliably (GUI or XML edit) with Unraid 6.9.2. Can't get either option working under 6.10.2. Hoping for an easy fix in the future. In the meantime I've downgraded. Quote Link to comment
twistedsanity Posted June 5, 2022 Share Posted June 5, 2022 Unfortunately I have had to downgrade as well, the XML, config edits just didn't work for me (strangely nothing relevant in core.config_entries to edit). I will hopefully look to upgrade once a reliable solution is found. Quote Link to comment
fgy41 Posted June 15, 2022 Share Posted June 15, 2022 Looks like this is still an issue with 6.10.3 Is there anything else that can be tried to pass the conbee usb through without error? Quote Link to comment
Con1924 Posted June 15, 2022 Share Posted June 15, 2022 9 hours ago, fgy41 said: Looks like this is still an issue with 6.10.3 Is there anything else that can be tried to pass the conbee usb through without error? Yeah, can firm I have this in 6.10.3 RC1 too Quote Link to comment
fgy41 Posted June 17, 2022 Share Posted June 17, 2022 I was able to find a solution that worked for me. https://community.home-assistant.io/t/solved-conbee-2-fails-to-connect-to-zha-ha-in-unraid-vm/431276/2#final-edit-my-solution-1 The post is by maxistviews (marked as Solution) Note: You will need to remove and readd the the ZHA integration. During the initial configuration of ZHA the Conbee showed up as: /dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL..... Quote Link to comment
SimonF Posted June 17, 2022 Share Posted June 17, 2022 3 hours ago, fgy41 said: I was able to find a solution that worked for me. https://community.home-assistant.io/t/solved-conbee-2-fails-to-connect-to-zha-ha-in-unraid-vm/431276/2#final-edit-my-solution-1 The post is by maxistviews (marked as Solution) Note: You will need to remove and readd the the ZHA integration. During the initial configuration of ZHA the Conbee showed up as: /dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL..... Do you still pass thru the usb device or just the serial entry. Quote Link to comment
jcamer Posted June 17, 2022 Share Posted June 17, 2022 2 minutes ago, SimonF said: Do you still pass thru the usb device or just the serial entry. This solution has so far worked for me as well, with just the serial entry. I feel like going from 10.1 to 10.2 broke it again and I had to redo it and I was nervous going to 10.3, but it went smoothly. I do wish just adding the usb device would work as expected (or as I expect it to), but I guess if the serial way works for now, I'll go with it. 1 Quote Link to comment
Recommended Posts
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.