Repository navigation
your repo is really broken #12
Description
Activity
@FZXO11
I have a question.
Which branch(repo) did you use to build?Did you apply the
Termux-X11 DRI3 patchbefore building?Thank you for your feedback.
turnip+zink not working is termux-x11 problem with mesa compiled for glibc btw.
The modifications made to the Mesa source code in this repository are largely based on a series of patches by @xMeM. Our current priority is to ensure hardware acceleration via the Adreno GPU works reliably when running PRoot, Chroot, or LXC containers through Termux, which necessitates compatibility with Termux:X11.
i am also surprised with the very low score you got on vkmark with your a6xx gpu it should be at least 4500~ and for a7xx its 6500~
I don’t think that running
vkmarkwith Turnip under Termux:X11 would yield such high scores. I’ve only achieved scores above 1000 when runningvkmarkwithvulkan-wrapper-androidin Termux Native: lfdevs/termux-packages#1 (comment) Recently, I also re-tested the Turnip driver built by Josephhan629 from two years ago. On Debian 12,vkmark2ran successfully, but the Adreno 730 scored only 800+—surprisingly lower than the Adreno 660. This observation aligns with @hansm629's comments in discussions under xMeM’s original PR:termux/termux-packages#17561 (comment)
termux/termux-packages#17561 (comment)Detailed
vkmark2results on Adreno 730:======================================================= vkmark 2025.01 ======================================================= Vendor ID: 0x5143 Device ID: 0x7030002 Device Name: Turnip Adreno (TM) 725 Driver Version: 100663395 Device UUID: e035aeb006acac3a1842998f36a942cc ======================================================= [vertex] device-local=true: FPS: 794 FrameTime: 1.259 ms [vertex] device-local=false: FPS: 796 FrameTime: 1.256 ms [texture] anisotropy=0: FPS: 806 FrameTime: 1.241 ms [texture] anisotropy=16: FPS: 762 FrameTime: 1.312 ms [shading] shading=gouraud: FPS: 833 FrameTime: 1.200 ms [shading] shading=blinn-phong-inf: FPS: 742 FrameTime: 1.348 ms [shading] shading=phong: FPS: 718 FrameTime: 1.393 ms [shading] shading=cel: FPS: 714 FrameTime: 1.401 ms [effect2d] kernel=edge: FPS: 1054 FrameTime: 0.949 ms [effect2d] kernel=blur: FPS: 646 FrameTime: 1.548 ms [desktop] <default>: FPS: 879 FrameTime: 1.138 ms [cube] <default>: FPS: 1127 FrameTime: 0.887 ms [clear] <default>: FPS: 1263 FrameTime: 0.792 ms ======================================================= vkmark Score: 856 =======================================================i guess you should test the patches one by one to find what is going on with your weird repo.
I’ve also been experimenting with xMeM’s earlier patches or older Mesa versions (e.g., 24.x) to diagnose and potentially fix the compatibility issues affecting Turnip on Adreno 7xx GPUs in builds from this repository. If these efforts prove ineffective, I may end up building Freedreno (OpenGL) and Turnip (Vulkan) from separate codebases. However, all of this will require additional time for validation and integration.
Notably, I’ve observed that Josephhan629’s Turnip driver—based on Mesa 24.1.0—still functions correctly under Debian 13 when paired with Freedreno from Mesa 26.0.0.
If you have any ideas or suggestions—especially regarding build workflows or configuration—I’d greatly appreciate your input.
@lfdevs
Now Here's the thing, you don't need to apply any patch at all if you just want to compile turnip
turnip+zink will need the dri3 patch but we are using freedreno kgsl anyway so just don't apply any wsi or dri3 patch
this should "yield high scores with turnip and termux-x11 in vkmark"
And btw xMeM have made a merged PR to termux-x11 long ago so that you don't need to compile turnip with any patch you don't seem very updated.@hansm629
I just use the official repo and compile turnip alone like thisgit clone https://gitlab.freedesktop.org/mesa/mesa
meson setup build -D platforms=x11 -Dgallium-drivers= -Dfreedreno-kmds=kgsl,msm -D vulkan-drivers=freedreno -Dshared-llvm=disabled -Dopengl=false
cd build && ninja install -j4
And no i don't apply a single patch for mesa turnip.
@FZXO11
I think further verification is needed, but
when I built Turnip from themain mesa brancha few months ago without applying theTermux-X11 DRI3 patch, it didn't work onscreen at all onPRoot-Distro Debian 13.I had to add the environment variable
MESA_VK_WSI_DEBUG=swfor the onscreen to work.I remember xMeM creating the DRI3 patch for Freedreno (kgls) and Turnip to work on Termux-X11.
Are you saying that even without that patch, it works on both Termux-X11's
bionic libc nativeandPRoot/Chroot glibcenvironment?Are you saying that even without that patch, it works on both Termux-X11's
bionic libc nativeandPRoot-Distro's glibcenvironment?Yes for turnip alone.
turnip+zink still needs a patch if you are on any glibc rootfs so just use freedreno kgsl instead.@FZXO11
IfDRI3 zero-copydoesn't work when used withzink, that seems like a different issue.Freedreno (kgsl)offers high performance, but
it suffers from artifact and Stuttering issues (probably only on Termux-X11).It's unstable for primary use.
Until
Freedreno (kgsl)works well in a Termux-X11zero-copyenvironment,
theTurnip + mesa zinkcombination will likely be more stable in terms of compatibility.@hansm629
freedreno does have the problems you mentioned both in termux-x11 and when flashed in android.ok but you should know that if you want to run vulkan programs at the best performance use turnip without any patches.
it's just one lib libvulkan_freedreno.so you can switch easily between patched turnip and unpatched turnip@lfdevs Now Here's the thing, you don't need to apply any patch at all if you just want to compile turnip turnip+zink will need the dri3 patch but we are using freedreno kgsl anyway so just don't apply any wsi or dri3 patch this should "yield high scores with turnip and termux-x11 in vkmark" And btw xMeM have made a merged PR to termux-x11 long ago so that you don't need to compile turnip with any patch you don't seem very updated.
@hansm629 I just use the official repo and compile turnip alone like this
git clone https://gitlab.freedesktop.org/mesa/mesa
meson setup build -D platforms=x11 -Dgallium-drivers= -Dfreedreno-kmds=kgsl,msm -D vulkan-drivers=freedreno -Dshared-llvm=disabled -Dopengl=false
cd build && ninja install -j4
And no i don't apply a single patch for mesa turnip.
Thank you for your sharing. I will try building Freedreno and Turnip using different branches (patched and unpatched) along with varying build configurations to test whether they can coexist and function together. If that proves unfeasible, using distinct environment variables to switch between Freedreno (KGSL) and Turnip + Zink would be a solid alternative.
If everything goes smoothly, I'll include a separate Turnip package in the future release, and for releases targeting specific package managers, I’ll also provide unpatched packages (e.g.,
mesa-vulkan-drivers).The reason for retaining Freedreno stems from my past experience: when certain Vulkan feature extensions are missing, Zink may expose an OpenGL version that falls short of the requirements for some applications (such as Blender 4 using the OpenGL backend). Similarly, Turnip on certain Adreno GPU models may also lack specific Vulkan extensions, making it unable to meet the requirements of other applications (like Blender 4.5 using the Vulkan backend). In these rare but critical scenarios, keeping Freedreno remains necessary.
I did a quick test, and Freedreno (KGSL) and Turnip can coexist and work well together. First, install the drivers in this repo, then overlay a separately built Turnip driver. Set the environment variable:
MESA_LOADER_DRIVER_OVERRIDE=kgsl TU_DEBUG=noconform
With this setup, OpenGL and OpenGL ES will automatically use the more efficient Freedreno driver (instead of Zink), while Vulkan will automatically use the Turnip driver.
On the Adreno 730, although
vkmarkstill crashes withSegmentation fault, applications likevkcubeand Vulkan-based software such as Godot v4.5.1 now run successfully.The command I used to build Turnip separately is as follows:
meson setup build/ \ --prefix=/usr \ -Dplatforms=x11,wayland \ -Dgallium-drivers= \ -Dvulkan-drivers=freedreno \ -Dlibunwind=disabled \ -Dmicrosoft-clc=disabled \ -Dvalgrind=disabled \ -Dgles1=disabled \ -Dfreedreno-kmds=kgsl \ -Dbuildtype=release ninja -C build/However, when running Godot games with Vulkan, noticeable screen tearing persists. I may try applying one or more the following simple patches from other repositories next to see if they yield any positive effects:
https://github.com/Weab-chan/freedreno_turnip-CI/tree/main/patches
https://github.com/MastaG/mesa-turnip-ppa/tree/main/turnip-patches@lfdevs yeah freedreno kgsl and turnip can co exist their libs never replace the other
https://github.com/Weab-chan/freedreno_turnip-CI/tree/main/patches https://github.com/MastaG/mesa-turnip-ppa/tree/main/turnip-patches
outdated.
@lfdevs yeah freedreno kgsl and turnip can co exist their libs never replace the other
https://github.com/Weab-chan/freedreno_turnip-CI/tree/main/patches https://github.com/MastaG/mesa-turnip-ppa/tree/main/turnip-patches
outdated.
Alright then, the performance when using both together is also quite satisfactory.
@lfdevs
Is there a way to coexist withZink?
Freedreno (kgsl)offers high performance,but it still fails in the Termux-X11 backend environment:
- mesa & DRM error messages
- GL/GLES artifacts
- stuttering
- etc
Because of the issues mentioned above,
some programs are forced to use
Zink.In particular,
VLC Playershowed significantly better performance withZinkthanFreedreno (kgsl)when playing 4K@60fps VP9 videos.Is there a way to coexist with
Zink?When you need to run certain applications using Zink, simply set the environment variable
MESA_LOADER_DRIVER_OVERRIDE=zink.For example, when launching the KDE Plasma desktop with the following command, all OpenGL and OpenGL ES applications will prefer the Freedreno (KGSL) driver:
sudo service dbus start MESA_LOADER_DRIVER_OVERRIDE=kgsl TU_DEBUG=noconform startplasma-x11
Then, when running Blender, using Zink can help avoid certain rendering issues. You can launch it with:
MESA_LOADER_DRIVER_OVERRIDE=zink blender
Unpatched Turnip drivers are provided in releases now: https://github.com/lfdevs/mesa-for-android-container/releases/tag/turnip-26.0.0-devel-20251215
- added 3 commits that reference this issue
on Dec 21, 2025 - added a commit that references this issue
on Jan 16, 2026 - added a commit that references this issue
on May 26, 2026
i was confused when i saw that in the README vulkan is not working but vulkan zink works which has been always the opposite, turnip working perfectly fine but turnip+zink doesnt for me and other users who just compile mesa directly even with applying freedreno kgsl patches which is unrelated and turnip+zink not working is termux-x11 problem with mesa compiled for glibc btw.
i am also surprised with the very low score you got on vkmark with your a6xx gpu it should be at least 4500~ and for a7xx its 6500~
i havent compiled mesa for a while so just to make sure i compiled now without any patch and it worked flawlessly on a735.
i guess you should test the patches one by one to find what is going on with your weird repo.