I'm using Ubuntu 20.04 (default desktop install, i.e. with Gnome I suppose) and NVIDIA GeForce RTX 2080 GPU. When the GPU is 100% busy with a background process, some apps start lagging. Namely, those are the apps that use non-OpenGL QT rendering (e.g. Telegram Desktop) or GTK/Gnome/Cairo (Sublime Text, Mozilla Firefox). The other apps like Chrome, Terminal, VS Code, and Slack do not lag. When I changed the rendering backend in Sublime Text from GTK/Gnome/Cairo to OpenGL, it stopped lagging too. The lagging appears as a slow UI (long response for switching tabs and windows or scrolling), and characters do not appear immediately as I type them in.
To reproduce this, you can:
- Launch a GPU-intensive application in the background, such as Tensorflow or a crypto miner
- Launch an app that uses QT (without OpenGL) or Cairo
- Try to use the UI in the app
It seems not to be a problem of long CUDA kernels, as some apps work without lags in this setting.
Is there a configuration option to Xorg/Gnome/QT/GTK/Cairo that can help get rid of the lag?
I submitted a bug to one of the apps https://github.com/telegramdesktop/tdesktop/issues/17091 , but its maintainers suggest fixing the problem in the rendering libraries or the OS instead.