mate-desktop / marco

MATE default window manager
https://mate-desktop.org
GNU General Public License v2.0
192 stars 85 forks source link

Bad performance in games on Unity3d engine with vulkan and vsync #779

Open xboxones1 opened 2 months ago

xboxones1 commented 2 months ago

For quite a long time I observe bad performance in native games on unity3d engine that use api vulkan. When vsync is enabled, and in some games it is enabled by default, without the ability to disable in the settings, very bad performance, freezes and lags. Tried different settings, disabled compositing, doesn't help. Tested on other de and there everything works smoothly, but I like mate.

The game for example 'Hollow Knight', by default runs on api vulkan, just go into settings and enable vsync.

Ubuntu Mate Mate 1.26.2 nvidia with proprietary drivers

lukefromdc commented 2 months ago

Note that marco itself uses CPU compositing and does NOT use the GPU but does not block an application from using hardware acceleration. I never had any issues with OpenGL with this but the only thing I have installed that is even capable of using Vulkan is a couple of GNOME apps that use GTK4. It is possible (though speculation on my part) that something about Vulkan, certain Vulkan use cases, or even that particular game engine has an issue with feeding its output into a CPU compositing window manager. Note that these are unusual, Marco and Metacity are the only ones I know about, so it would be no surprise if the game engine devs never tested this.

You might try the compton GPU accelerated compositor that works with marco, I know Ubuntu offers it though I do not know if it is installed by default. If it is installed, you should get a checkbox in the "windows" capplet in mate-control-center to use GPU compositing. Turning compositing off altogether is also a possibly useful test here,

Compiz BTW has the option common on GPU composited WM's to allow fullscreen apps such as games to bypass the compositor entirely.

As for testing this, I will have to leave it for other team members: no Nvidia and no closed source games on my setup. To all team members: Do we have anyone who has Vulkan known to be working, anything using the unity3d engine, and preferably on nvidia?