Skip to content

Wayland backend, support Shared memory buffers (not just dmabuf) #228

@mister-teddy

Description

@mister-teddy

Hello, I'm the maintainer of Local Desktop, an Android app to simulate a Linux desktop. What makes us distinctive from Termux or other apps is that instead of VNC/X11, we use Wayland, like this:

  • Our Android app only has a NativeActivity, which launches compiled Rust code.
  • Inside the Rust code, we built a Wayland compositor using Smithay, listening on an Unix socket inside the Android app’s internal data.
  • We use proot to run another desktop environment, either via Xwayland (which we currently use to make Xfce4 work), or a Wayland compositor with a Wayland backend.

As our attempt to use Hyprland as our default desktop environment, we failed to get the Wayland backend working. It seems like Hyprland's Wayland backend, which is aquamarine, only works with dmabuf?

if (!waylandState.xdg || !waylandState.compositor || !waylandState.seat || !waylandState.dmabuf || waylandState.dmabufFailed || !waylandState.shm) {
backend->log(AQ_LOG_ERROR, "Wayland backend cannot start: Missing protocols");
return false;
}

if (!primaryAllocator && (implementations.empty() || implementations.at(0)->type() != AQ_BACKEND_NULL)) {
log(AQ_LOG_CRITICAL, "Cannot open backend: no allocator available");
return false;
}

If it's true, do you think it is possible to support SHM in the Wayland backend? I'm not a C++ guy, so I'm not sure I can contribute any code.

Thank you for your support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions