"SetRTThreadPriority failed" error on Linux

alika report abuse

When running my application (with pylon) on Linux, I get the following error message and I am not sure how to solve that:

'SetRTThreadPriority failed: 1 Operation not permitted'



mbinev report abuse


assuming you are using the latest pylon for Linux x86 or ARM 5.0.5.xxx here you are some more information:

Under circumstances you may get the following error message:

'SetRTThreadPriority failed: 1 Operation not permitted'


when running pylon based application on Linux or Linux ARM.


Background on the pylon internal threads and their priority:


As described in the pylon programmer's guide and reference documentation:

"Application Settings for High Performance

The following settings are recommended for applications that require image processing at a constant frame rate and with low jitter:

•The packet size should be adjusted to the highest value supported by your network adapter and network setup, e.g. to a packet size of 8092 bytes.

•The grab loop thread should have its priority set to a value in the real-time priority range. The grab loop thread is the thread that calls the RetrieveResult() method. A value of 24 or higher is recommended. Thread priorities can be adjusted using the SetRTThreadPriority method. The priority of the grab loop thread that is optionally provided by the Instant Camera object can be adjusted using the GrabLoopThreadPriorityOverride and GrabLoopThreadPriority parameters.

•The internal Instant Camera grab engine thread should have its priority set to a value in the real-time priority range. A value of 25 or higher is recommended. The default priority is 25. The grab engine thread priority must be higher than the grab loop thread priority. The grab engine thread priority can be adjusted using the InternalGrabEngineThreadPriorityOverride and InternalGrabEngineThreadPriority parameters."



Under Linux the pylon threads will have a priority of "zero" if you do not apply the changes described in the INTALL guide.

That is, setting:  

* - rtprio 99

in the /etc/security/limits.conf file.


When the Permissions for Real-Time Thread Priorities are set, pylon will check what is allowed and "arrange" itself to the maximum possible thread priority.



On Linux the range for setting thread priorities varies from 0 to 99.


(1) Solution:



* - rtprio 99

in the /etc/security/limits.conf file.


(2) Solution:


Set the thread priority of the pylon grab engine to '0' (no real-time):





In addition you may also need to set the thread prioroty of the grab loop thread:




alika report abuse
Add Answer

Need support?

Just drop us an email to ... Show more