godotengine / godot

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

[TRACKER] Wayland issues #88346

Open Riteo opened 4 months ago

Riteo commented 4 months ago

Tested versions

System information

Linux/BSD - Wayland backend

Issue description

A new, experimental and opt-in Wayland backend got merged in 4.3.dev3.

While it got tested plenty, there are still quite a bunch of missing features and lots of things to improve, which are tracked in this issue.

- [ ] https://github.com/godotengine/godot/issues/87747
- [ ] https://github.com/godotengine/godot/issues/87749
- [ ] https://github.com/godotengine/godot/issues/87963
- [ ] https://github.com/godotengine/godot/issues/88113
- [ ] https://github.com/godotengine/godot/issues/88151
- [ ] https://github.com/godotengine/godot/issues/88246
- [ ] https://github.com/godotengine/godot/issues/88248
- [ ] https://github.com/godotengine/godot/issues/88333
- [ ] https://github.com/godotengine/godot/issues/88364
- [ ] https://github.com/godotengine/godot/issues/88550
- [ ] https://github.com/godotengine/godot/issues/89257
- [ ] https://github.com/godotengine/godot/issues/90612
- [ ] https://github.com/godotengine/godot/issues/91371
- [ ] https://github.com/godotengine/godot/issues/91921
- [ ] https://github.com/godotengine/godot/issues/92014
- [ ] https://github.com/godotengine/godot/issues/92594
- [ ] https://github.com/godotengine/godot/issues/92643
- [ ] https://github.com/godotengine/godot/issues/93098
- [ ] https://github.com/godotengine/godot/issues/93788

Steps to reproduce

From the CLI: start the engine with the --display-driver wayland flag.

Alternatively, for the editor, set the run/platforms/linuxbsd/prefer_wayland editor setting to true or, for running projects, set the display/display_server/driver.linuxbsd project setting to wayland.

Minimal reproduction project (MRP)

N/A

Roogephy commented 3 months ago

cannot open edit with weston, cmdline out is: `Godot Engine v4.3.dev4.official.df78c0636 - https://godotengine.org WARNING: Can't obtain the XDG decoration manager. Libdecor will be used for drawing CSDs, if available. at: init (platform/linuxbsd/wayland/wayland_thread.cpp:3493) WARNING: Can't obtain the XDG activation global. Attention requesting won't work! at: init (platform/linuxbsd/wayland/wayland_thread.cpp:3500) wl_registry@2: error 0: invalid version for global xdg_wm_base (22): have 1, wanted 2 ERROR: Wayland protocol error 0 on interface wl_registry@2. at: _poll_events_thread (platform/linuxbsd/wayland/wayland_thread.cpp:2540)

================================================================ handle_crash: Program crashed with signal 4 Engine version: Godot Engine v4.3.dev4.official (df78c0636d79c9545a283e0e2a926d623998cc27) Dumping the backtrace. Please include this when reporting the bug to the project developer. [1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f3a4fa42520] (??:0) [2] godot4_3() [0x47e587] (??:0) [3] godot4_3() [0x3c9fbe5] (??:0) [4] godot4_3() [0x48e4963] (??:0) [5] /lib/x86_64-linux-gnu/libc.so.6(+0x94ac3) [0x7f3a4fa94ac3] (??:0) [6] /lib/x86_64-linux-gnu/libc.so.6(+0x126850) [0x7f3a4fb26850] (??:0) -- END OF BACKTRACE -- ================================================================`

Riteo commented 3 months ago

@Roogephy thanks for the report! Could you open a new ticket? I'd like to discuss this further (I am already aware of this issue and a solution), but I would not like to fill the tracker itself.

aylamz commented 3 months ago

Hello, is there an issue for tracking Wayland fractional scaling support?

Riteo commented 3 months ago

@aylamz not as far as I am aware. Feel free to open one :D

aylamz commented 3 months ago

https://github.com/godotengine/godot/issues/89257

BiosElement commented 2 months ago

Edit: , I am not confident it isn't a KDE related issue, but am not in a position to test it on other DE's currently.

This is an example: https://youtu.be/Xr5cmBRonls

Has anyone ran into a really strange issue where trying to resize a windowed instance of Godot under Wayland/KDE causes it to move way up off the top left edge of the screen at a massive scale? It does not replicate under X11, but it is such a strange thing I don't really have enough to file a useful report.

I am using a laptop display at 2256x1504 and a desktop monitor at 2569x1440. I have confirmed it does not matter if the second display is connected or not, the issue still occurs with only the laptop display connected.

This was all found using the git build of Godot as-of 4/8/24, it is not present in stable.

Update: I have narrowed this down to being introduced between cd4e4c0fccfdbfe04d91617a1bc6c4785dd6a1ec and b926e51998a4c9b95b2d31f793cb0a81236e5b7c. Narrowing down still. Update 2: Issue occurs with 34f284bcc2929318735f97066763ea679ba30270. Issue partially occurs with 5cf6f3c77944e9ac953a331066755ea0c239fb1a, it does resize correctly but does so very slowly before crashing.

Reproducible in: b926e51998a4c9b95b2d31f793cb0a81236e5b7c 7901a0524bc61aceb26c8e7790ea0c4fd880dadc

Roogephy commented 2 months ago

@Roogephy thanks for the report! Could you open a new ticket? I'd like to discuss this further (I am already aware of this issue and a solution), but I would not like to fill the tracker itself.

sorry for so late: https://github.com/godotengine/godot/issues/90612

Riteo commented 2 months ago

Hi folks, sorry for the delay, I couldn't work on this stuff in the last few weeks. I just got back! :D

@Roogephy thanks for the report! I'll explain the situation a bit more thoroughly there once I get back to speed. I'll put the issue in the tracker and mark the relevant messages as "resolved" to not clutter the thread too much.

Hi @BiosElement, this issue feels quite complicated and I'm not sure how the bisected commits relate to this at all. That said, I recommend to file a dedicated issue ticket so that we can investigate further without cluttering up this thread.

Sauermann commented 2 months ago

90917

Riteo commented 1 month ago

@Sauermann oops, I missed this notification, sorry. Adding this to the tracker!

BTW, since you have write permissions, feel free to edit the tracker yourself if you want to add something new ;)

Edit: wait, I don't think that the user is using the backend. The system info section prints the content of the XDG_SESSION_TYPE environment variable, which does not change when using XWayland.

We should really improve the detection logic to make issue management clearer.

Edit2: I've removed it for now, as I'm reasonably sure they didn't use it. It's experimental and people have to go through a few hoops to turn it on, so if they did the would've very probably told so.

sullyj3 commented 1 month ago

92014