AOSC-Dev / aosc-os-abbs

ABBS/ACBS tree for AOSC OS package metadata, build configuration, scripts, and patches
https://packages.aosc.io
GNU General Public License v2.0
100 stars 78 forks source link

add workaround for wslg support #7218

Open nexplorer-3e opened 1 month ago

nexplorer-3e commented 1 month ago

Bug description

see https://github.com/viruscamp/wslg-links?tab=readme-ov-file#why as AOSC looks like using the newer systemd version, the wslg files are missing, cause wayland and x11 application to fail.

Steps to reproduce

eglinfo -B:

Wayland platform:
eglinfo: eglInitialize failed

X11 platform:
(not responding)

after manually create symlink (ln -sf /mnt/wslg/.X11-unix/* /tmp/.X11-unix/ && ln -sf /mnt/wslg/runtime-dir/wayland-* $XDG_RUNTIME_DIR/): (yes maybe need to hack env to disable zink warning)

Wayland platform:
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Microsoft Corporation
OpenGL core profile renderer: D3D12 (Intel(R) Iris(R) Xe Graphics)
OpenGL core profile version: 4.1 (Core Profile) Mesa 24.0.7
OpenGL core profile shading language version: 4.10
OpenGL compatibility profile vendor: Microsoft Corporation
OpenGL compatibility profile renderer: D3D12 (Intel(R) Iris(R) Xe Graphics)
OpenGL compatibility profile version: 4.1 (Compatibility Profile) Mesa 24.0.7
OpenGL compatibility profile shading language version: 4.10
OpenGL ES profile vendor: Microsoft Corporation
OpenGL ES profile renderer: D3D12 (Intel(R) Iris(R) Xe Graphics)
OpenGL ES profile version: OpenGL ES 3.0 Mesa 24.0.7
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.00

X11 platform:
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Microsoft Corporation
OpenGL core profile renderer: D3D12 (Intel(R) Iris(R) Xe Graphics)
OpenGL core profile version: 4.1 (Core Profile) Mesa 24.0.7
OpenGL core profile shading language version: 4.10
OpenGL compatibility profile vendor: Microsoft Corporation
OpenGL compatibility profile renderer: D3D12 (Intel(R) Iris(R) Xe Graphics)
OpenGL compatibility profile version: 4.1 (Compatibility Profile) Mesa 24.0.7
OpenGL compatibility profile shading language version: 4.10
OpenGL ES profile vendor: Microsoft Corporation
OpenGL ES profile renderer: D3D12 (Intel(R) Iris(R) Xe Graphics)
OpenGL ES profile version: OpenGL ES 3.0 Mesa 24.0.7
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.00

Update channel(s)

main

Package and version

No response

KexyBiscuit commented 1 month ago

Related: https://github.com/microsoft/wslg/issues/1156

nexplorer-3e commented 1 month ago

related: https://github.com/microsoft/wslg/issues/1244

nexplorer-3e commented 3 weeks ago

related: microsoft/wslg#1244

currently I use the workaround provided by https://github.com/viruscamp/wslg-links : place wslg-runtime-dir.services under /etc/systemd/user and activate it with systemctl --global to support multi-user. As for x11 service, simply put under /etc/systemd/system (administrator-controlled directory) should enough. Reason why not using tmpfiles is that it won't check whether the source exists, causing unexpected behavior on non-WSL environments, while the service files containing patch checks. edit: other oneshot command like mount --makeslave?