PostmarketOS with Plasma Mobile (Termux)
This setup uses proot-distro with postmarketOS v22.06 (based on Alpine Linux v3.16). This is the last version that runs Plasma Mobile correctly on Termux-X11 with ZINK hardware acceleration.
Newer Alpine versions (v3.17+) do not work without Wayland, which makes them unusable in this setup. The Plasma Mobile interface supports both portrait and landscape modes.
---Installation
Requirements
- Termux-X11 installed
- proot-distro installed
- Audio enabled in Termux
If you haven’t set this up yet, follow this guide first:
Fedora Rawhide with GNOME 46 (audio + X11 setup)
Step 1: Install Alpine Linux
pd install alpine
Step 2: Log in to Alpine
pd sh alpine
---
Step 3: Add postmarketOS Repository
Edit the repository list:
nano /etc/apk/repositories
Add this line:
https://mirror.postmarketos.org/postmarketos/v22.06
Save and exit (Ctrl + X, then Y, then Enter).
Replace Alpine edge with v3.16:
sed -i 's/edge/v3.16/g' /etc/apk/repositories
---
Step 4: System Setup and User Creation
clear
apk update && apk upgrade
apk add nano sudo neofetch alpine-conf
addgroup storage
addgroup power
addgroup network
adduser -g wheel,audio,video,power,storage,lp,sys,network user
Important: When setting the password, use numbers only. If you use letters, login will fail.
echo "user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers
su user -c "sudo setup-xorg-base postmarketos-ui-plasma-mobile maliit-keyboard"
exit
---
Step 5: Fix OS Identification
rm -f /etc/os-release
nano /etc/os-release
Paste the following:
PRETTY_NAME="postmarketOS v22.06"
NAME="postmarketOS"
VERSION_ID="v22.06"
VERSION="v22.06"
ID="postmarketos"
ID_LIKE="alpine"
HOME_URL="https://www.postmarketos.org/"
SUPPORT_URL="https://gitlab.com/postmarketOS"
BUG_REPORT_URL="https://gitlab.com/postmarketOS/pmaports/issues"
LOGO="postmarketos-logo"
Save and exit.
---Step 6: Create Startup Script (Termux)
Exit Alpine and return to the Termux shell.
nano alpinepm.sh
Paste this script:
killall pulseaudio
killall virgl_test_server
MESA_LOADER_DRIVER_OVERRIDE=zink \
GALLIUM_DRIVER=zink \
ZINK_DESCRIPTORS=lazy \
virgl_test_server --use-egl-surfaceless &
kill -9 $(pgrep -f "termux.x11") 2>/dev/null
pulseaudio --start
export XDG_RUNTIME_DIR=${TMPDIR}
termux-x11 :0 >/dev/null &
sleep 3
am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity >/dev/null 2>&1
sleep 1
proot-distro login alpine \
--user user \
--isolated \
--shared-tmp -- \
/bin/bash -c '
export PULSE_SERVER=127.0.0.1
export DISPLAY=:0
export MESA_GL_VERSION_OVERRIDE=4.6
export GALLIUM_DRIVER=zink
dbus-launch startplasma-x11
'
exit 0
Make it executable:
chmod +x alpinepm.sh
---
Step 7: Install Hardware Acceleration Packages (Termux)
pkg install mesa-zink virglrenderer-mesa-zink
---
Step 8: Start Plasma Mobile
./alpinepm.sh
To stop Plasma Mobile, press Ctrl + C or force-stop Termux.
Notes
- This setup is experimental but stable on supported devices
- Orientation switches automatically between portrait and landscape
- If you run into issues, leave a comment and feedback will be addressed