This guide provides step-by-step instructions for enabling GPU acceleration in your Droidspaces containers. Whether you are running on an Android device or a Linux desktop, Droidspaces offers multiple ways to leverage hardware acceleration for a smooth graphical experience.
Hardware acceleration on Android is achieved by bridging the container's graphics stack with a host-side X server (Termux-X11). Droidspaces handles the complex mount management and security contexts required to make this seamless.
This method uses software rendering via llvmpipe. While it doesn't provide full hardware acceleration, it is the most stable way to run GUI applications when a compatible GPU driver isn't available.
When you enable the Termux X11 toggle in the Droidspaces app, the following sequence occurs:
tmpfs mount on top of Termux's /data/data/com.termux/files/usr/tmp in the host's mount namespace.
/data/data/com.termux/files/usr/tmp to the container is possible, it frequently breaks applications like apt or any tool performing heavy I/O in /tmp. This happens because Termux's data directory is protected by Android's File-Based Encryption (FBE), leading to "Required key not available" (ENOKEY) errors. By bridging the path via tmpfs, X11 sockets and temporary files become fully readable and writable by the container.
/tmp directory, enabling seamless communication between the container and the Termux-X11 app.
pkg install x11-repo && pkg install termux-x11
sudo apt install mesa-utils (for testing with glxgears)
ON (Hardware Access is not required for software rendering).
DISPLAY=:0 to the Environment Variables section and save.
termux-x11 :0
glxgears inside the container terminal. The output will render in the Termux-X11 app.
dbus-launch --exit-with-session startxfce4
This method provides GPU acceleration for non-Qualcomm devices (Mali/PowerVR) via a virglrenderer bridge. It translates OpenGL calls from the container into commands that the host Android OS can execute.
pkg install x11-repo && pkg install termux-x11 virglrenderer-android
sudo apt install mesa-utils (for testing with glxgears)
DISPLAY=:0
GALLIUM_DRIVER=virpipe
virgl_test_server_android &
termux-x11 :0
glxinfo -B and look for "VirGL" in the renderer string.
dbus-launch --exit-with-session startxfce4
virgl_test_server_android --angle-vulkan &For Qualcomm Adreno GPUs, Droidspaces supports native hardware acceleration using the Turnip driver. This bypasses the need for virgl and provides near-native performance.
pkg install x11-repo && pkg install termux-x11
DISPLAY=:0 to your environment variables.
termux-x11 :0
If you are using a non-root user, you must grant them access to the GPU device nodes:
sudo usermod -aG droidspaces-gpu
dbus-launch --exit-with-session startxfce4
/data/adb/modules/droidspaces/etc/droidspaces.te and uncommenting the line:
allow untrusted_app_27 droidspacesd fd useOn Linux-based hosts, GPU acceleration works natively with zero additional configuration within Droidspaces.
--hw-access CLI flag).
xhost +local:
DISPLAY number to the container's environment (usually :0):
echo "DISPLAY=:0" >> /etc/environment
© 2026 Droidspaces · GPLv3 · by ravindu644 and contributors