The state of OpenGL on Linux

When I started to implement OpenGL on my linux machine, the interface would be super laggy. For example when dragging a window, sometimes the MouseUp event would not registered, permanently gluing the window to your mouse cursor. Any drop down menu was basically unusable.

I was given some insightby KottVV here that this is related to my Gtx 970 GPU and disabling V-Sync via the command line tool nvidia-settings would fix the issue. If you, however, enabled a framecounter then, you would see that the user interface would run at some 20.000 FPS.

Fast-forward to now, I switched my Gtx card for an AMD Rx 5700 xt and the same problem occurs. However, this time around there seems to be no amd alternative to nvidia-settings. So my best guess is that the same problem occurs, yet I cannot disable V-Sync.

As is I simply cannot really test UI on linux right now. (Funnyly enough I cannot test audio either due to my other issue)

Sooo what’s the issue here? Is anybody using OpenGL with success with Gtx or AMD Rx cards on linux? Is this a bug in JUCE? I am running other OpenGL apps without problem.

Juce’s opengl callback locks the messagemanager so I’d guess is that if your fps is 20k fps it’s not relinquishing the message manager lock so you can respond to mouse messages.

I’d see if sleeping the thread in your opengl callback makes your ui more responsive.

Hi Matt,

The 20k FPS are only achieved after disabling V-Sync. I can’t do this (rather don’t know how to do this) with my current AMD GPU. Once the 20k are achieved, the stuttering is gone.

Right now I’m sitting at a fixed 60 FPS with the laggy GUI. I imagine sleeping the thread here would make things even worse.