Baltostar

Members
  • Posts

    19
  • Joined

  • Last visited

Posts posted by Baltostar

  1.  

    3. Shutdown VM:

    • Enable GPU passthrough via regular VM editor
    • Connect Vive through USB 2.0 motherboard port
    • Enable all Vive components via VM editor (take note of 0x2c87 & 0x2101 duplicated devices)
    • Go to Tools -> System Devices -> Scroll down to USB Devices
    • Take note of the "Bus 002 Device 003" for the IDs listed above
    • Go to Edit XML for the VM and add:

    <address bus='1' device='52'/>

    after the 4 entries (two for 0x2c87 and two for 0x2101)

    <hostdev mode='subsystem' type='usb' managed='no'>
          <source>
            <vendor id='0x0bb4'/>
            <product id='0x2c87'/>


    • (Change the Bus and Device #'s to whatever yours says in System Devices

     

    The script I wrote was to detect and attach the vive components to the PC because of one key issue.

    I discovered that editing the xml and specifying the IDs will work but only as you don't change anything on your pc configuration. If you unplug any of the vive USBs and plug them back in, you will loose connection to your vive.  The script is to attach the vive to the running VM without reboot.

    If you do reboot your VM, it will give a device error because the USB Vive is registered as a different ID when you plug it back in.

     

    Do you have time to test unplugging the Vive, rebooting the VM and confirming that it will give you an XML error when you attempt to start?

    Then using the script to attach the vive back to your running VM.

     

    If everything works for you at that point, I'll set up a new windows 10 to confirm the process. After that I'll update the main post and reference your contribution. Thank you.

  2. I'm not sure if this is a bug or a feature request.

     

    When running with 'Ransomware Protection' configured to create file shares and files. That plugin creates files with same name but different camel casing. Duplicate files with different casing is something that 'Fix Common Problems' is designed to find.

     

    I want to exclude Fix Common Problems from searching my 'Ransomware Protection' created folders that have these incorrect casing issues are reporting on.

     

    I added the folders to the 'Permission Test/Fix Excluded On' section however they are still scanned for the same files with different capitalization. This means that the plugin will continue to report errors on these folders so I will always have to review results instead of relying on a pass fail message.

     

    If 'Permission Test/Fix Excluded On' being the only excluding option also applies to the capitalization search, then this is a bug because it isn't excluding it from the search. However if that that isn't the case, then the feature request is for adding an excluded section for the Capitalization scan.

  3. Hi I am thinking of getting a vive or occulus.

     

    So with a USB controller passed through does  vive work fine in the VM?

    I don't have any other gaming machine other than my VM ,so I would like to be sure I can use it with a VM okay.

    Also, what do you think of occulus vs vive? Sorry don't know a lot about VR.

     

    The best way to run the vive on a VM is by passing the USB controller. Some controllers still have issues. Even without running on a VM, there can be issues. I pass a USB 3.1 controller on my new ASUS x99 board and run my vive off that. I started this post when I didn't have such options with my older x99 ASRock board.

     

    If you pass a USB 2/3 controller though and you still have issues, then consider buying one of the PCIe USB 3.1 cards and passing that though.

    https://www.reddit.com/r/Vive/comments/4l0c68/psa_getting_a_pcie_usb_3_card_solved_all_my_vive/

     

    To be honest with you. It took me 5 months just to get my setup working due to the motherboard dropping a GPU and crashing my machine at random intervals, that once I had it working, i set up the Vive and haven't touched the occulus yet. It is still in its plastic wrapping. I've been waiting for the touch sensors on the occulus.

     

    The vive was just on sale, during Black Friday.  If you do get the vive, don't get two if you will be using them in the same room because the lighthouses will interfere with each other.

  4.  

    USB Devices

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 002: ID 0bb4:2744 HTC (High Tech Computer Corp.) 
    Bus 001 Device 003: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
    Bus 001 Device 004: ID 0bb4:2134 HTC (High Tech Computer Corp.) 
    Bus 001 Device 005: ID 0bb4:0306 HTC (High Tech Computer Corp.) 
    Bus 001 Device 006: ID 28de:2000  
    Bus 001 Device 007: ID 0424:274d Standard Microsystems Corp. 
    Bus 001 Device 008: ID 0bb4:2c87 HTC (High Tech Computer Corp.) 
    Bus 001 Device 009: ID 0d8c:0012 C-Media Electronics, Inc. 
    Bus 001 Device 010: ID 0bb4:2c87 HTC (High Tech Computer Corp.) 
    Bus 001 Device 011: ID 28de:2101  
    Bus 001 Device 012: ID 28de:2101  
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 002 Device 002: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
    Bus 002 Device 003: ID 0781:5590 SanDisk Corp. 
    Bus 002 Device 004: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub

     

    My command: mapusb viveTempFolder '0bb4 0d8c 0424 28de' '1 GPU Middle WIN 10'
    
    Based on your post. These are the Vive devices:
    
    [b]Devices that normal passing the USB works fine because the ids are different.[/b]
    Bus 001 Device 002: ID 0bb4:2744 HTC (High Tech Computer Corp.)   #Identified by row containing: 0bb4
    Bus 001 Device 004: ID 0bb4:2134 HTC (High Tech Computer Corp.)   #Identified by row containing: 0bb4
    Bus 001 Device 005: ID 0bb4:0306 HTC (High Tech Computer Corp.)   #Identified by row containing: 0bb4
    Bus 001 Device 007: ID 0424:274d Standard Microsystems Corp.        #Identified by row containing: 0424 
    Bus 001 Device 009: ID 0d8c:0012 C-Media Electronics, Inc.                #Identified by row containing: 0d8c 
    
    [b]This is the first source of frustration with passing vive to VM. They reused the same USB component here twice[/b]
    Bus 001 Device 008: ID 0bb4:2c87 HTC (High Tech Computer Corp.)   #Identified by row containing: 0bb4
    Bus 001 Device 010: ID 0bb4:2c87 HTC (High Tech Computer Corp.)   #Identified by row containing: 0bb4
    Issue here is same IDs and no name so it doesn't show up on GUIs
    Bus 001 Device 011: ID 28de:2101                                                  #Identified by row containing: 28de
    Bus 001 Device 012: ID 28de:2101                                                  #Identified by row containing: 28de
    
    No name so it doesn't show up on GUI.
    Bus 001 Device 006: ID 28de:2000                                                  #Identified by row containing: 28de
    

     

    If your using my script. the command would be

    #I had the script as a function for testing, so I use source to make that function available. The viveTempFolder can be left like that. it will create a folder with that name to store xml configs for debugging reasons. The only thing i changed from my use of this is the VM name at the end. When the function is ran, it will attach all USB devices containing lines with one of '0bb4 0d8c 0424 28de' to your vm 'Steam-WIN10'. USB devices already attached will report errors that we ignore and the ones that aren't attached are attached. If you start running out of USB addresses, then reboot.
    
    source mapusb.sh
    mapusb viveTempFolder '0bb4 0d8c 0424 28de' 'Steam-WIN10'
    

     

     

     

     

     

     

     

  5. When I started this guide, the script worked and I had success. The vive was very touchy. As soon as I started to do anything like update firmware or troubleshooting steps, everything went wrong. The Vive software tells the devices to disconnect or reboot because they physically become disconnected from the computer for a moment. When they come back, they are assigned new USB IDs and are not automatically connected back to that VM. I would have to run the script again to reattach the devices at that time.

     

    The short of that experiences is: Do not update firmware while doing USB passthough. The trouble shooting steps will cause more headaches too.

     

    The officalle best way to do things is to pass the USB controller itself. The new Unraid updates keep your USB Controller passthough settings after you set them within your XML and no longer clear them when you view /edit vm from the GUI.

     

     

    If you can, even if it is temporary, set up your vive / room with USB Controller passthough. Then if you must, switching back to the script approach will be more stable because the vive is already configured on the VM. (Somewhat speculation based on what I can remember)

     

    I bought a new ASUS board and that solved all my GPU problems and it had a USB 3.1 controller that I was then able to use for the VIVE. Based on that, I haven't needed to shift back to using USB swapping to running VMS.

     

    There is a new plugin "in progress" out there on the "Community Applications" plugin called "Libvirt Hotplug USB". I don't know if that project will be able to handle the Vive when it is done.

    ___

    Speculation: I wonder if Vive passthough would be any better with direct connection to the box instead of using the repeater. One would loose the Bluetooth features of the vive, but that is how the portal VR laptop backpacks are configured. Note: They replace the Vive HDMI because that is special that will only work if connected to repeater box.

     

     

  6. Hi dude...do unraid see your manufacturer name on the graphic cards? Mine are g1 gigabyte 980ti and the unraid see them like this :

     

    "01:00.0 VGA compatible controller: NVIDIA Corporation Device 17c8 (rev a1)

    01:00.1 Audio device: NVIDIA Corporation Device 0fb0 (rev a1)

    02:00.0 VGA compatible controller: NVIDIA Corporation Device 17c8 (rev a1)

    02:00.1 Audio device: NVIDIA Corporation Device 0fb0 (rev a1)"

     

    And i have a problem like the vm who is using the 1st slot graphic card have like 1 fps in game. But this is only somethimes...i really don't know where is the issue.

     

    First slot pass though sometimes requires telling the video card to load a specified rom that you copied from the card before using a different slot. The video passthough is very touchy. I'm not an expert on the subject as this is my first go.

     

    Unraid reports my cards as follows and I have to pass both for the vm to see it.

    09:00.0 VGA compatible controller: NVIDIA Corporation Device 17c8 (rev a1)

    09:00.1 Audio device: NVIDIA Corporation Device 0fb0 (rev a1)

     

    _____

    For anyone watching this thread. I had overheating issues and am switching to water cooling. The parts come in September, so I'll resume the build then.

  7. I'm loving your concept! Passing thru a PCI-USB card to each of the 2 VMs might be the adequate solution. I suspect that you'll need PCI risers given your MoBo layout and how the GPUs are blocking the PCI slots (and most likely a chassis modification).

     

    Some questions out of pure curiosity: how is your core assignment for 4 VMs with 6 cores? 1 core each, leaving 2 free? Does 1 single core suffice your gaming needs when all the VMs are in use?

    PCI-USB

    I agree it is possible, but I have several reason why I don't want to do that, including how it would look.

     

    how is your core assignment for 4 VMs with 6 cores?

    6 cores is 12 Virtual cores to assign due to hyper threading. I'm giving each VM 2-3 virtual cores.

    Unless the games are designed for multi threading, 2 cores are usually enough for games.

     

    I won't be doing multi tasking on the VMs. Each VM will be running only its game. I don't even have Virus scanners on them. (I redo the image every 30 days to keep them clean and I don't browse the internet).

     

    Does 1 single core suffice your gaming needs when all the VMs are in use?

    Each VM will have at least 2 virtual cores out of my 12 virtual cores.

  8. We've purchased an HTC Vive here at Lime Technology and have been testing with it extensively.  So far, it's working fantastic!  USB controller pass through is going to be a requirement most likely (still no success with simple assignment), but when you do that, it works very very well!

     

    It is possible to run the vive though the VM without a dedicated usb controller. I'm running 4 GPUs without water block modifications. All 7 of my PCIe slots are used / covered. Unless I use a riser PCIe adapter, i won't be able to install a PCIe USB card.

     

    With that said, PCIe usb card passthough would defiantly work for the VIVE, but I wouldn't call it a requirement. I prefer being able to hot swap the VIVE between the running VMs.  I will be doing a better write up on this for the guide.  I made the script generic and posted it to show the concept of I'm doing.

  9. Migrating replies from my topic in wrong location.

     

    • General feedback if you like the concept or not. Knowing other users are interested is a good motivator.

    This sounds like exactly what is needed to help polish the USB handling of unraid's KVM management. So as not to duplicate work, I strongly suggest that you email limetech at their support address and point them to this post. I suspect they would be very supportive and possibly offer some suggestions so you don't reinvent the wheel if they already have some of this worked out for an upcoming release.

     

    • General feedback if you like the concept or not. Knowing other users are interested is a good motivator.

    This sounds like exactly what is needed to help polish the USB handling of unraid's KVM management. So as not to duplicate work, I strongly suggest that you email limetech at their support address and point them to this post. I suspect they would be very supportive and possibly offer some suggestions so you don't reinvent the wheel if they already have some of this worked out for an upcoming release.

     

    Have you thought about passing through an entire pcie controller?

     

    Not sure how many pcie slots you have available but I'm passing through an entire usb3 pcie card to a Windows vm. No need to worry about device ids and such and everything is plug and play within the vm

     

    With 4 GPUS, i didn't have any room to add in an additional usb 3 pcie card.  For that reason, i ended up having to manage all my USB devices under my existing motherboard usb 2 and usb 3 controllers. The script to migrate usb devices to a running VM simplified the work enough that I didn't bother me to much. On the positive side, this topic will help users with all their pcie slots full.

  10. Update: 2016/08/12 - I apologize for the delay on updates.  I had issues with my computer overheating. I've ordered my water cooling parts and will be resuming this in September when the parts come in.

     

    System Specs

    CPU: Intel Xeon E5-1650 V3 3.5GHz 6-Core Processor

    Cooling: Cooler Master Hyper 212 EVO 82.9 CFM Sleeve Bearing CPU Cooler

    Motherboard: ASRock X99WS-E EATX LGA2011-3 Motherboard

    Memory: Kingston ValueRam 64GB (1 x 16GB) Registered DDR-2133 Memory

    Unraid Cache SSDs: 2 x Samsung 850 EVO-Series 500GB 2.5" Solid State Drive

    Unraid HDDs: 2 x Segate Barracuda 3TB 3.5" 7200RPM Internal Hard Drive

    GPU: 4 x MSI GeForce GTX 980 TI 6GB Video Card

    Case: Cooler Master Cosmos II (Black) ATX Full Tower Case

    Power: EVGA SuperNOVA T2 1600W 80+ Titanium Certified Fully-Modular ATX Power Supply

     

    Bios Configuration

    Bios Version: 1.80 (I had issues with the 3.20 for newer CPU support and haven't gone back to retest)

    Bios Settings

    "Advanced" "CPU Configuration" "Intel Virtulization Technology": Enabled

    "Advanced" "Chipset Configuration" "VT-d": Enabled

    "Advanced" "Chipset Configuration" "Above 4G Decoding": Enabled  (Without this, I couldn't use one of my cards)

    "Advanced" "Chipset Configuration" Bios Setting "Above 4G Decoding Patch": Enabled (This allows the card that I couldn't passthough to passthough)

    "Boot": Change options so only Unraid 6 boots.

    Optional Performance Tweaks

    "Advanced" "Chipset Configuration" "SR-IOV Support": Enabled

    "OC Tweaker" "Muli Core Enhancement": Enabled

    IMPORTANT: Save your settings to a profile. After reboot, the only way I could get back to bios is if I clear CMOS. The "Above 4G Decoding" settings for me caused this.  I sometimes get keyboard/mouse not detected 5 beep warning from the montherboard. I can ignore this because they will be detected by the OS. After a clearning of the CMOS, I boot to bios, apply the saved settings and make any changes I have.

     

     

    Unraid6  Configuration

    "Settings" "VM Manager" "Libvirt Version": 1.2.18

    "Settings" "VM Manager" "GEMU Version": 2.3.0

    "Settings" "VM Manager" "Enable VMs": Yes

    "Settings" "VM Manager" "ISO Library Share": /mnt/user/ISOs/ (Created in guide)

    "Settings" "VM Manager" "VirtIO Windows Drivers ISO": /mnt/user/ISOs/virtio-win-0.1.117.iso (Created in guide)

    "Settings" "VM Manager" "Enable VMs": Yes

    "Settings" "VM Manager" "PCIe ACS Override": No (Default is 'No')

     

    VM GPU Passthrough Configuration

    "VMs" "Add VM"

    Name: Win10_VR1

    Template Settings: Advanced View (On gray bar on the right side)

    Operating System: "Windows 8.1 / 2012"  (This only effects the Icon displayed)

    CPU Mode: Host Passthrough

    CPUs: 2-3 per VM (Your Choice)

    Internal Memory: 13824 MB (Your Choice)

    Machine: i440fx-2.3  (Q35-2.3 was recommended for GPU passthrough, butI couldn't get it to work)

    BIOS: OVMF (Very Important)

    Hyper-V: No

    OS Install ISO: /mnt/user/ISOs/Windows10.iso  (Created in guide)

    VirtIO Drivers ISO:  /mnt/user/ISOs/virtio-win-0.1.117.iso (Created in guide)

    Primary vDisk Location: /mnt/user/vdisks/ (Created in guide)

    Primary VDisk Size: 40G (Your choice)

    Primary vDiskType: raw

    (With 4 cards, NVIDIA Device will be listed multiple times.  You need to make sure the same one on the drop down is selected for both.)

    -- My Motherboard Mapping to these drop downs --

    PCIE7: 2nd NVIDIA Device on the list (Top card) (This requires a modification to the XML to work, see guide)

    PCIE5: 1st NVIDIA Device on the list

    PCIE3: 4th NVIDIA Device on the list

    PCIE1: 3rd NVIDIA Device on the list

    Graphics Card: NVIDIA Device

    Sound Card: NVIDIA Device

    Network Bridge: br0 (To allow computers on this network to connect to the VM directly)

    USB Devices: A mouse and keyboard. Do not select anything releated to the VIVE. That needs to be assigned to the VM while it is running later.

     

    ---- Questions and Answers -----

    Q: When I attempt to pass though my VIVE, it wont work.

    A: If you use the web page for VM configuration, it won't allow you to pass though usb devices that don't have names. The VIVE has 2 of these no named usb devices.  It won't work because only half the components are passed. This guide will cover a work around to map the VIVE to a running VM. Alternatively you can buy a PCIe USB controller and pass that fully though to the VM.

     

    Q: Can I pass though my VIVE to a running VM?

    A: Yes, I will cover that process in this guide.

     

    Q: Have you thought about passing through an entire pcie controller?

    A: Yes, but I don't have open slots to add a new pcie usb 3 card, so I'm using the mother USB controllers instead. On my motherboard it isn't an option because of shared IOMMU groups.  I would rather have a solution that works without needing to give over the full controller so I can make use of all my USB slots and put each to the VMs I want.

     

    Q: Why don't you have any open PCIe slots to install a USB controller card?

    A: I'm using 4 air cooled GPus. They hang over all my free PCIe slots.

     

     

    ---- Future Sections -----

    VIVE Unraid 6 Hot Swap Setup

    This section documents how to make the VIVE semi hot swapable.

    - Setup usb mapping script to map VIVE to any running VM from the running VM

    -- Unraid Script

    -- Determine VIVE USB IDs.

    -- Windows script to connect to unraid via ssh and map VIVE to itself.

     

     

    Windows 10 Steam VM (Headless) with sound for Steam Link play.

    Oculus Rift Setup

     

    ----- WIP below ---

     

    Topics in this post:

    - Assigning USB Devices to a running VM

        - Vive Example

        - Oclus Example

    - Single Card Passthough

    - Setup and configuration guide for my 4 Gamers 1 CPU build.

     

     

    This article is a work in progress. I own 4 MSI GTX 980 TIs, a Vive , and an Oculus. My goal is to run 2 VMs each with their own virtual reality head set so multiple players can be playing at once during the game nights I host. This is a 4 Gamers 1 CPU build running on Xeon.

     

    I'm a Software Engineer and am writing bash scripts to simplify the Vive passthough process. I've been successful in having a close to hot plugable experience with the VIVE. I will be posting my scripts in the final article.

     

    Vive Challenges:

    - It isn't possible to do Vive passthough via the advanced menu of Unraid 6.1.9

    - My Vive used the same vendor id and product id for two of its components.

    - Some of the required USB names using 'lsusb' are blank. This prevents them from showing up in the Advanced view of VM Configuration.

    - Unpluging and plugging back in the Vive changes the address bus and device mapping.

     

    Hot plugable Vive Solution:

        I've written a bash script that finds the Vive components and dynamically assigns them to a running VM. This allows me to unplug the vive and plug it back in without having to restart and reconfigure my VM. I've been able to test this with one Vive head set.

     

    Due to Vive using the same vendor id and product id, I had to specify the address bus and device number found from 'lsusb' each time i turn on my VM. This solution didn't work for me because the numbers kept changing and i needed to unplug and plug back in the vive when attempting to get it to be recognized.  I ended up not specifying any of the vive components on the XML config for the vm and instead wrote up a script that generated these xml configuration blocks and pass them though to the running vm using 'virsh attach-device $vmName $usbMappingXml' where vmName was the name of the vm and usbMappingXml is the usb mapping as shown below for one component.

        <hostdev mode='subsystem' type='usb' managed='yes'>
          <source>
            <vendor id='0x0bb4'/>
            <product id='0x2c87'/>
    <address bus='2' device='7'/>
          </source>
        </hostdev>
    

     

     

    USB Passthough of multiple devices sharing the same vendor id and product id with the Vive as an example. I would like to to have a Web GUI for this at some point.

     

    #!/bin/bash
    
    # This function maps usb devices to a running VM
    # If the device is already mappend to a running vm, the assigment will have no effect.
    # Created by [email protected]/forum
    # Creation Date: 2016/06/01
    # Version: 1.0
    #1 - Temp folder to create the usb configuration xmls in. The folder will be removed if it already exists
    #2 - Space delimindated list of USB Ids. It is using grep, so partial matches are allowed
    #3 - VM name 
    function mapusb {
    tempFolder=$1
    matchIDs=$2
    vmName=$3
    
    #Safty check because I'm going to to do a rm -r on the temp folder
    if [ "$tempFolder" == "" ]
    then
    	echo error
    	return
    fi
    if [ -d "$tempFolder" ]
    then
    	rm -r $tempFolder
    fi
    
    mkdir $tempFolder
    
    
    #Find usb devices that match
    for m in $(echo $matchIDs)
    do
    	IFS_bk=$IFS
    	IFS=$'\n'
    	#Grab Bus ID from 
    	for v in $(lsusb | grep $m | gawk '{print $6" "$2" "$4}' | sed 's=:= =g' | sed 's= $==g')
    	do
    		tempFile=$(mktemp)
    		newFile=$1/$(echo $tempFile | sed 's=.*tmp.==g')'.xml'
    		mv $tempFile $newFile
    		echo Creating file $newFile
    
    		echo v=$v
    		vender=$(echo $v | gawk '{print $1}')
    		product=$(echo $v | gawk '{print $2}')
    		id=$(echo $v | gawk '{print $3}' | sed -r 's=^0*==g')
    		bus=$(echo $v | gawk '{print $4}' | sed -r 's=^0*==g')
    		echo vender=$vender product=$product id-$id bus=$bus
    
    		echo '<hostdev mode='\'subsystem\'' type='\'usb\'' managed='\'yes\''>' >> $newFile
    		echo '  <source>' >> $newFile
    		echo '      <vendor id='\'0x$vender\''/>' >> $newFile
    		echo '      <product id='\'0x$product\''/>' >> $newFile
    		echo '      <address bus='\'$id\'' device='\'$bus\''/>' >> $newFile
    		echo '  </source>' >> $newFile
    		echo '</hostdev>' >> $newFile
    	done
    	IFS=$IFS_bk
    done
    
    for f in $(ls $1 -l | gawk '{print $9}')
    do
    	xml=$PWD/$1/$f
    	#echo $PWD/viveTempFolder/$f
    	virsh attach-device $vmName $xml
    done
    }
    
    mapusb viveTempFolder '0bb4 0d8c 0424 28de' '1 GPU Middle WIN 10'

     

     

    ----- If you would like to help -----

     

    • I've really dived into the concept of dynamic reconfiguration of usb mapped devices with running VMs.  If anyone has plugin coding experience and would like to design a front end for configuring what devices should go to what VM, I'll write up the back end scripts that will dynamically assign and unassign the usb devices from running VMs.
    • I need some additional 'lsusb' lists of IDs for vive components and Oculus components to verify that the usb IDs are consistent. If they are different, I will have to design my script around them being different for everyone.
    • General feedback if you like the concept or not. Knowing other users are interested is a good motivator.

     

    ----- Old Updates -----

    Update: 2016/06/14 - I've put the write up on hold due to computer lockups when playing Star Citizen for under 5min. I'm troubleshooting with my windows install to eliminate unraid as being the issue.

    Update: 2016/06/11 - Everything works. I'm working on the guide now

    Update: 2016/06/05 - Added USB mapping details

  11. I automated steps 1-9 of this guide.

     

    The output shows USB bus #, PCI Address, and IOMMU group #

     

    Bus 1 PCI 0000:00:1a.0 IOMMU 20
         Intel Corp.
         Linux Foundation 2.0 root hub
    
    Bus 2 PCI 0000:00:1d.0 IOMMU 26
         Intel Corp.
         Linux Foundation 2.0 root hub
    
    Bus 3 PCI 0000:00:14.0 IOMMU 18
         ASMedia Technology Inc.
         C-Media Electronics, Inc.
         Dell Computer Corp. Keyboard
         HTC (High Tech Computer Corp.)
         HTC (High Tech Computer Corp.)
         HTC (High Tech Computer Corp.)
         HTC (High Tech Computer Corp.)
         HTC (High Tech Computer Corp.)
         Linux Foundation 2.0 root hub
         Microsoft Corp. Wheel Mouse Optical
         SanDisk Corp.
         Standard Microsystems Corp.
         Yubico.com Yubikey NEO(-N) OTP+U2F
    
    Bus 4 PCI 0000:00:14.0 IOMMU 18
         ASMedia Technology Inc.
         Linux Foundation 3.0 root hub
    
    

     

     

    The above was generated by ssh into the unraid 6 box and running the following

    for n in $(lsusb | gawk '{print $2" " }' |uniq | sort)
    do
    bussNum=$(echo $n | sed -r 's=^0*==g')
    bussAddr=$(readlink /sys/bus/usb/devices/usb$bussNum | sed -r 's=.*/devices/==g' | gawk -F'/' '{print $2}')
    iommuGroup=$(find . /sys/kernel/iommu_groups | grep $bussAddr | uniq | sed -r 's=/devices.*==g' | sed -r 's=.*/==g')
    echo Bus $bussNum PCI $bussAddr IOMMU $iommuGroup
    IFS_bk=$IFS
    IFS=$'\n'
    for y in $(lsusb | grep 'Bus '$n | cut -d' ' -f 7- | sed '/^\s*$/d' | sort)
    do
    echo '     '$y
    done
    IFS=$IFS_bk
    echo ' '
    done
    

     

     

    • Upvote 1