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

No window controls in WSL2 #370

Open
ItachiSan opened this issue Oct 29, 2024 · 6 comments
Open

No window controls in WSL2 #370

ItachiSan opened this issue Oct 29, 2024 · 6 comments

Comments

@ItachiSan
Copy link

Hi, I am trying to run Waydroid under WSL2 and got it to work... Mostly.

I did:

  1. Compile my own kernel with the additional modules enabled
  2. Modified Waydroid to work in a VM
  3. Used https://github.com/viruscamp/wslg-links to solve Wayland references issues

I am able to get Cage to work and render the Waydroid image, however it is missing window decoration and thus I am unable to resize the window or move it at all.

I am open to provide additional logs and test stuff.

The OS I use is Arch WSL, however I have the same issue in Ubuntu 24.04 WSL.

@ZirixCZ
Copy link
Contributor

ZirixCZ commented Oct 29, 2024

Hello. When you mention "however it is missing window decoration" do you mean decorations of the window within cage?

@ItachiSan
Copy link
Author

Hi, no, I mean of cage itself.
When I e.g. run weston in kiosk mode, it does have a window frame and toolbar.

@ZirixCZ
Copy link
Contributor

ZirixCZ commented Oct 29, 2024

Could you check whether tinywl has its decorations shown as expected.

To run tinywl --
Setup wlroots build with meson and make it with ninja. Then, to start tinywl with an argument, you can do ./tinywl/tinywl -s <appofchoice> considering you're in the wlroots build directory.

Is cage shown in fullscreen? Perhaps this, or similar issues in the same repo, will be useful: microsoft/wslg#530

I cannot test it myself, since I don't have any machines running Microsoft windows. Good luck!

@joggee-fr
Copy link
Collaborator

WSLg is based on Weston and this compositor does not support server-side decoration. By design, Cage does not draw client-side decoration even when used as nested compositor.
I am not sure of XWayland behavior (XWayland on top of WLSg weston) and no env to test right now. You may give it a shot unsetting WAYLAND_DISPLAY environment variable in the env you're launching Cage. Ensure DISPLAY environment variable is set.

@ItachiSan
Copy link
Author

@joggee-fr got nothing, this was the error log:

Error log (open to see)

[waydroid@TUG-GIOVANNI ~]$ _WAYLAND_DISPLAY=$WAYLAND_DISPLAY
[waydroid@TUG-GIOVANNI ~]$ unset WAYLAND_DISPLAY
[waydroid@TUG-GIOVANNI ~]$ cage -- /usr/bin/waydroid show-full-ui
00:00:00.014 [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
libEGL warning: MESA-LOADER: egl: failed to open vgem: driver not built!

00:00:00.015 [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
libEGL warning: failed to open /dev/dri/card0: Permission denied

00:00:00.015 [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
00:00:00.015 [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"
00:00:00.015 [render/egl.c:268] Failed to initialize EGL
00:00:00.015 [render/egl.c:571] Failed to initialize EGL context
00:00:00.015 [render/gles2/renderer.c:499] Could not initialize EGL
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.018 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.019 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.019 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.019 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.019 [xwayland/sockets.c:96] /tmp/.X11-unix is not a directory
00:00:00.019 [xwayland/sockets.c:217] No display available in the first 33
00:00:00.019 [../cage/cage.c:535] Cannot create XWayland server
00:00:00.039 [types/output/render.c:24] output backend and allocator buffer capabilities don't match
00:00:00.039 [../cage/output.c:265] Failed to initialize output rendering
00:00:00.040 [backend/x11/backend.c:704] X11 error: op ChangeProperty (no minor), code Atom (no extension), sequence 59, value 0
[14:26:53] Starting waydroid session
[14:27:11] Android with user 0 is ready

@joggee-fr
Copy link
Collaborator

@ItachiSan, not creating the XWayland server in Cage is not a fatal error. If you are building Cage yourself, you can also disable XWayland option (-Dwlroots:xwayland=disabled).
However, you should be able to launch an X11 client in the base environment i.e. the same you are launching Cage. Is the DISPLAY variable well set? Are you able to run a simple X11 client instead of Cage, xeyes for example. I know it works in the default WSL Ubuntu distribution.

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