gbOS86

Lenovo IdeaPad Slim 5 (Intel Core Ultra 5 125H / Arc Xe) Success & Dual-Boot Guide

### Laptop Specifications
* Model: Lenovo IdeaPad Slim 5 14IMH9 (83DA)
* CPU: Intel Core Ultra 5 125H (14 cores, 18 threads — Meteor Lake)
* GPU: Intel Arc Graphics (Xe LPG, PCI ID: )
* RAM: 16 GB LPDDR5
* Target Storage: Samsung Flash Drive FIT (USB 3.0, 128 GB)
* Dual-Boot Setup: Persistent dual-boot alongside internal Windows 11 SSD (NVMe) and Ubuntu, with full data persistence.

---

### What Works
* Intel Arc Xe Hardware Acceleration: Mesa Vulkan & Iris drivers with Android's kernel driver run smoothly with full 3D hardware acceleration.
* Display & Compositing: 1920x1200 @ 60/120Hz smooth desktop compositor via SurfaceFlinger.
* Audio & Microphones: Internal speakers and mic work cleanly with Intel HDA/SoundWire.
* Touchpad & External Mouse: Full gesture support, tap-to-click, and zero flick latency after IDC configuration.
* Wi-Fi & Bluetooth: Full connectivity (Intel Wi-Fi / BT).
* Google Play Services & Desktop Mode: Play Store, Google account sign-in, multi-window freeform desktop, and NexusLauncher.
* ARM64 Translation (Houdini): Runs heavy games (e.g., Pokémon UNITE at solid 60 FPS) and ARM64-only APKs.
* Linux Terminal VM (AVF / Debian): Runs Debian container with full root and network access.
* KernelSU: Working root access.

---

### Our Journey & Key Technical Gotchas Solved

Booting gbOS86 on a modern Intel Meteor Lake / Arc laptop presented several tough hurdles. Here is how we solved every single one of them:

#### 1. Xe Graphics Kernel Panic / FIFO Underrun
* Problem: On Meteor Lake / Core Ultra, the default scripts attempt to load the legacy module, causing a fatal kernel panic or freeze on boot. Modern Intel panels also trigger FIFO underrun and ghosting artifacts under default PSR settings.
* Solution: In , set and add . In the bootloader command line, blacklist i915 ().

#### 2. Upstream Module Path Trailing Bug
* Problem: Wi-Fi and audio drivers failed to load at boot.
* Solution: The upstream module archive contained a trailing mismatch (). Normalizing the path to restored automatic hardware detection ().

#### 3. SetupWizard OOBE Crash / Infinite Loop
* Problem: Stock SetupWizard got trapped in an inescapable update checking loop with no skip button.
* Solution: Bind-mounted an empty directory over and before Android starts, combined with . Added an init service () to provision User 10 directly to the desktop home screen. (Crucial: do NOT override with a dummy script, as Google Play Services crashes if the Binder interface disappears).

#### 4. Black Screen with Mouse Cursor (Gatekeeper HAL & Parser Bug)
* Problem: After booting, the system showed only a mouse cursor on a black screen. In logcat, fatally crashed on with .
* Solution: Standard PCs lack Google's Trusty TEE chip. The software Gatekeeper HAL () is required to satisfy . Furthermore, we found that Android's parser does not support multiline bash backslash () continuations inside service blocks; breaking this syntax silently discarded all services defined below it. Moving optimization logic to a standalone script () and cleanly invoking resolved the crash and restored the desktop.

#### 5. Swap Destruction on USB Flash Drives & High RAM Usage
* Problem: gbOS was using ChromeOS's (Memory Management Daemon) to allocate a 23.8 GB zRAM pool and an 8 GB disk swap file () on the USB flash drive. Swapping to a USB flash drive caused massive I/O hitching, lag, and flash write wear. Additionally, Android's Headless System User Mode (HSUM) spawned duplicate background instances of Chrome, GMS, and Play Store in headless User 0, wasting ~3 GB of RAM.
* Solution:
- Removed from the init tree to completely disable and USB disk swap. On 16 GB RAM, swap is completely unnecessary.
- Stopped and disabled duplicate client packages in headless User 0 (), freeing ~2.5 to 3.0 GB of RAM immediately.
- Kept interactive User 10 100% active and raised to support smooth background multitasking.

