Bug 268810 - games/veloren: provide Wayland workaround after ports 9ac8221ce428
Summary: games/veloren: provide Wayland workaround after ports 9ac8221ce428
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jan Beich
URL: https://gitlab.com/veloren/veloren/-/...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-07 12:19 UTC by (intentionally left blank)
Modified: 2023-09-20 14:45 UTC (History)
1 user (show)

See Also:
jbeich: maintainer-feedback+
jbeich: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description (intentionally left blank) 2023-01-07 12:19:14 UTC
ports 9ac8221ce428 documented broken Wayland support after ports 1c4b6bc295c6.

"# pkg install veloren" does not output a post-install message.

"$ veloren-voxygen" crashes under a wlroots based compositor session with WAYLAND_DISPLAY in environment and with related socket. One can workaround with either:

$ env -u WAYLAND_DISPLAY veloren-voxygen
$ WINIT_UNIX_BACKEND=x11 veloren-voxygen

To avoid confusing users, follow up ports 9ac8221ce428 with either:

* documenting a workaround via a post-install message
* providing "veloren-voxygen" via a shell wrapper with a workaround.

The latter maybe not needed for x11-wm/plasma5-kwin Wayland. (I didn't test.)
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-01-07 22:32:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=854f8bb5cc7c3a80d6a7c2c9e2e77cd5019b3feb

commit 854f8bb5cc7c3a80d6a7c2c9e2e77cd5019b3feb
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-01-07 17:00:01 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-01-07 22:32:08 +0000

    games/veloren: unbreak Wayland support

    PR:             268810

 games/veloren/Makefile                  |   3 +-
 games/veloren/files/patch-wayland (new) | 503 ++++++++++++++++++++++++++++++++
 2 files changed, 505 insertions(+), 1 deletion(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-01-07 22:33:43 UTC
A commit in branch 2023Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=634d84874d4800a073f732230e26d55c1ad57d86

commit 634d84874d4800a073f732230e26d55c1ad57d86
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-01-07 17:00:01 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-01-07 22:32:42 +0000

    games/veloren: unbreak Wayland support

    PR:             268810
    (cherry picked from commit 854f8bb5cc7c3a80d6a7c2c9e2e77cd5019b3feb)

 games/veloren/Makefile                  |   3 +-
 games/veloren/files/patch-wayland (new) | 503 ++++++++++++++++++++++++++++++++
 2 files changed, 505 insertions(+), 1 deletion(-)
Comment 3 Jan Beich freebsd_committer freebsd_triage 2023-01-07 22:36:10 UTC
pkg-message is for FreeBSD-specific issues. WLR_RENDERER=vulkan was another workaround (until wlroots 0.17).

Anyway, enjoy the fix! 0.14 release party may have ended but joining server.veloren.net (for multiplayer) should work until the server is updated (tracks "weekly" tag).
Comment 4 (intentionally left blank) 2023-04-30 21:32:33 UTC
Thanks for updating the bundled wayland-rs crate.

Kivi on server.veloren.net reported cursor not showing under Wayland. I can also reproduce here on sway, cursor disappears while in full screen. I didn't notice this earlier as I don't play full screen, and Kivi also didn't submit a downstream bug as suggested, so I'm leaving this comment here as a report.

There is nothing to report upstream since games/veloren-weekly bundles newer wayland-rs than upstream has, and Wayland brokenness was already reported.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2023-04-30 22:31:37 UTC
(In reply to throwaway_vthgwq4 from comment #4)
> Thanks for updating the bundled wayland-rs crate.

It's a cherry-pick, not an update. Veloren is stuck with the old winit which has unstable Wayland support.

https://gitlab.com/veloren/veloren/-/issues/1464

> cursor not showing under Wayland

On title screen / main menu, character menu (just before game), settings menu (during game), etc?

> I don't play full screen

I don't play Veloren at all, so my runtime testing is limited. Cherry-picking a fix requires reliable steps to reproduce to get quick feedback during bisecting.

For example, I do see cursor in fullscreen in main menu and character menu but settings menu quickly crashes due to

  ERROR veloren_voxygen::window: Error centering cursor position: NotSupported(NotSupportedError)

center_cursor in Veloren calls set_cursor_position in winit which isn't implemented on Wayland until https://github.com/rust-windowing/winit/commit/9e6f66661634

> There is nothing to report upstream

Upstream can reproduce on sufficiently old Wayland compositors.

https://gitlab.com/veloren/veloren/-/issues/1353
https://gitlab.com/veloren/veloren/-/issues/1661
Comment 7 (intentionally left blank) 2023-05-01 03:39:31 UTC
(In reply to Jan Beich from comment #5)

>> cursor not showing under Wayland
>On title screen / main menu, character menu (just before game), settings menu (during game), etc?

$ veloren-voxygen
(cursor is shown in full screen until joining game world, then cursor is not shown after either calling in-game map by pressing M, or in any menu)

> Cherry-picking a fix requires reliable steps to reproduce to get quick feedback during bisecting.

$ env -u DISPLAY -u XCURSOR_THEME veloren-voxygen
(join the game world)
(try calling in-game map by pressing M, see no cursor)

Setting XCURSOR_THEME helps here. Sorry for not checking the upstream manual
for a workaround in advance before reporting.

> settings menu quickly crashes

Can't reproduce here with yesterday's -CURRENT and ports from main.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2023-08-22 10:13:31 UTC
After https://github.com/swaywm/sway/commit/fc16fb65491b it crashes again:

$ veloren-voxygen
[...]
interface 'wl_surface' has no event 2

Backporting https://github.com/smithay/wayland-rs/commit/04096e23bfe2 didn't help due to old smithay-client-toolkit, so let's wait for https://gitlab.com/veloren/veloren/-/merge_requests/3980 instead. wlroots 0.17 hasn't been released yet while hyprland isn't affected.
Comment 9 commit-hook freebsd_committer freebsd_triage 2023-09-20 14:36:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=18741dd85a2e8e88c89e2fcbaa7c71d48f4d3740

commit 18741dd85a2e8e88c89e2fcbaa7c71d48f4d3740
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-08-03 00:39:51 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-09-20 14:35:01 +0000

    x11-wm/sway-devel: unbreak Rust-based clients after edd477c5e7a4

    interface 'wl_surface' has no event 2

    PR:             268810

 audio/spotify-player/Makefile               |  2 +-
 audio/spotify-player/files/patch-sctk (new) | 15 +++++++++++++++
 games/jumpy/Makefile                        |  2 +-
 games/jumpy/files/patch-sctk (new)          | 15 +++++++++++++++
 games/punchy/Makefile                       |  2 +-
 games/punchy/files/patch-sctk (new)         | 15 +++++++++++++++
 games/veloren-weekly/Makefile               |  2 +-
 games/veloren-weekly/files/patch-sctk (new) | 15 +++++++++++++++
 misc/binocle/Makefile                       |  2 +-
 misc/binocle/files/patch-sctk (new)         | 15 +++++++++++++++
 net/sniffnet/Makefile                       |  2 +-
 net/sniffnet/files/patch-sctk (new)         | 15 +++++++++++++++
 security/gpg-tui/Makefile                   |  1 +
 security/gpg-tui/files/patch-sctk (new)     | 15 +++++++++++++++
 x11/alacritty/Makefile                      |  2 +-
 x11/alacritty/files/patch-sctk (new)        | 15 +++++++++++++++
 x11/kickoff/Makefile                        |  2 +-
 x11/kickoff/files/patch-sctk (new)          | 25 +++++++++++++++++++++++++
 x11/rio/Makefile                            |  1 +
 x11/rio/files/patch-sctk (new)              | 15 +++++++++++++++
 x11/wezterm/Makefile                        |  2 +-
 x11/wezterm/files/patch-sctk (new)          | 15 +++++++++++++++
 22 files changed, 186 insertions(+), 9 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2023-09-20 14:45:18 UTC
A commit in branch 2023Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5c9692ca786cc9e0c9c9ff9c67cab97cb68b422b

commit 5c9692ca786cc9e0c9c9ff9c67cab97cb68b422b
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-08-03 00:39:51 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-09-20 14:42:48 +0000

    x11-wm/sway-devel: unbreak Rust-based clients after edd477c5e7a4

    interface 'wl_surface' has no event 2

    PR:             268810
    (cherry picked from commit 18741dd85a2e8e88c89e2fcbaa7c71d48f4d3740)

 audio/spotify-player/Makefile               |  2 +-
 audio/spotify-player/files/patch-sctk (new) | 15 +++++++++++++++
 games/jumpy/Makefile                        |  2 +-
 games/jumpy/files/patch-sctk (new)          | 15 +++++++++++++++
 games/punchy/Makefile                       |  2 +-
 games/punchy/files/patch-sctk (new)         | 15 +++++++++++++++
 games/veloren-weekly/Makefile               |  1 +
 games/veloren-weekly/files/patch-sctk (new) | 15 +++++++++++++++
 misc/binocle/Makefile                       |  2 +-
 misc/binocle/files/patch-sctk (new)         | 15 +++++++++++++++
 net/sniffnet/Makefile                       |  1 +
 net/sniffnet/files/patch-sctk (new)         | 15 +++++++++++++++
 security/gpg-tui/Makefile                   |  2 +-
 security/gpg-tui/files/patch-sctk (new)     | 15 +++++++++++++++
 x11/alacritty/Makefile                      |  1 +
 x11/alacritty/files/patch-sctk (new)        | 15 +++++++++++++++
 x11/kickoff/Makefile                        |  2 +-
 x11/kickoff/files/patch-sctk (new)          | 25 +++++++++++++++++++++++++
 x11/wezterm/Makefile                        |  2 +-
 x11/wezterm/files/patch-sctk (new)          | 15 +++++++++++++++
 20 files changed, 170 insertions(+), 7 deletions(-)