[caption id="attachment_7208" align="aligncenter" width="640"](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 188.8.131.52. Under Linux though, it is a world of pain!
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).
Check if you see of these symptoms when using Primesense in Linux:
You plug in Primesense and type
lsusb. It should enumerate the USB devices in a second. If it takes longer, you have a computer with USB 3.0 ports and the buggy Linux kernel USB modules are having trouble with it.
Primesense is detected in
lsusb and it appears as
ASUS. But, running any sample viewer program returns in error.
Primesense is detected only half the times it is plugged in.
When the camera is detected, I run a program to read depth and color streams. Half the time, the color stream does not provide any frames!
Even when both depth and color frames are provided, the color frames have lower FPS and even freeze sometimes!
Both of these solutions worked for me:
On computer with USB 3.0, go to BIOS setup and disable Intel xHCI and EHCI. If your BIOS does not have these options, you are out of luck! ☹
Switch to an older computer which has only USB 2.0 controllers and ports.
Primesense worked flawlessly with the OpenNI 1.x packages (from Ubuntu) on the computers after I tried the above solutions! 😊