Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wayland: Remove all remaining X11 dependencies #1420

Open
michaelk83 opened this issue Jun 24, 2021 · 6 comments · May be fixed by #1895
Open

Wayland: Remove all remaining X11 dependencies #1420

michaelk83 opened this issue Jun 24, 2021 · 6 comments · May be fixed by #1895
Assignees
Milestone

Comments

@michaelk83
Copy link

First of all, congratulations and a big Thanks on finally landing #1393!

I went over the code very briefly, and it looks like there are still a few X11/Xorg dependencies remaining in the Wayland code. For example, WaylandKeyboardBackend doesn't look implemented, and still uses X11 symbols:

void WaylandKeyboardBackend::init()
{
    d->layouts.clear();

    QDir dir(QStringLiteral("/usr/share/X11/xkb/symbols"));
    auto entries = dir.entryList(QDir::Files);
    for (const auto &entry : qAsConst(entries))
        d->layouts << new KeyboardLayout(entry, entry);
}

This should be using libinput, I think?

Likewise, WaylandHelper is still using XAuth. Not sure what the alternative here is. Probably logind?

Here is the full list of X dependencies for version 0.19, according to Ubuntu packages:

  • libxcb-xkb1: X C Binding, XKEYBOARD extension
  • libxcb1: X C Binding
  • x11-common: X Window System (X.Org) infrastructure
  • xauth: X authentication utility
  • xserver-xorg: X.Org X server
    or xserver (virtual package)

Goal

All of these dependencies should be optional when running with Wayland. It should be possible to install and run SDDM/Wayland without any X dependencies.

@davidedmundson
Copy link
Member

XKB is still used on wayland even with libinput.

@michaelk83
Copy link
Author

michaelk83 commented Jun 24, 2021

At the moment perhaps, but eventually that may be removed. In any case, the goal here is to remove the direct X dependencies where possible. If libinput still depends on XKB internally, that's not up to SDDM. But SDDM can (maybe) replace the direct depency with libinput (when running on Wayland).

@plfiorini
Copy link
Member

plfiorini commented Jun 25, 2021

At the moment perhaps, but eventually that may be removed. In any case, the goal here is to remove the direct X dependencies where possible. If libinput still depends on XKB internally, that's not up to SDDM. But SDDM can (maybe) replace the direct depency with libinput (when running on Wayland).

libinput doesn't use xkb internally. We don't need libinput for keymaps.
The keymaps are an entirely different thing and libxkbcommon is used for that and there is a version without X dependencies.
Have you ever wondered why there is the libxkbcommon package and libxkbcommon-x11?

@plfiorini
Copy link
Member

Since SDDM supports X11 and Wayland at the same time, we still want X11 dependencies.
Wayland is still experimental for SDDM and not feature complete.

What we can do is to offer a compile time flag to disable entirely the X11 parts, but keep X11 enabled by default at least until the Wayland support is feature complete and stable.
A use case would be an embedded distro for a board or a smartphone.

@plfiorini plfiorini self-assigned this Jun 25, 2021
@plfiorini plfiorini added this to the 0.20 milestone Jun 25, 2021
@michaelk83
Copy link
Author

To be fair, I took a look at some other packages, and saw that even kwin-wayland and libqt5gui5 still install various X dependencies, at least in Ubuntu. And of course, a lot of apps still have issues in Wayland. So the larger goal of a pure Wayland system is still a while in the future.

What we can do is to offer a compile time flag to disable entirely the X11 parts, but keep X11 enabled by default at least until the Wayland support is feature complete and stable.

Yes, that's good. The key part is that the Wayland code won't depend on X11, as possible.

If #1421 is expanded to also runtime-detect whether an X server is installed, then you can still have the compile-time and runtime dependencies (only when using the X Server), but not the install-time dependencies.

@Koleon
Copy link

Koleon commented Sep 30, 2021

Hello guys,
what's the status of this ticket? Is there any way how to support it please? Will backing this bountysource https://www.bountysource.com/issues/99647136-wayland-remove-all-remaining-x11-dependencies help you? As I cannot propose PR at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants