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

XDG-WM-Base missing #40

Closed
parkerlreed opened this issue Sep 29, 2021 · 29 comments
Closed

XDG-WM-Base missing #40

parkerlreed opened this issue Sep 29, 2021 · 29 comments
Assignees
Labels
bug Something isn't working

Comments

@parkerlreed
Copy link

parkerlreed commented Sep 29, 2021

wayland 1.19.0
xorg-xwayland 21.1.2

Arch Linux Aarch64 chroot (not proot)

Termux-X11 tmp dir is bind mounted to a folder within chroot. It finds the folder and sockets but complains about missing XDG-WM-Base protocol.

[root@localhost /]# Xwayland :1 > /dev/null &
[1] 15836
[root@localhost /]# glamor: No eglstream capable devices found
missing XDG-WM-Base protocol
(EE)
Fatal server error:
(EE) Couldn't add screen
(EE)

[1]+  Exit 1                  Xwayland :1 > /dev/null
@twaik
Copy link
Member

twaik commented Sep 30, 2021

You should not use Xwayland that is present in chrooted environment. It is not patched to work with Lorie. You should create $PREFIX/tmp/.X11_unix is it is not present and then mount --bind it to chrooted environment's /tmp/.X11_unix. After that you can start Lorie and Xwayland in termux.

@twaik
Copy link
Member

twaik commented Sep 30, 2021

Please, let me know if it worked.

@twaik twaik self-assigned this Sep 30, 2021
@RalfWerner
Copy link

RalfWerner commented Sep 30, 2021

After that you can start Lorie and Xwayland in termux.

I have been working so for years without problems. When using distros (proot-distro) is there (in your case) only to do:
(export) DISPLAY=:1. Also termux and several distros at the same time in one X11 is not a problem.

@twaik
Copy link
Member

twaik commented Oct 8, 2021

@parkerlreed ?

@parkerlreed
Copy link
Author

parkerlreed commented Oct 8, 2021

@twaik What's up?

After talking on Discord this is apparently due to updated Xorg and Xwayland. Since about a month ago. I've attempted package downgrades which are already a toss up on Arch. It doesn't straight out crash now but ends up crashing the Termux-X11 application.

@parkerlreed
Copy link
Author

Oh I am so sorry I missed the previous comments.

@parkerlreed
Copy link
Author

The current issue I have been having is Termux-X11 on the latest action builds does not create the Wayland files under usr/tmp. Is that the intended behavior now?

I guess I'm just confused on how to set up Termux currently to test this out.

@twaik
Copy link
Member

twaik commented Oct 8, 2021

You can try to reinstall both Termux:X11 app and termux-x11.deb from last successfull build artifact and try again.
And do not try to start Xwayland, it will not run. Starting technology changed since older releases. Use termux-x11 command.

@parkerlreed
Copy link
Author

I see the readme updated with some new instructions so I will give that a shot when I can

Thanks.

@parkerlreed
Copy link
Author

Confused as ever...

Screen_Recording_20211009-200336_Termux.mp4

@parkerlreed
Copy link
Author

I realized I didn't pass :1 to termux-x11 but same result says it can't open display

@parkerlreed
Copy link
Author

I'm dumb forgot the .X11 bind mount. Trying that now.

@parkerlreed
Copy link
Author

Still doesn't like it but slightly new error
Screenshot_20211009-201434_Termux

@Heasterian
Copy link

That "No protocol specified" message looks a bit generic. Did you try to use xhost +local: or even xhost + command in Termux after starting termux-x11 in console?

@twaik
Copy link
Member

twaik commented Oct 16, 2021

I found out where is the root of problem. Xwayland moved from wl_shell to xdg_wm_base protocol. That means new Xwayland is not compatible with Lorie. Will be fixed with moving to wlroots. Of cource if I will succeed in porting it...

@untoreh
Copy link

untoreh commented Dec 27, 2021

I can start a DE from a linuxdeploy container by mounting the X11 socket. However glxgears can't run, giving
Error: couldn't get an RGB, Double-buffered visual.
I assume this is because a linuxdeploy container doesn't have HW acceleration, whereas like xfce4 from termux is using proper mesa drivers?

@twaik
Copy link
Member

twaik commented Dec 27, 2021

Termux:X11 has no acceleration support for now.

@Heasterian
Copy link

I can start a DE from a linuxdeploy container by mounting the X11 socket. However glxgears can't run, giving Error: couldn't get an RGB, Double-buffered visual. I assume this is because a linuxdeploy container doesn't have HW acceleration, whereas like xfce4 from termux is using proper mesa drivers?

This errors is most likely caused by version missmatch of wayland-protocols or xwayland package between chroot and Termux. You need to use same version on both of them.

@Azkali
Copy link

Azkali commented Dec 28, 2021

Made a script which just compiles instructions and patches took here :
https://gxmersam.blogspot.com/p/getting-hardware-acceleration-on-termux.html

It is meant for native termux, I will share later how I got acceleration working inside a gentoo prefix (which should work in proot and chroot as well), but here you go for now :
https://gitlab.com/Azkali/adreno_termux

Edit: Also bootstraping a gentoo prefix for non-root users with different profiles for different usage. And more to come on my gitlab profile.

@iamSlightlyWind
Copy link

iamSlightlyWind commented Feb 8, 2022

Made a script which just compiles instructions and patches took here: https://gxmersam.blogspot.com/p/getting-hardware-acceleration-on-termux.html