#### 6. Touchpad Flick Delay & USB Mouse Wake Lag
* Problem: Android defaults to a 200ms flick delay on generic touchpads, and Linux autosuspends USB optical mice every 2 seconds.
* Solution: Deployed a custom IDC file () setting , added to the bootloader, and set CPU EPP to .

---

### Hardware Detection Snippet ()



---

### GitHub Repository & Automated Installer

I packaged all of these fixes, configs, the non-destructive dual-boot installer, and a QEMU hardware simulation harness into an open-source repository so anyone with an Intel Meteor Lake / Arc laptop or generic PC can get gbOS86 running smoothly:

👉 GitHub Repository: https://github.com/vthonte/gbos86-persistent-dualboot

*(Used Google antigravity ai for all this)*
Here are the exact configuration lines, init tweaks, and hwdetect.txt snippet for reference:

### 1. gbos.cfg Video Parameters
text
LOAD_I915=0
EXTRA_SLEEP=2
MODE=boot
DENSITY=180
XE_PARAMS="enable_psr=0 enable_fbc=0 enable_panel_replay=0"


### 2. Kernel Commandline (GRUB)
text
linux /EFI/gbos/BOOTX64.EFI ibt=off i8042.nopnp module_blacklist=i915 i915.force_probe=!7d55 xe.force_probe=7d55 androidboot.setupwizard.mode=DISABLED usbcore.autosuspend=-1


### 3. SetupWizard APK Masking (hook.sh)
bash
mkdir -p /tmp/empty_suw
for suw_dir in /new/product/priv-app/*SetupWizard* /new/system_ext/priv-app/*SetupWizard* /new/product/priv-app/*setupwizard* /new/system_ext/priv-app/*setupwizard*; do
  if [ -d "$suw_dir" ]; then
    mount --bind /tmp/empty_suw "$suw_dir" && log "hook: masked $suw_dir with empty dir"
  fi
done


### 4. Swap & RAM Tuning (optimize.sh)
bash
# Disable swap (preserves USB flash drive lifetime and prevents I/O freezes)
swapoff -a
echo 1 > /sys/block/zram0/reset 2>/dev/null
rm -rf /data/per_boot/zram_swap /data/vendor/swap 2>/dev/null

sysctl -w vm.swappiness=0
sysctl -w vm.dirty_background_ratio=5
sysctl -w vm.dirty_ratio=10

# Disable duplicate apps in headless User 0 only (saves ~3 GB RAM)
for pkg in com.android.vending com.android.chrome com.google.android.youtube com.google.android.apps.messaging com.google.android.aicore; do
    am force-stop --user 0 "$pkg" 2>/dev/null
    pm disable-user --user 0 "$pkg" 2>/dev/null
done

# Keep background tasks alive in User 10
setprop persist.sys.max_cached_processes 64
setprop ro.sys.fw.bg_apps_limit 64


### 5. Full hwdetect.txt Header
text
== kernel
Linux (none) 6.18.21-gbos-whl #38 SMP PREEMPT Mon Oct 19 20:01:57 UTC 2026 x86_64 GNU/Linux
== cpu
model name	: Intel(R) Core(TM) Ultra 5 125H
avx yes
avx2 yes
fma yes
bmi2 yes
sha_ni yes
gfni yes
avx_vnni yes
== dmi
sys_vendor=LENOVO
product_name=83DA
product_version=IdeaPad Slim 5 14IMH9
bios_version=N7CN33WW
board_name=LNVNB161216
== input
FTCS0038:00 2808:0106 Touchpad
USB OPTICAL MOUSE
== audio
ALC256 / Realtek / Intel LPSS HDA


All source files and automated installer scripts are available in the GitHub repo:
https://github.com/vthonte/gbos86-persistent-dualboot
No USB flashing (rufus) needed for this setup. Just copying required files in new partitions and changing grup/boot menu to start booting.
Log in or join to reply.