Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Primesense on Linux

📅 2015-Aug-05 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

[caption id="attachment_7208" align="aligncenter" width="640"][My Primesense RD1.09 camera that causes many troubles](https://codeyarns.files.wordpress.com/2015/08/20150806_primesense.jpg) My Primesense RD1.09 camera that causes many troubles[/caption]

I have a Primesense RD1.09 camera that works without any problem under Windows using OpenNI 2.2.0.33. Under Linux though, it is a world of pain!

Investigation

After a lot of debugging, I have discovered that most of the problems arise if you have a computer which has USB 3.0 controllers or hubs. It does not matter if you plug in the Primesense into a USB 3.0 or USB 2.0 port. Just the existence of USB 3.0 on your computer means that the Linux kernel behaves differently.

After endless hours of plugging and unplugging into USB ports and poring over the errors in /var/log/syslog and the behavior of lsusb on 3 different computers, I believe it is the USB subsystem of Linux that is causing the problem. Linux kernel uses the XHCI module and on computers which have USB 3.0 controllers, it seems to be causing problems. For an excellent example see this scanner problem.

Additionally, if you have played around with different versions of OpenNI, that can also add another layer of bugs. Make sure you apt-get remove --purge when you remove OpenNI 1.x. Also make sure you manually remove the files installed by OpenNI 2.x (which does not have an uninstaller).

Symptoms

Check if you see of these symptoms when using Primesense in Linux:

Solution

Both of these solutions worked for me:

Primesense worked flawlessly with the OpenNI 1.x packages (from Ubuntu) on the computers after I tried the above solutions! 😊