USB or Kinect error – "Interface 0 is already claimed"

Home Forums AR Sandbox Forum USB or Kinect error – "Interface 0 is already claimed"

  • This topic has 12 replies, 3 voices, and was last updated 6 months ago by Anonymous.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • #102835

    Hello, I am having trouble getting the Sandbox running reliably on my PCs.

    The SARndbox program starts up pretty reliably first time, but when it is closed and re-opened, sometimes it will hang with no errors, and after this initial hang, it will fail to start with the following error:
    Terminated Sandbox due to exception: USB::Device::claimInterface: Interface 0 is already claimed

    Occasionally, this error is produced instead:
    Terminated Sandbox due to exception: USB::Device::setAlternateSetting: Error while setting alternate setting 1 for interface 0

    What I have tried:
    – I am able to resolve it by un-binding and re-binding my USB controller with the commands:
    sudo echo -n "0000:00:14.0" > /sys/bus/pci/drivers/xhci_hcd/unbind && sudo echo -n "0000:00:14.0" > /sys/bus/pci/drivers/xhci_hcd/bind

    But this solution is not ideal because it temporarily disables all my USB devices, and the Kinect requires a few seconds to regain power.

    – Tried a second PC with same hardware/OS but different Graphics card, same problem
    – Tried a second Kinect, same problem
    – Tried latest version of Ubuntu, same problem
    – Tried changing USB-related options in BIOS, same problem

    Does anyone have experience with these errors or ideas how to prevent them?


    Extra info:
    Kinect sensor: Kinect for Windows 1517
    Motherboard: GA-H170-D3HP
    USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
    USB controller: Intel Corporation DSL6540 USB 3.1 Controller [Alpine Ridge]
    Graphics card: nVidia 1060 using latest nvidia-367 driver
    RAM: 16GB
    Software: Vrui-4.2-006, Kinect-3.2, SARndbox-2.3
    OS: Linux Mint 18 (Sarah) apt-get updated/upgraded


    I have also tried with one of the older software versions:
    Vrui-3.1-004, Kinect-2.8-002, SARndbox-1.6

    And the result is the same (problem starting up after a few attempts), but the error is:
    Terminated Sandbox due to exception: Kinect::Camera::sendMessage: Protocol error while sending message 0

    Oliver Kreylos

    Can you get the Kinect back to work by running KinectUtil reset all?


    Thanks! Yes, the Kinect works again after using this command which is heaps faster than my hacky one.

    After KinectUtil reset all, the hanging process finally opens (but just black screen) so I added a killall command to my script also.
    Occasionally, still it won’t start first time, but reliably opens after second attempt using only one script/hotkey.

    My start script is now something like:

    xdotool mousemove 0 0
    killall -w -q SARndbox
    KinectUtil reset all
    /home/sandbox/src/SARndbox-2.3/bin/SARndbox ... options ...

    Maybe I will modify this with a loop to ensure it opens 100% of the time. I’ll try this next week and post the final script if anyone else needs it.

    Oliver Kreylos

    What’s the
    xdotool mousemove 0 0


    I am using the config file you describe here:

    But the mouseIdleTimeout option doesn’t work for me unless the mouse is moved once first.
    That line is just to move it off the centre of the screen and out of the sandbox.

    Oliver Kreylos

    [T]he mouseIdleTimeout option doesn’t work for me unless the mouse is moved once first.

    That’s a bug. Fortunately it was easy and I just fixed it for the next Vrui version.


    Great, thanks for your help 🙂
    I do have another quick question, do you know how to fix these dark blue flickery artifacts I often get around the edges?
    They look a bit like water, but and don’t flow or animate.
    I have seen them in some photographs/screenshots from other users, but not in your demonstrations.



    I just started receiving this error message today. Everything worked last week. I am not sure how to fix it using what was mentioned earlier. Can anyone help?


    I ran the KinectUtil reset and then the error message is now “error while querying serial number string” Currently when I start up the machine it starts to load the program but just locks up and I can’t even click on anything else. I have to use alt F2 to get to terminal and then use the xkill command to get quit the sandbox program. The icon I created to start the sandbox doesn’t seem to function and when I type the run command into terminal that’s when I get these errors.


    A calibration also gives the same error message. I have also tried a different usb port.


    Using a front usb port the calibration tool actually came up but the sandbox application still locks up. Once it locks up with the sandbox application the calibration tool then gives the same error again.


    The script I have been using to reset USB and Sandbox problems:

    # Kill all of the potentially conflicting processes
    # -w wait until they are killed, -q be quiet about it
    killall -w -q CalibrateProjector
    killall -w -q SARndbox
    killall -w -q KinectUtil
    # Reset all the Kinect devices
    # KinectUtil reset all
    KinectUtil reset all

    Those killall lines will terminate any background SARndbox-related processes. The KinectUtil reset all command will hopefully handle any USB issues. If that doesn’t work, I don’t think I can be of much more help.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.

Comments are closed.