I’ve long been interested in raising the system priority for PsychoPy, to reduce number of frames missed, which can happen when the operating system decides to do something else in the background while PsychoPy is trying to draw to the screen.
Came across a thread on the Eyelink forum which discusses this because in the context of connecting to an Eyelink eyetracker host computer, one can get the message
displayAPI: failed to set process priority to realtime. Did you remember to run as root?
See here (forum registration required) for a possible solution for Linux and possibly MacOS, in the reply by Brian of Eyelink Support. Haven’t tried this yet but leaving it here for future reference.