Skip to content

[Bug] Nested wlroots compositors abort since server's wl_compositor global is below version 6 #150

Description

@ap-1

Running a current wlroots-based compositor (Hyprland, and by extension sway/labwc) as an [[application]], e.g. to get a full remote desktop over the stream rather than a single game, crashes immediately on startup:

wl_display#1: error 0: Invalid binding of wl_compositor version 6 for global 1.
terminate called after throwing an instance of 'std::runtime_error'
  what():  CBackend::create() failed!
Hyprland has crashed :(

(SIGABRT + coredump; the moonshine session then reports unit ... state="failed".)

I think this is because Moonshine's compositor advertises the wl_compositor global at a version below 6. wlroots >=0.18 (via aquamarine) binds wl_compositor at version 6 and treats a failed bind as fatal, so every current wlroots compositor fails to initialize its Wayland backend when nested in Moonshine.

Moonshine vendors smithay 0.7.0 (the hgaiser/smithay master-moonshine fork), so the advertised wl_compositor version is controlled here. smithay should support bumping the advertised wl_compositor global to version 6.

Repro:

[[application]]
title = "Desktop"
command = ["Hyprland"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions