pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
418 stars 51 forks source link

Games with xwayland break in fullscreen when direct scanout is triggered #601

Open Dekomoro opened 4 days ago

Dekomoro commented 4 days ago

Wine Games repeatedly minimize and maximize, get a black screen when the mouse cursor leaves the window, or start with a blackscreen when in fullscreen

Native titles will repeatedly maximize and minimize, freeze, or both depending on cursor focus. This is exhibited in both wine, and native titles made with FNA but not ones made with the source engine or godot

Native titles made with source 2 will stay minimized , if you try to open it from the application dock it will minimize itself automatically, unless you open it from the dock on the other monitor. However this may be another issue entirely as source 2 games exhibit this issue when using the Wayland back end(requires removing the SDL_VIDEO_DRIVER=x11 variable from cs2.sh)

Games that either work with native wayland or don't trigger direct scan-out do not exhibit this issue.

For wine it is at least not likely an issue with dxvk as pre-source 2 games that use it for Vulkan don't exhibit this issue

Dekomoro commented 4 days ago

Forgot to mention but in fna's case the console spews out the error RGBA8 swapchain unsupported, falling back to BGRA8 with swizzle. Unsure if it's relevant at all however.

Dekomoro commented 4 days ago

When minimized I also get this error Failed to acquire swapchain image, not presenting

Drakulix commented 3 days ago

Wine Games repeatedly minimize and maximize, get a black screen when the mouse cursor leaves the window, or start with a blackscreen when in fullscreen

The minimize issue isn't related to direct scanout, I wouldn't be so sure about the black screen as well.

Forgot to mention but in fna's case the console spews out the error RGBA8 swapchain unsupported, falling back to BGRA8 with swizzle. Unsure if it's relevant at all however.

That is interesting, but shouldn't really concern the compositor. It might affect the gpu's ability to do direct scanout though. Could you post the outputs of eglinfo and drm_info on your system?

When minimized I also get this error Failed to acquire swapchain image, not presenting

Expected, minimized windows are throttled.

Dekomoro commented 3 days ago

Yeah. drm_info: https://gist.github.com/Dekomoro/da97aeac6f0e450837cfbcb2a958ac97 eglinfo: https://gist.github.com/Dekomoro/7c494e5ced5ac1f3701b01a61ca9921a

I get the same results on Arch, POP_OS with cosmic master branch, and using the fedora copr if that matters