godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.71k stars 20.83k forks source link

Wayland: Window Resizing w/ Ultrawide - Wonky & Crash #92823

Open GeneralProtectionFault opened 3 months ago

GeneralProtectionFault commented 3 months ago

Tested versions

System information

Godot v4.3.beta1 - Garuda Linux #1 ZEN SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:26 +0000 - Wayland - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (nvidia; 550.78) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)

Issue description

Just to add to the system info, Garuda is Arch-based.

So just created a new project in 4.3 Beta 1, started w/ the wayland argument. Basically, because it appears KDE "takes over" the title bar, while the menus show up, there is no minimize/maximize/close. On startup, it fits to the ultrawide fine, but without the title bar, the only way I found to manipulate it was the ironic use of the Windows key & down arrow.

This pulls it down to a skinny window--then I try to size it to my liking, it won't go any wider than...perhaps HD width? Looks like it, but it won't go all the way to the bottom either. I can drag it over to the normal HD monitor and fit it to that ok.

In Beta 1, after futzing with this I actually got a crash. In Dev 6, the window resizing is still terrible, but I didn't get an actual crash. Don't know if that means it can't happen, but it's what I got. I'm adding 2 text files, which are the terminal outputs of each.

Steps to reproduce

Simply open any project. Presumably it maximizes to the monitor, then press Windows key + down arrow, then try resizing window in various ways. Hopefully "have an ultrawide" is not necessary but the terminal output is here for reference :).

Godot4.3Beta1_Wayland_Crash.txt Godot4.3Dev6_Wayland_WindowBehavior.txt

Minimal reproduction project (MRP)

No project needed, a brand new one exhibited the behavior.

GeneralProtectionFault commented 3 months ago

Some additional info:

The title bar issue appears to be, in part, a KDE setting. From the Garuda forums, I changed this in the /home/user/.config/kwinrc file: [Windows] BorderlessMaximizedWindows=false (was true before)

That was driving me crazy--so now all the apps appear to have the title bar w/ the min/max/close buttons. After doing that, I was not able to get Beta 1 to crash again, so I believe the crash is something not playing nice with that god-awful borderless "feature" which disappears those buttons depending on the app.

Here's the terminal output, I still see an error, but no crash or inability to fully customize the size of the window on the ultrawide:

╰─λ ./Godot_v4.3-beta1_mono_linux.x86_64 --display-driver wayland
Godot Engine v4.3.beta1.official.a4f2ea91a - https://godotengine.org
Invalid value (0) for DRI_PRIME. Should be > 0
libEGL warning: egl: failed to create dri2 screen
Invalid value (0) for DRI_PRIME. Should be > 0
Inconsistent value (1) for DRI_PRIME. Should be < 1 (GPU devices count). Using: 0
libEGL warning: egl: failed to create dri2 screen
Inconsistent value (1) for DRI_PRIME. Should be < 1 (GPU devices count). Using: 0
Inconsistent value (2) for DRI_PRIME. Should be < 1 (GPU devices count). Using: 0
libEGL warning: egl: failed to create dri2 screen
Inconsistent value (2) for DRI_PRIME. Should be < 1 (GPU devices count). Using: 0
Inconsistent value (3) for DRI_PRIME. Should be < 1 (GPU devices count). Using: 0
libEGL warning: egl: failed to create dri2 screen
Inconsistent value (3) for DRI_PRIME. Should be < 1 (GPU devices count). Using: 0
libEGL warning: egl: failed to create dri2 screen
WARNING: Failed to load cached shader, recompiling.
at: _load_from_cache (drivers/gles3/shader_gles3.cpp:606)
OpenGL API 3.3.0 NVIDIA 550.78 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3060
GeneralProtectionFault commented 1 month ago

Is there a tag to indicate this is an issue in Wayland? I feel like that's pretty important.

akien-mga commented 1 month ago

CC @Riteo

Riteo commented 1 month ago

Thank you for the report!

The attachments don't seem to load and I feel that I might not have enough info to come to a good conclusion; could you please send me a Wayland debug log while you replicate this issue?

The command should be something like this:

WAYLAND_DEBUG=1 godot --verbose > wayland-debug.log 2>&1

Feel free to add whatever extra arguments before the first >. You probably also need to replace godot with the right path for the executable.