Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minetest built with SDL conflicts with kwin_x11 compositing #14596

Open
zmv7 opened this issue Apr 27, 2024 · 3 comments
Open

Minetest built with SDL conflicts with kwin_x11 compositing #14596

zmv7 opened this issue Apr 27, 2024 · 3 comments
Labels
Bug Issues that were confirmed to be a bug @ Build CMake, build scripts, official builds, compiler and linker errors Linux Upstream issue This bug is the fault of a library, the OS or an external service we use.

Comments

@zmv7
Copy link
Contributor

zmv7 commented Apr 27, 2024

Minetest version

Minetest 5.9.0-dev-c63c05b (Linux)
Using LuaJIT 2.1.1713773202
Built by GCC 13.2
Running on Linux/6.8.7-arch1-2 x86_64
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="/usr/local/share/minetest"
STATIC_LOCALEDIR="/usr/local/share/locale"

Irrlicht device

SDL

Operating system and version

Arch, Fedora 40, FreeBSD 14

CPU model

AMD Ryzen 5 5600

GPU model

RTX 4070 Super

Active renderer

OpenGL 4.6

Summary

Kwin's compositing turns off whenever minetest built with USE_SDL2=1 is running. It doesnt happen on USE_SDL2=0 builds. I reproduced it on Archlinux, Fedora 40(they're both with plasma6), FreeBSD 14 (latest repo branch, plasma5). Tried nouveau and proprietary nvidia drivers. Also reproduced in LXQt + kwin_x11.
Cannot reproduce in XFCE.

Steps to reproduce

  1. Get OS with Plasma desktop
  2. Compile minetest with USE_SDL2=1 flag
  3. Launch minetest
  4. Look for graphical issues in the desktop shell:
    • Wobbly windows, transparency, animations will not work
    • Windows above minetest will leave a trail when moving quickly
    • You can also try to launch picom, it should start successfully and will get killed by kwin once you close minetest window.
@zmv7 zmv7 added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Apr 27, 2024
@rollerozxa
Copy link
Member

rollerozxa commented Apr 27, 2024

Plasma/KWin automatically disables compositing on Xorg if programs request it to reduce latency, which SDL does. You need to disable "Allow applications to block compositing" in the KWin compositor settings if you don't want it to do that.

@zmv7
Copy link
Contributor Author

zmv7 commented Apr 27, 2024

Plasma/KWin automatically disables compositing on Xorg if programs request it to reduce latency, which SDL does. You need to disable "Allow applications to block compositing" in the KWin compositor settings if you don't want it to do that.

It works, however, shouldn't apps properly control it using SDL_SetHint? For example disable compositing in fullscreen mode only, etc?

@sfan5
Copy link
Member

sfan5 commented Apr 27, 2024

It appears SDL disables compositing by default: https://discourse.libsdl.org/t/why-is-compositing-disabled-on-normal-x11-windows/37712
We could add code to set the mentioned hint to tell SDL to keep it enabled, but the default behavior is not our fault.

@sfan5 sfan5 added the Linux label Apr 27, 2024
@Zughy Zughy added @ Build CMake, build scripts, official builds, compiler and linker errors Upstream issue This bug is the fault of a library, the OS or an external service we use. Bug Issues that were confirmed to be a bug and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug @ Build CMake, build scripts, official builds, compiler and linker errors Linux Upstream issue This bug is the fault of a library, the OS or an external service we use.
Projects
None yet
Development

No branches or pull requests

4 participants