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

[Feature Request]: Add support for user-defined compositors #27

Closed
suhan-paradkar opened this issue Sep 5, 2021 · 18 comments
Closed

[Feature Request]: Add support for user-defined compositors #27

suhan-paradkar opened this issue Sep 5, 2021 · 18 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@suhan-paradkar
Copy link
Collaborator

As of now T:X11 supports it's built-in compositor only, but I plan on to add support for user-defined compositors, like Weston.. as of now, I am able to compile Weston for termux, but this feature is gonna take a lot of work.....

@suhan-paradkar suhan-paradkar added the enhancement New feature or request label Sep 5, 2021
@twaik
Copy link
Member

twaik commented Sep 5, 2021

T:X11 has no compositor. At all. It shows a picture Xwayland sends him. Another reason it can not be implemented is missing graphical acceleration (GL/GLES). It is essential dependency for most of compositors.

@suhan-paradkar
Copy link
Collaborator Author

About Graphical Acceleration.. we can use libhybris?

@twaik
Copy link
Member

twaik commented Sep 6, 2021

Libhybris is not an option. Android linker restricts linking to android private libraries.
But we can try to modify android-emugl. It is much better than nothing.

@suhan-paradkar
Copy link
Collaborator Author

Well.. we can use gl4es also?... It is now in the x11-repo...

@twaik
Copy link
Member

twaik commented Sep 6, 2021

Gl4es allows us to use desktop GL if there is GLES. It is only a command translator working on top of GLES. But in our case it is useless because GLES is unavailable.

@twaik
Copy link
Member

twaik commented Oct 10, 2021

@wmcb-tech @suhan-paradkar what do you think about moving project to work on top of libweston? Wlroots and others require a lot of work to make them work on top of Android, libweston is almost ready.
But I am afraid this project will contain all of the dependencies, not prebuilt libs.

@twaik
Copy link
Member

twaik commented Oct 10, 2021

That should fix random native crashes...

@twaik
Copy link
Member

twaik commented Oct 10, 2021

I think wlroots will be an option when Xwayland will be fixed there...

@ZhymabekRoman
Copy link

But we can try to modify android-emugl. It is much better than nothing.

Maybe it makes sense to try using VirGL? Eltechs by the way originally wanted it in Exagear to get hardware acceleration

@twaik
Copy link
Member

twaik commented Oct 11, 2021

It makes sence. My friend tried to do that.
https://github.com/mittorn/virglrenderer-android
But this solution segfaults all the time.
And we did not find a way to fix it.

@ZhymabekRoman
Copy link

There is also such a modification, like more or less operable: https://github.com/Grima04/virgl-vtest-launcher

@twaik
Copy link
Member

twaik commented Oct 11, 2021

There is also such a modification

Things to note:

  • This app requires root.
  • You need the specific BusyBox version linked in the quick installation guide. Other BusyBox versions like the BusyBox Magisk module might not work.
  • Only Adreno GPUs are supported (unless you want to use software rendering).
  • A relatively recent Snapdragon Android device with the DRM/DRI GPU interface is needed (check if /dev/dri/card0 exists on the device).

I do not think it is applicable here...

I think wlroots will be an option when Xwayland will be fixed there...

Ok, I was wrong. It is already fixed in last versions. At least the most recent Xwayland works on top of the most recent wlroots (tinywl). I will start moving this week. This should fix #25, #40, #44, #45.
And I am not sure how to write backend right...
And we will have a lot of sources in our repo. Wlroots + all of it's dependencies.

@Heasterian
Copy link

It makes sence. My friend tried to do that. https://github.com/mittorn/virglrenderer-android But this solution segfaults all the time. And we did not find a way to fix it.

One guy upgraded this project with recent sources of virgl, but it's still crashing on Mali devices. Probably blob don't like it. It's working pretty fine with Adreno and Tegra. I also didn't try Vulkan as Venus don't like blobs (It don't work with Nvidia linux drivers for Tegra X1 atm).

@twaik
Copy link
Member

twaik commented Oct 11, 2021

Even in the case it worked I prefer to do more important stuff. For now the most important thing is core crash which I can not fix. That is a reason I am playing around wlroots now.

@Heasterian
Copy link

I know, I think that they are information that can be useful for you in future. I'm testing suff on Poco F1 running mobian. Also looks like some guys from China are working further on vtest for Android https://github.com/AOF-Dev/virglrenderer-android

I can't code on my own, but I'm tracking a lot of projects so I can research some usefull ones to get GPU acceleration if you want.

@twaik
Copy link
Member

twaik commented Oct 12, 2021

Maybe you know how to use Android.mk's BUILD_HOST_EXECUTABLE in Android NDK's project? My goal is to fully integrate libffi, libwayland and wlroots into Lorie projects without using prebuilt libraries, but NDK lacks "generator" feature. I can not use Android.mk to build some tools to generate the code I need.
The best solution is to build libffi, libwayland, wlroots, etc. With termux-packages build system and then link Termux:X11 with these libraries. But I think it will break building app in Github Action. And building process will be much more complicated.
Maybe you know someone who can help me with this stuff?

@Heasterian
Copy link

This it only thing I found about this: https://blog.actorsfit.com/a?ID=00750-dc14df27-348f-4ce1-af32-ee8e00b860c1

I'll ask some devs in other project if someone have idea how to do this.

@DLC01
Copy link

DLC01 commented Jan 23, 2022

For getting hardware accelerated graphics could mesa's Zink (opengl over Vulkan) driver be used here?
It has been made working in termux (https://github.com/DLC01/mesa) and seems to work properly in GPU's which have implemented the Vulkan API, some problems may arise sometimes because of the android gpu driver missing some of Zink's base requirements but it will work without any issues for most of the times

Sorry for my messy English..

@twaik twaik added the wontfix This will not be worked on label Jul 5, 2022
@twaik twaik closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants