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

Unable to create wlroots backend #331

Open
J-Cake opened this issue Apr 14, 2024 · 6 comments
Open

Unable to create wlroots backend #331

J-Cake opened this issue Apr 14, 2024 · 6 comments

Comments

@J-Cake
Copy link

J-Cake commented Apr 14, 2024

Hi, I'm so keen to get cage working but am stuck at this error:

[jcake@jcake-edu cage]$ XDG_RUNTIME_DIR=/run/user/0 sudo -E ./build/cage obsidian 
[sudo] password for jcake: 
00:00:00.000 [backend/wayland/backend.c:592] Could not connect to remote display: No such file or directory
00:00:00.000 [../cage.c:299] Unable to create the wlroots backend

I'm trying to run obsidian on Cage. I've tried various combinations of search queries but haven't had much luck, but here's the gist of what I've tried:

  • I've installed all necessary dependencies: wlroots, xdgcommon and even one called wayland.
  • Built from source
  • Tried every combination of environment variable
  • screaming at my computer
  • changing OSes
  • stracing the cage process
  • installing obsidian from various sources

The error is referring to /run/user/1000/wayland-0 since that's what WAYLAND_DISPLAY is set to.

I'm hoping for a some insight into how I could debug this further.

Thanks

@emersion
Copy link
Contributor

emersion commented Apr 14, 2024

If WAYLAND_DISPLAY is set, wlroots will select the Wayland backend instead of DRM (so it will try to connect to a parent Wayland compositor and run cage in a nested window).

Note that it's not possible to start cage with the DRM backend when another compositor is running. You need to start from a TTY.

@J-Cake
Copy link
Author

J-Cake commented Apr 14, 2024

Thanks for the speedy reply! I'm indeed running from a TTY, but even without the WAYLAND_DISPLAY environment variable I'm still getting an error, although a different one:

[jcake@jcake-edu cage]$ WLR_RENDERER_ALLOW_SOFTWARE=1 ./build/cage obsidian -- --enable-features=UseOzonePlatform --ozone-platform=wayland
00:00:00.001 [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
00:00:00.001 [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
pci id for fd 14: 1234:1111, driver (null)
MESA-LOADER: failed to open bochs-drm: /usr/lib/dri/bochs-drm_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
pci id for fd 17: 1234:1111, driver (null)
MESA-LOADER: failed to open bochs-drm: /usr/lib/dri/bochs-drm_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
00:00:00.044 [xwayland/server.c:454] Cannot find Xwayland binary "/usr/bin/Xwayland"
00:00:00.045 [../cage.c:515] Cannot create XWayland server
00:00:00.045 [../cage.c:548] Unable to open Wayland socket: Invalid argument

If it's at all possible to avoid Xwayland, that would be even better

@emersion
Copy link
Contributor

"Unable to open Wayland socket: Invalid argument": this message is triggered by a misconfigured XDG_RUNTIME_DIR (probably cage cannot create a file in that dir).

@J-Cake
Copy link
Author

J-Cake commented Apr 15, 2024

I did run it previously with XDG_RUNTIME_DIR=/run/user/1000 but recall getting a similar error. I'll let you know when I'm back at my computer

@J-Cake
Copy link
Author

J-Cake commented May 27, 2024

Hi sorry for the non-response. I can confirm I get the same error

@cammelspit
Copy link

I am getting the same error and haven't quite figured it out yet. I have used cage on other systems just not my current pure Arch build so frankly, I assume I'm missing something somewhere.

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

No branches or pull requests

3 participants