title: xiAPI: Failed to change thread scheduler, check user limit for realtime priority
body: <p>Trying to operate the Ximea MQ013CG-ON USB 3.0 type camera, using Nvidia Jetson TK1 (# R21 (release), REVISION: 3.0). </p>
  
  <p>When I try run the example opencv_test.cpp code in <a href="http://www.ximea.com/support/wiki/vision-libraries/OpenCV_Installation_in_Linux" rel="nofollow">OpenCV installation information</a>:</p>
  
  <pre><code>#include "cv.h" 
  #include "highgui.h" 
  #include &lt;stdio.h&gt;  
  // A Simple Camera Capture Framework 
  int main() 
  {
     CvCapture* capture = cvCaptureFromCAM( CV_CAP_XIAPI );
     if ( !capture ) {
       fprintf( stderr, "ERROR: capture is NULL \n" );
       getchar();
       return -1;
     }
     // Create a window in which the captured images will be presented
     cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );
     // Show the image captured from the camera in the window and repeat
     while ( 1 ) {
       // Get one frame
       IplImage* frame = cvQueryFrame( capture );
       if ( !frame ) {
         fprintf( stderr, "ERROR: frame is null...\n" );
         getchar();
         break;
       }
       cvShowImage( "mywindow", frame );
       // Do not release the frame!
       //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),
       //remove higher bits using AND operator
       if ( (cvWaitKey(10) &amp; 255) == 27 ) break;
     }
     // Release the capture device housekeeping
     cvReleaseCapture( &amp;capture );
     cvDestroyWindow( "mywindow" );
     return 0;
  }
  </code></pre>
  
  <p>(Running via): </p>
  
  <pre><code>g++ -I/usr/local/include/opencv opencv_test.cpp -lopencv_highgui
  LD_LIBRARY_PATH=/usr/local/lib ./a.out
  </code></pre>
  
  <p>I get the error messages below:</p>
  
  <pre><code>xiAPI: XIMEA Camera API V4.05.65
  xiAPI: Adding camera context: dwID=14510651  ptr=B2AE4000 processID=00005A09
  xiAPI: Create handles 1 Process 00005A09
  xiAPI: Enable sensor
  xiAPI: ENABLE SENSOR
  xiAPI: SetDataRate bandwidth 3180; real band 3180; Freq 62; XSM 0
  xiAPI: Time needed to read BPL:83ms
  xiAPI: ERROR: pixel -7x323 has no correction pixel!
  xiAPI: ERROR: pixel -7x1018 has no correction pixel!
  xiAPI: ERROR: 2 pixels in list without any correction!
  xiAPI: Successfully parsed BPL file, 447 total corrected pixels
  xiAPI: SetGPIO 1 set to 8
  xiAPI: SetDataRate bandwidth 3180; real band 3180; Freq 62; XSM 0
  xiAPI: ERROR: pixel -7x323 has no correction pixel!
  xiAPI: ERROR: pixel -7x1018 has no correction pixel!
  xiAPI: ERROR: 2 pixels in list without any correction!
  xiAPI: SetGPIO 1 set to 0
  xiAPI: AutoSetBandwidth measurement
  xiAPI: CalculateResources : Context B2AE4000 ID 14510651 m_maxBytes=1024 m_maxBufferSize=1048576
  xiAPI: Failed to change thread scheduler, check user limit for realtime priority.
  xiAPI: AutoSetBandwidth measured 3083Mbps. Safe margin 10% will be used.
  xiAPI: Current bandwidth limit auto-set to 2774 Mbps (min:408Mbps,max:3083Mbps)
  xiAPI: SetDataRate bandwidth 2774; real band 2774; Freq 62; XSM 0
  xiAPI: ERROR: pixel -7x323 has no correction pixel!
  xiAPI: ERROR: pixel -7x1018 has no correction pixel!
  xiAPI: ERROR: 2 pixels in list without any correction!
  xiAPI: SetDataRate bandwidth 2774; real band 2774; Freq 62; XSM 0
  xiAPI: ERROR: pixel -7x323 has no correction pixel!
  xiAPI: ERROR: pixel -7x1018 has no correction pixel!
  xiAPI: ERROR: 2 pixels in list without any correction!
  xiAPI: DISABLE SENSOR
  xiAPI: ENABLE SENSOR
  xiAPI: SetDataRate bandwidth 2774; real band 2774; Freq 54; XSM 10
  xiAPI: ERROR: pixel -7x323 has no correction pixel!
  xiAPI: ERROR: pixel -7x1018 has no correction pixel!
  xiAPI: ERROR: 2 pixels in list without any correction!
  xiAPI: SetDataRate bandwidth 2774; real band 2774; Freq 54; XSM 10
  xiAPI: ERROR: pixel -7x323 has no correction pixel!
  xiAPI: ERROR: pixel -7x1018 has no correction pixel!
  xiAPI: ERROR: 2 pixels in list without any correction!
  xiAPI: CalculateResources : Context B2AE4000 ID 14510651 m_maxBytes=1024 m_maxBufferSize=1048576
  xiAPI: StartVideoStream
  xiAPI: Failed to change thread scheduler, check user limit for realtime priority.
  xiAPI: WorkerThread is up
  xiAPI: ERROR: pixel -7x323 has no correction pixel!
  xiAPI: ERROR: pixel -7x1018 has no correction pixel!
  xiAPI: ERROR: 2 pixels in list without any correction!
  Aborted
  </code></pre>
  
  <p>I have also tried xiAPI example, then I get black or white screens depending on light intensity. What can be the problem? Thank you.</p>
  
  <p><strong>Further Info:</strong></p>
  
  <p>Installed <a href="http://www.ximea.com/support/wiki/apis/XIMEA_Linux_Software_Package" rel="nofollow">XIMEA Linux Software Package</a>, and <a href="http://www.ximea.com/support/wiki/vision-libraries/OpenCV_Installation_in_Linux" rel="nofollow">OpenCV</a> according to descriptions. Using s-link USB 4 port 3.0 Hub.</p>
  
  <p>Output of lsusb:</p>
  
  <pre><code>Bus 002 Device 006: ID 20f7:3001  
  Bus 001 Device 006: ID 09da:000a A4 Tech Co., Ltd Optical Mouse Opto 510D
  Bus 001 Device 005: ID 046e:52cc Behavior Tech. Computer Corp. 
  Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc. 
  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
  Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  </code></pre>
  
  <p>Info in usbview:</p>
  
  <pre><code>www.ximea.com
  Manufacturer: XIMEA
  Speed: unknown
  USB Version:  3.00
  Device Class: 00(&gt;ifc )
  Device Subclass: 00
  Device Protocol: 00
  Maximum Default Endpoint Size: 9
  Number of Configurations: 1
  Vendor Id: 20f7
  Product Id: 3001
  Revision Number:  0.00
  
  Config Number: 1
      Number of Interfaces: 1
      Attributes: 80
      MaxPower Needed: 400mA
  
      Interface Number: 0
          Name: (none)
          Alternate Number: 0
          Class: ff(vend.) 
          Sub Class: 00
          Protocol: 00
          Number of Endpoints: 4
  
              Endpoint Address: 81
              Direction: in
              Attribute: 2
              Type: Bulk
              Max Packet Size: 1024
              Interval: 0ms
  
              Endpoint Address: 02
              Direction: out
              Attribute: 2
              Type: Bulk
              Max Packet Size: 1024
              Interval: 0ms
  
              Endpoint Address: 82
              Direction: in
              Attribute: 2
              Type: Bulk
              Max Packet Size: 1024
              Interval: 0ms
  
              Endpoint Address: 83
              Direction: in
              Attribute: 2
              Type: Bulk
              Max Packet Size: 1024
              Interval: 0ms
  </code></pre>