It is meant for native termux, I will share later how I got acceleration working inside a gentoo prefix (which should work in proot and chroot as well), but here you go for now : https://gitlab.com/Azkali/adreno_termux

Edit: Also bootstraping a gentoo prefix for non-root users with different profiles for different usage. And more to come on my gitlab profile.

@Azkali Hi, I'm trying to follow your instructions, but I'm having a problem finding ~/dir/wayland-protocols/autogen.sh when compiling wayland protocols. I can't find the autogen.sh on their repository either. Also, it seems that you already compiled Xwayland in compiling xorgproto part, not that changing it makes a difference. Can you tell me where can I find the autogen.sh in

cd ~/dir/wayland-protocols
./autogen.sh --prefix $PREFIX

Thanks!

@parkerlreed
Copy link
Author

Looks like they changed over to meson for the build system. May be able to simply see what they suggest for building and modify the script accordingly.

@iamSlightlyWind
Copy link

I think I was able to correctly built wayland-protocols, however their guide also mentions files that previously don't exist: ~/instructions/patches/mesa/*.patch , ~/instructions/patches/epoxy/*.patch and ~/instructions/patches/xorg/*.patch. I have no idea how many .patchs there were, or where to get them. Ignoring the patches leads to build errors which again I have no idea if they were caused by missing patches, or missing dependencies (nm of binutils was also needed in the required packages, but not present on the guide).

@twaik
Copy link
Member

twaik commented Feb 8, 2022

@iamSlightlyWind that is from suhan-paradkar's tewmux-disabled (releases).

Screenshot

Screenshot_20220209-003259_Chrome

@iamSlightlyWind
Copy link

iamSlightlyWind commented Feb 9, 2022

Thank you all! The framerates look surprisingly decent now.

Screen_Recording_20220209-065458_TermuxX11.mp4

Edit: took some time, but here is the unattended script to install and compile from scratch.

@twaik
Copy link
Member

twaik commented Feb 9, 2022

@iamSlightlyWind Can you please make one more video with VLC using different renderers (GLES, GL, xcb, xrender)?

@DLC01
Copy link

DLC01 commented Feb 9, 2022

I think I was able to correctly built wayland-protocols, however their guide also mentions files that previously don't exist: ~/instructions/patches/mesa/*.patch , ~/instructions/patches/epoxy/*.patch and ~/instructions/patches/xorg/*.patch. I have no idea how many .patchs there were, or where to get them. Ignoring the patches leads to build errors which again I have no idea if they were caused by missing patches, or missing dependencies (nm of binutils was also needed in the required packages, but not present on the guide).

an new version of the instructions and patches were released quite recently which should adress most of the build issues

@iamSlightlyWind
Copy link

iamSlightlyWind commented Feb 9, 2022

@iamSlightlyWind Can you please make one more video with VLC using different renderers (GLES, GL, xcb, xrender)?

I don't actually understand what specific things you want me to try. My understanding is that you want me to try VLC installed in a proot, but I have no idea as to how to use different renderers (yet?). Although, I was able to try glmark2-es with results:

=======================================================
    glmark2 2021.12
=======================================================
    OpenGL Information
    GL_VENDOR:     Collabora Ltd
    GL_RENDERER:   zink (Adreno (TM) 650)
    GL_VERSION:    OpenGL ES 3.1 Mesa 21.2.0-devel (git-b897012054)
=======================================================
[jellyfish] <default>:WARNING: linker: Warning: "/vendor/lib64/libllvm-qgl.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
 FPS: 57 FrameTime: 17.544 ms
[refract] <default>: FPS: 52 FrameTime: 19.231 ms
[terrain] <default>: FPS: 43 FrameTime: 23.256 ms
[desktop] <default>: FPS: 34 FrameTime: 29.412 ms
=======================================================
                                  glmark2 Score: 46
=======================================================

comparing to glmark2(mesa?), removed warnings:

=======================================================
    glmark2 2021.12
=======================================================
    OpenGL Information
    GL_VENDOR:     Collabora Ltd
    GL_RENDERER:   zink (Adreno (TM) 650)
    GL_VERSION:    2.1 Mesa 21.2.0-devel (git-b897012054)
=======================================================
[jellyfish] <default>:WARNING: linker: Warning: "/vendor/lib64/libllvm-qgl.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
 FPS: 111 FrameTime: 9.009 ms
[refract] <default>: FPS: 63 FrameTime: 15.873 ms
[terrain] <default>: FPS: 54 FrameTime: 18.519 ms
[desktop] <default>: FPS: 89 FrameTime: 11.236 ms
=======================================================
                                  glmark2 Score: 79
=======================================================

Though, this may not be what you are looking for since the renderer still said it's zink. Sorry, I don't have any experience beforehand as to how to do all this but I prob can follow instructions. ATM I'm just trying to get termux:x11 to work in chroot according to #45 with hopefully some sort of hardware acceleration based on this script/method since xsdl server is pissing me off.

@twaik twaik added the bug Something isn't working label Jul 29, 2022
@twaik twaik closed this as completed in 09a0fca Feb 1, 2023
@parkerlreed
Copy link
Author

Holy crap. Thank you! Excited to try this again.

@twaik
Copy link
Member

twaik commented Feb 1, 2023

In video in this post you started termux-x11 but did not specify display number. You should do it like this: termux-x11 :1 -shm -one .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants