godot icon indicating copy to clipboard operation
godot copied to clipboard

[TRACKER] Wayland issues

Open deralmas opened this issue 1 year ago • 11 comments
trafficstars

Tested versions

  • Reproducible in: 4.3.dev3 and later

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/89793
- [ ] 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/93472
- [ ] https://github.com/godotengine/godot/issues/93788
- [ ] https://github.com/godotengine/godot/issues/93981

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

deralmas avatar Feb 14 '24 22:02 deralmas

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 -- ================================================================`

Roogephy avatar Mar 07 '24 03:03 Roogephy

@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.

deralmas avatar Mar 07 '24 13:03 deralmas

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

aylamz avatar Mar 07 '24 14:03 aylamz

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

deralmas avatar Mar 07 '24 16:03 deralmas

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

aylamz avatar Mar 07 '24 18:03 aylamz

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

BiosElement avatar Apr 09 '24 03:04 BiosElement

@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

Roogephy avatar Apr 13 '24 08:04 Roogephy

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.

deralmas avatar Apr 19 '24 22:04 deralmas

#90917

Sauermann avatar Apr 22 '24 08:04 Sauermann

@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.

deralmas avatar May 03 '24 07:05 deralmas

#92014

sullyj3 avatar Jun 01 '24 09:06 sullyj3

Sorry, but does anyone else "feel" a difference between regular and "Prefer Wayland" setting? I don't know how to see the framerate of the editor, but I have a 120hz display and it feels like 20-30 when I enable Wayland (but other apps are fine and mouse gestures are super smooth too). This is using "single window mode" as well, btw.

eobet avatar Aug 03 '24 14:08 eobet

@eobet sorry for the delay.

That's quite weird. You could try running the editor directly by opening a project.godot file and pass the --print-fps flag: godot --print-fps path/to/project.godot

You should then see the framerate being printed into the standard output every few seconds.

If there's a substantial difference in framerate between the wayland and the x11 backend, please file a new ticket.

This is using "single window mode" as well, btw.

Note that, due to various reasons, the Wayland backend is forced to the single window mode for the time being. I'm researching the steps needed for a proper multi-window implementation.

If you see multiple native windows, then you're running the X11 backend through XWayland.

deralmas avatar Aug 14 '24 19:08 deralmas

Please add #94445 to the tracker

perroboc avatar Aug 15 '24 13:08 perroboc