Bug 259614 - x11-wm/plasma5-kwin: broken Xwayland support
Summary: x11-wm/plasma5-kwin: broken Xwayland support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-11-02 16:07 UTC by Jan Beich
Modified: 2021-12-17 10:49 UTC (History)
2 users (show)

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


Attachments
incomplete workaround (1.88 KB, patch)
2021-11-02 16:07 UTC, Jan Beich
no flags Details | Diff
v1 (suffix like wlroots) (1.87 KB, patch)
2021-11-02 18:12 UTC, Jan Beich
no flags Details | Diff
v1.1 (suffix like wlroots) (2.34 KB, patch)
2021-11-02 18:20 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2021-11-02 16:07:18 UTC
Created attachment 229225 [details]
incomplete workaround

Probably regressed by https://invent.kde.org/plasma/kwin/-/commit/9f0f4527029a
On FreeBSD abstract sockets aren't supported. See also files/patch-no-abstract from bug 258042.

https://man.freebsd.org/unix/4
https://www.man7.org/linux/man-pages/man7/unix.7.html

$ pkg install plasma5-kwin vulkan-tools
$ if [ -z "$WAYLAND_DISPLAY" ]; then export XDG_RUNTIME_DIR=$(mktemp -dt run); fi
$ kwin_wayland --xwayland --exit-with-session "vkcube-xcb --c 300"
[...]
kwin_xwl: Failed to find free X11 connection socket
Failed to establish X11 socket
Comment 2 Jan Beich freebsd_committer freebsd_triage 2021-11-02 18:20:15 UTC
Created attachment 229230 [details]
v1.1 (suffix like wlroots)

Oops, don't leave /tmp/.X11-unix/*_ (pseudo-abstract socket) after exit or error.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2021-11-07 22:16:18 UTC
plasma5-kwin-5.22.5 from /quarterly (2021Q4) fails in a similar way. However, the proposed fix doesn't apply "as is" because the affected file was renamed/moved in https://invent.kde.org/plasma/kwin/-/commit/f541d851edd9

FWIW, x11-wm/kwinft also has broken --xwayland but didn't inherit abstract sockets from KDE, so the cause is different. See https://gitlab.com/kwinft/kwinft/-/issues/208
Comment 4 Tobias C. Berner freebsd_committer freebsd_triage 2021-11-08 05:29:48 UTC
Cool, thanks for fixing.
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-11-08 17:40:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=03033c16bb99787ae83ea1a938550adfc1a6660a

commit 03033c16bb99787ae83ea1a938550adfc1a6660a
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-11-02 15:32:37 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-11-08 17:33:08 +0000

    x11-wm/plasma5-kwin: unbreak Xwayland support after 4ea20bee5063

    kwin_xwl: Failed to find free X11 connection socket

    PR:             259614
    Approved by:    tcberner

 x11-wm/plasma5-kwin/Makefile                       |  1 +
 .../patch-src_xwl_lib_xwaylandsocket.cpp (new)     | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-11-08 17:54:06 UTC
A commit in branch 2021Q4 references this bug:

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

commit a11f9c00e714212a48009593bb5c71c62dd47515
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-11-02 15:32:37 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-11-08 17:35:36 +0000

    x11-wm/plasma5-kwin: unbreak Xwayland support after 4ea20bee5063

    kwin_xwl: Failed to find free X11 connection socket

    PR:             259614
    Approved by:    tcberner

    (cherry picked from commit 03033c16bb99787ae83ea1a938550adfc1a6660a)

 x11-wm/plasma5-kwin/Makefile                       |  1 +
 .../files/patch-src_xwl_xwaylandsocket.cpp (new)   | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)
Comment 7 Jan Beich freebsd_committer freebsd_triage 2021-12-17 10:49:27 UTC
Also fixed upstream, see https://invent.kde.org/plasma/kwin/-/commit/34a0813567fb