Closed suhan-paradkar closed 2 years ago
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.
About Graphical Acceleration.. we can use libhybris?
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.
Well.. we can use gl4es also?... It is now in the x11-repo...
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.
@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.
That should fix random native crashes...
I think wlroots will be an option when Xwayland will be fixed there...
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
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.
There is also such a modification, like more or less operable: https://github.com/Grima04/virgl-vtest-launcher
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.
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).
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.
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.
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?
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.
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..
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.....