4.9 KiB
Zenbook Duo UX8406M — Adaptation Plan
Machine: ASUS Zenbook Duo UX8406MA (UX8406M family)
OS: Ubuntu, GNOME on Wayland
Date: 2026-09-18
This document captures the audit and implementation plan so work can be resumed if a session is interrupted.
Goal
When the detachable keyboard is off the pogo pins (connected via Bluetooth or standalone USB), enable the second screen (eDP-2). When docked on the pins (USB HID bus 0003), disable the second screen.
Machine inventory (verified)
| Item | Value |
|---|---|
| Model | ASUS Zenbook Duo UX8406MA_UX8406MA |
| Desktop | ubuntu:GNOME, Wayland |
| Primary display | eDP-1 — backlight intel_backlight |
| Secondary display | eDP-2 — backlight card1-eDP-2-backlight |
| ScreenPad WMI | asus_screenpad (exists; code uses eDP-2 backlight) |
| Touch top | i2c-ELAN9008:00 → eDP-1 |
| Touch bottom | i2c-ELAN9009:00 → eDP-2 |
| Keyboard (BT) | HID_ID=0005:0B05:1B2D, name ASUS Zenbook Duo Keyboard |
| Display control | gdctl via mutter-common-bin |
| User groups | input group already present |
Hardware paths match codebase expectations (duo.rs, touchscreen.rs, sysfs.rs, probe.rs).
Root causes of install failure
-
Missing build dependencies —
libglib2.0-dev,libgtk-3-dev,libwebkit2gtk-4.1-dev, etc. All Rust binaries share the Tauri crate, so even daemons need GTK dev packages. -
Wrong install order —
install.shrunssetup-gnome.sh→install-rust-runtime.sh(cargo build) beforeinstall-ui.shinstalls build prerequisites. -
Runtime removed —
/usr/local/libexec/zenbook-duo/missing; systemd units gone; no~/.config/zenbook-duo/settings.json. -
Historical runtime errors (when previously installed):
- Session agent socket missing → display-mode policy failed
- Touchscreen unbind
No such device (os error 19)on resume (race)
-
Minor test bug —
check.shgreps for single-line--versionhook;zenbook-duo-session-agent.rsuses multiline call.
Dock / undock logic (code)
ConnectionType::Usb(HID_ID=0003:…) →keyboard_attached = true→ disable eDP-2ConnectionType::Bluetooth(HID_ID=0005:…) →keyboard_attached = false→ enable eDP-2- Detection:
hardware/sysfs.rs→detect_connection_type()via/sys/class/hidraw/*/device/uevent
Key files:
runtime/probe.rs—keyboard_attached()runtime/policy.rs— display/Wi-Fi/BT transitionsruntime/session_agent.rs—apply_dock_mode()viagdctl
Implementation checklist
Phase 1 — Build environment
sudo apt update
sudo apt install -y \
build-essential pkg-config libssl-dev \
libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev \
libayatana-appindicator3-dev \
usbutils iio-sensor-proxy systemd mutter-common-bin
Phase 2 — Codebase fixes (this session)
- Install build prereqs from
setup-common.shbeforeinstall-rust-runtime.sh - Fix
check.shsmoke test for multiline--versionhooks - Document product ID
1B2Din README (alongside1B2C) - Harden touchscreen restore with retry on lifecycle resume
- Optional later:
asus_screenpadfallback if eDP-2 backlight insufficient - Optional later: split runtime crate from Tauri (daemon builds without GTK)
Blocked on sudo: package install and ./install.sh require an interactive terminal password. There is also a broken sudoers line on this machine (work ALL=NOPASSWD:/usr/bin/tee /sys/class/backlight/*/brightness — wildcards not allowed).
Phase 3 — Install and verify
cd /home/andrea/Documents/repo/zenbook
./install.sh
# Recommended: scale 1.25, USB media remap Yes
systemctl status zenbook-duo-rust-daemon.service
systemctl --user status zenbook-duo-session-agent.service
journalctl -u zenbook-duo-rust-daemon.service -f
After install, log out/in once if session agent fails to start.
Phase 4 — Validation tests
| Test | Expected |
|---|---|
| BT keyboard, undocked | 2 logical monitors in gdctl show |
Keyboard on pogo pins (USB 0003:) |
1 logical monitor |
| Attach/detach transition | Toggle within ~1s; journal shows status transition |
| Suspend/resume | Layout restored; no repeated touchscreen errors |
Resume commands (if session lost)
cd /home/andrea/Documents/repo/zenbook
cat docs/adaptation-plan-ux8406m.md
./check.sh all
./install.sh
If build still fails on GTK:
sudo apt install -y libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev libssl-dev build-essential pkg-config
./setup-gnome.sh
Files touched in this adaptation
setup-common.sh— build deps before Rust runtimetests/install-stdin-test.sh— relaxed--versiongrepREADME.md— product ID noteui-tauri-react/src-tauri/src/runtime/daemon.rs— touchscreen restore retrydocs/adaptation-plan-ux8406m.md— this file