Since my age turned into something serious, it's time to plan something serious. I was thinking a lot about writing down all of my ideas and turn them into something real. Let's deep dive together into my plans, unfinished projects, hope and duct tape-powered infrastructure, and my neurodivergent mind (beware, it's a chaos).
TL;DR for all of you, unattentive chooms
- Xperia 5 II (
pdx206) mainline Linux: Already booting mainline kernel v6.17 (postmarketOS / Nura) with display, touch, basic acceleration and USB SSH. Next up: audio, Wi-FI, cracking theqcom_scmerror -22 GPU/TrustZone blocker, a real pdx206's panel driver, and eventually modem + upstreaming vfio-windows-aio: works great for me, doesn't work great for anyone else. Awful to configure. Plan: decouple hardcoded hardware intoconfig.env, add crash recovery (trap), fix audio quirks, and add the superior AMD GPU support- Game Development: starting a new game project with my uni chooms. Details soon
- Contributors wanted! If you know SM8250/Device Trees, Freedreno, VFIO, AMD GPUs or bash, hit me up.
1. Xperia 5 II Mainline Linux port
I've been hyped for so long to actually make things work on this device. A lot of features still do not work, and I've already burned over 100 hours to make this shit work - seeking through Sony's Bootloader, starting from ramoops logs, doing questionable Device Tree surgery, fucking anything. Phone actually boots Mainline Linux kernel version 6.17 with postmarketOS now (need to switch to Nura + Nura's naming). Considering Sony left this wonderful phone with not-so wonderful SD865 CPU to rot on Android 12L, it genuinely asks me to run a real mainline kernel on it. Still, there's a long way between booting to SSH + rendering GNOME desktop on 2 FPS with software rendering, and an actually usable Linux phone. Here's where the project currently stands.
What works
Against all odds, core Linux system is genuinely alive on 6.17 kernel (also called linux-postmarketos-qcom-sm8250).
Getting past Sony's XBoot Bootloader was the first boss fight since it threw the huge ass "Your device is kaputt" or somethin' screen at any pure mainline DTB. My solution for that was a Hybrid DTB Pool - literally merging both Sony's stock kona.dtb and the mainline sm8250-sony-xperia-edo-pdx206.dtb together with cat util. XBoot somehow validates the first one, allows me to boot the mainline kernel, and kernel skips straight to the second .dtb file. I'm also pairing this with exact Kona mkbootimg offsets, a custom initramfs, enabling the missing drivers such as CONFIG_MMC / SDHCI inside the kernel configuration, and pdx206 reliably mounts my microSD card switch_roots into a full alpine-based environment (via systemd as PID 1).
All 8 Kryo 585 CPU cores are available with proper clock domains, ~7.6GB of RAM is available, and hardware watchdog is on (msm_watchdog) backed up by busybox watchdog in initramfs, which keeps the PMIC from rebooting the entire phone every 32 seconds. On the display and input side, the Samsung's s6sy761 touchscreen works via simpledrm, every physical button: POWER, VOL_UP, VOL_DOWN, even the Google Assistant button works... somehow. For actually talking to the phone (because Wi-Fi connection doesn't work) I use USB RNDIS on 172.16.42.0/24 address pool. It comes up automatically in initramfs and stays alive under systemd, giving me SSH connection to the phone, and internet passthrough from my Artix laptop (plus a fallback TCP netshell on port 23 in case something fucks up). Under the hood, PCIe host bridges are up, RTC works..?, NFC is detected, yet it wasn't tested yet, and all three Qualcomm DSPs: SLPI, CDSP, ADSP; load their firmware and boot cleanly.
| Element | Status | Important notes |
|---|---|---|
| CPU (Snapdragon 865) | Working | All 8 Kryo 585 cores |
| RAM | Working | Reports 7665808K out of 8317952K available |
microSD (OS, mmcblk0) | Working | Boots full ext4 rootfs after enabling CONFIG_MMC / SDHCI |
Display (simpledrm) | Working | Bootloader framebuffer, runs an awful GNOME Shell |
Touchscreen (s6sy761) | Working | GPIO I2C bus 13, address 0x48 |
| Hardware Buttons | Working | trust me bro |
| USB RNDIS + SSH | Working | 172.16.42.1, SSH + internet passthrough from host |
| Hardware Watchdog | Working | msm_watchdog takes over from busybox watchdog |
| DSPs | Working | slpi.mdt, cdsp.mdt, adsp.mdt loaded (remoteproc0-2 up) |
| PCIe Host Bridges | Working | 1c00000.pcie and 1c10000.pcie working |
| RTC | Working | rtc-pm8xxx registered as rtc0 |
| NFC | Detected, not tested | nfc_init: NFC Core ver 0.1 |
What doesn't work (yet)
Phone can be called functional only when all phone things actually work, at this time it's a very cool pocket Linux box not a fully privileged daily driver. The biggest headache is GPU acceleration and the native display pipeline. Because there's no upstream panel driver for pdx206's Samsung AMB609TC01 (SOFEF03-M) OLED, msm_drm originally refused to probe at all. Since the 0-1 machine does not set rules here, it's been tricked with fake samsung,sofef00 panel node in the DTB and zap-shader has been stripped to get /dev/dri/renderD128 output (Adreno 650 / Freedreno) to show up, which was awesome, but TrustZone (qcom_scm) still rejects memory protection calls with error -22.
The result - I'm still stuck on simpledrm and llvmpipe software rendering, that's why GNOME flips between 60 FPS and a GTA 6 on XSS-like 1-2 FPS slideshow. Audio is completely dead even tho ADSP is up, because the Device Tree does not have the MI2S DAI links or routing for the CS35L41 speaker amps. Wi-Fi is detected over PCIe, but MHI firmware fails to load; Bluetooth is untested; and the SDX55 cellular modem wrecks itself up on MHI power-up (error -110). On top of that, hardware video codec - Venus - is blocked by the same qcom_scm error, and cameras + sensors aren't hooked up yet.
I've also tried a cursed hybrid experiment with already existing Droidian's downstream 4.19 kernel. It boots to SSH, but Qualcomm's propertiary KGSL GPU driver doesn't talk to Mesa, Weston compositor crashes on duplicate DRM formats and Alpine has no
libhybris. What does it mean? Mainline kernel, in this case 6.17, is the only sane way forward.
| Element | Status | Important notes |
|---|---|---|
| GPU (Adreno 650 / Freedreno) | Partial? | /dev/dri/renderD128 registers without zap-shader, but qcom_scm blocks full TZ init, falls back to llvmpipe |
| Native display driver | Missing | No upstream driver for Samsung AMB609TC01, it relies on simpledrm and sofef00 hack |
| Wi-Fi (PCIe) | Partial | PCIe device detected, MHI firmware fails to load |
| Bluetooth | Untested, probably not working | Needs firmware extraction and testing |
| Audio (CS35L41) | Not working | ADSP is up, but DTS has no MI2S DAI links or speaker routing |
| Modem (MHI / SDX55) | Not working | Fails MHI power-up with error -110, missing QRTR services |
TrustZone (qcom_scm) | Not working/Error | Memory protection call fails with -22 (EINVAL) |
| Venus (HW Video Codec) | Not working | Blocked by qcom_scm firmware authentication |
| Cameras and sensors | Not working | Not brought up on mainline yet |
What needs fixing
Let's decompile this chaos into actual engineering tasks. Five things are blocking progress on this port:
- Audio DTS (
q6asm-dai/ CS35L41): needs definingq6afe-dais(QUARTERNARY_MI2S_RX/TX),q6asm-daisfor DSP routing, and the soundcard routing graph for the CS35L41 speakers (might pull the hints from LineageOS project's DTBOs) qcom_scmError -22 (EINVAL): hardest one - figure out whatmemory-regionattributes insm8250.dtsiare missing or mismatched, so Sony's TrustZone stops rejecting memory protection calls. Fixing this one bug unlocksa650_zap.mbn(Adreno), Venus HW Video Codec, and FastRPC all at once- A real
AMB609TC01/SOFEF03-Mpanel driver: need to replace the trickysamsung,sofef00hack with an actual MIPI DSI command-mode panel driver using the init sequences from Sony's downstream kernel - MHI Firmware services:
pd-mapper,rmtfsandtqftpservundersystemdneeds enabling and configuring. Also I need to sort out Wi-Fi/Bluetooth/Modem firmware extraction from stock Android - De-jankifying the build: drop the manual
/tmpDTB patching scripts poorly made by local AI model, andregulator_ignore_unused/pd_ignore_unused/clk_ignore_unusedcmdline crutches once real drivers claim their hardware
What needs fixing
For this, and the next year I'm going all-in (insert all on 17 black gif here) on mainline 6.17+ kernel:
- Audio and Wireless connectivity: Lock in the working
mainline_fixed.imgbaseline and tackle mainline audio first (MI2S DAI links and CS35L41 routing in DTB). It's the most realistic and high-impact win at this moment. Right alongside that enablingpd-mapper,rmtfsandtqftpservto get Wi-Fi firmware loading so the phone can finally survive without being leashed to my laptop over USB, and test Bluetooth with NFC - Graphics + TrustZone: dig deep into SM8250 CPU
memory-regionlayouts to eliminate theqcom_scm-22 error, and start building a properSOFEF03-Mpanel driver to ditchsimpledrmand unlock real hardware acceleration - Modem + Upstreaming: bring up the SDX55 modem over MHI/QRTR, then clean up my kernel config with DTB patches, so they can actually be upstreamed to
pmaports / SoMainline. - What I'm NOT doing: patching Weston/Mesa for KGSL, and porting
libhybristo Alpine. That's officially dead-way too much pain for a dead-end architecture.
Project needs contributors (please!)
This whole port is very much a work in progress, and I'd genuinely love to stop talking to dmesg by myself. If you have a pdx206, or another SM8250 / Sony edo phone, or just know your way around any of this crap, your help would mean a ton!
- Device Tree + Audio: SM8250 audio routing (especially CS35L31 over MI2S), Qualcomm ADSP bring-up, or Sony
edoquirks. - GPU + Display: Freedreno on SM8250 (
zap-shader/ TrustZoneqcom_scm-22), Mesa onaarch64, Adreno 650 quirks, or MIPI DSI panel drivers (SOFEF03-M). - Firmware and connectivity: Qualcomm SDX55 modem integration on pmOS/Nura, or Wi-Fi/Bluetooth firmware extraction from stock android.
Even if you just want to test a boot image, point out something dumb I've missed, or drop a hint from another SM8250 port. Say hi to me at:
2. vfio-windows-aio Project
I should call this project unmaintained, because I do not use Windows anymore, but I know someone might need a dual-booting machine.
Let's just say in unison, Dual-booting is annoying. Rebooting just to play a kernel anti-cheat locked game, or run one Windows-only app kills the whole vibe, so I built vfio-windows-aio project. A single-script single GPU VFIO passthrough setup, that lets me spin up Windows 11 with near-native GPU performance and drop straight back into my Linux desktop when I'm done. It already works surprisingly well on my own machine, but right now it's still very much a "works for me" kind of project.
What works today
Core loop is solid. Running start_vm.sh automatically detects whichever systemd display manager is active: sddm, gdm, lightdm, ly, greetd, etc; stops it, unbinds the VT consoles and EFI framebuffer, unloads the NVIDIA modules, binds the GPU's PCI functions to vfio-pci, and launches QEMU/KVM with passthrough, ALSA audio, and SMB for sharing my Linux home folder with Windows host. Pretty neat.
Best of all, the return to Linux is finally fixed. After shutting down Windows, the script cleanly unbinds VFIO, rescans the PCI bus, reloads the NVIDIA modules, wakes the GPU with nvidia-smi, rebinds the USB xhci_hcd controllers (so I don't have to replug any of my peripherals like a caveman), and restarts the display manager while logging the whole run to a timestamped .log file.
| Feature | Status | Important notes |
|---|---|---|
| Single GPU NVIDIA Passthrough | Working | Full QEMU/KVM + OVMF + NV43FIX + laptop's SSDT1.dat |
| Auto DM handling | Working | Automatically detects systemd's DM, stops before VM, restarts after |
| Clean return to Linux | Working | Unbinds VFIO, reloads NVIDIA modules, rebinds USB controllers |
| File sharing and peripherals | Working | Built-in QEMU SMB share + USB passthrough + ALSA audio |
| Session logging | Working | Timestamped log file generated on every run |
What does not work (or is still janky)
Even though it ran daily-driver smoothly for me, it's rough for anyone else trying to use it (without reading documentation -_-):
- Everything is hardcoded: works the best aight? but my PCI IDs, my peripherals USB IDs, 32GB of RAM, 12 cores, $HOME folder, and laptop-specific
SSDT1.dat/vbios.romare all baked straight intostart_vm.sh - NVIDIA-only: "Fuck NVIDIA! ~Torvalds once said". There are plans to add AMD GPU support
- No crash safety net: if QEMU fails to launch (typo, missing file, unplugged USB, whatever), there's no trap to guarantee your Linux desktop comes back cleanly. There's albo a sneaky duplicate
-nicflag sitting in the QEMU command - Audio volume quirk: ALSA passthrough inherits your Linux host volume, so Windows sounds whisper-quiet unless you remember to crank host volume to 100% before launching that awful microsoft's operating system
- Manual setup friction: anyone still has to hunt down PCI/USB IDs, dump NVIDIA's VBIOS, generate
SSDT1.daton laptops, and disable Windows Fast Startup (otherwise QEMU hangs forever on shutdown)
| Area | Status | Important notes |
|---|---|---|
| Hardware configuration | Hardcoded (yay!) | PCI / USB IDs, RAM, cores, and paths require manual script edits |
| AMD GPU support | Missing | Only handles nvidia_* kernel modules |
| Error recovery | Missing | You're supposed not to make any mistakes |
| Audio passthrough | Quirky | ALSA inherits host volume, no Pipewire or SCREAM yet |
| Setup experience | AWFUL | Either read README.md, or suffer |
What needs fixing and how I plan to proceed
My goal for the next year is to turn this project from my personal bash script into a genuinely plug-and-play tool:
- Decouple config from code: move all hardware-specific values (GPU PCI IDs, USB devices, RAM, CPU cores, paths, desktop vs. laptop profile) into clean config.env file, and add an interactive setup / detection script so nobody has to edit
start_vm.shby hand - Make it crash-proof and fix the quirks: add a proper
basherror handling and atrapthat always restores your display manager if QEMU bails out on yo ass, clean up the duplicate-nicflag, and automatically save / crank / restore host audio volume + explore Pipewire or SCREAM for cleaner audio - Add AMD GPU support: we all know AMD GPUs are superior on Linux. It's necessary.
- Performance and Quality-of-Life extras (later): optional hugepages, CPU pinning/governor switching while VM is running, and optional Looking Glass support for chooms with dual GPU setups.
Want to help?
If you're into VFIO, bash, QEMU, KVM or breaking your display manager for fun, PRs and issues on terminal-index/vfio-windows-aio are super welcome!!! I'd especially love help from AMD users willing to test amdgpu unbind/rebind logic, audio nerds, and bash scripters to help harden the script + add config parsing or test across more distros and display managers,.
Feel free to open an issue, drop a PR, or ping me on Matrix/Telegram.
3. Game development
I can't say much about this, but I'm currently planning to start developing the game with my chooms from university. Stay tuned!
Wrapping up
Sooooo yeah, that's the chaos on my plate for this year and the next. Between kicking Qualcomm's TrustZone ass on a 2020 Sony flagship, turning my personal VFIO bash script into something other humans (or humanoids) can actually run without suffering, and kicking off a game project with my uni chooms, I definitely won't be bored. None of this is polished, and most of it is powered by curiosity, caffeine+nicotine overdose, and questionable dmesg sessions, which is half the fun. If any of these projects sound interesting (or if you just want to watch me lose my shit over Device Trees), feel free to follow along on GitHub/this blog, open a PR, or say hi on Matrix (@szoltysek:matrix.org) or telegram.
See you in the next post.