proot-distro icon indicating copy to clipboard operation
proot-distro copied to clipboard

[Feature]: Using Termux Vulkan-Loaer with PRoot-Dsitro

Open hansm629 opened this issue 11 months ago • 7 comments

Feature description

hello. Thanks to Termux+PRoot, I have built a Linux desktop on my Android Device and am using it well.

There is one thing that is disappointing. GPU acceleration is limited in SoCs other than the Snapdragon series.

Snapdragon series through mesa turnip + Termux-X11 DRI3 patch GPU acceleration is possible with almost full performance in the PRoot-Distro Linux environment, but

Other SoCs (ex: Dimensity, Exynos, Tensor) support GPU acceleration through virglrenderer-android, but compatibility and performance are very poor.

In the Termux environment, GPU acceleration is possible by loading the Android host Vulkan driver through Vulkan-Loader and implementing WSI through sysvk & Vulkan WSI Layer. (OpenGL&OpenGL ES acceleration is possible when combined with mesa zink, and OpenCL3.0 acceleration is possible when combined with clvk)

Technically, in the mid- to long-term, in the PRoot-Distro environment, Is it possible to load Termux Vulkan-Loader?

hansm629 avatar Mar 23 '24 17:03 hansm629

Using sysvk and wsi layer is possible because both sysvk and wsi layer are compiled with bionic, and Android libraries (and drivers) are compiled with bionic too. In the case of proot using this solution will not be possible because it uses glibc. It is simply not compatible. Using libhybris is not an option because of local thread storage incompatibility of libraries.

twaik avatar Mar 23 '24 19:03 twaik

@twaik So, is it okay to recognize that there is no other way to achieve GPU acceleration in a PRoot environment other than the Snapdragon series turnip?

At present, other SoCs do not show satisfactory compatibility in virgl, regardless of performance.

hansm629 avatar Mar 23 '24 20:03 hansm629

So, is it okay to recognize that there is no other way

It does not matter if it is ok or not. We do not have any choise.

twaik avatar Mar 23 '24 20:03 twaik

@twaik There will be no choice unless a new, better solution emerges T^T

Or would it be faster to port existing Linux distribution packages to the Termux package?

hansm629 avatar Mar 23 '24 20:03 hansm629

There will be no choice unless a new, better solution emerges T^T

Pull requests are always welcome.

Or would it be faster to port existing Linux distribution packages to the Termux package?

I do not think so. Our team is pretty much small and can not process such a big amount of packages.

twaik avatar Mar 23 '24 20:03 twaik

@twaik What do you think about the latest src's angle and virglrenderer?

As sir mentioned before, I am well aware that the latest is not necessarily the best.

However, I thought there might be some improvement in compatibility.

hansm629 avatar Mar 23 '24 21:03 hansm629

What do you think about the latest src's angle and virglrenderer?

I think nothing about it. I do not use this this software.

twaik avatar Mar 23 '24 21:03 twaik

Closing this as not going to be implemented.

twaik avatar Aug 12 '24 05:08 twaik