Map Fn+Z/X to F11/F12, upgrade Alpine Edge rootfs, and update docs

This commit is contained in:
Luxferre committed 2026-11-26 09:28:30 +02:00
1 parent e8065bb014
commit e2981455ed
9 files changed
+32 -21

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ Geminux combines a custom-patched Linux `7.3.5` kernel, pure-Linux MTK flasher,
## Kernel and MediaTek MT6797X support
- **Kernel tree**: Vanilla Linux `7.3.5` patched via [patches/kernel/](file:///home/lux/proj/geminux/patches/kernel) (`0001-ixoo-gemini-pda-mainline-7.3.5.patch`, `0002-mt6797-ccci-cldma-and-md1-domain.patch`, `0003-arm64-dts-mediatek-geminux-gemini-pda.patch`, `0004-gemini-ssd2092-display-and-touch.patch`, `0005-mt6797-consys-wifi-factory-firmware.patch`, `0006-mt6797-boot-cleanups.patch`, `0007-mt6797-wlan-peer-deauth-and-rekey.patch`, `0008-gemini-resume-wake-and-spm-standby.patch`, `0009-mt6797-wlan-drop-free-stability.patch`, `0010-mt6797-ccci-md1-boot-hs-v2-and-rpc.patch`, `0011-gemini-lid-sync-filter-and-debounce.patch` adding synchronous Hall GPIO66 lid-close keyboard/touch filtering, `1 ms` Hall EINT debounce, `10 ms` matrix keypad debounce, and touchscreen inhibit), with `CONFIG_XFRM_USER=y` and `esp4`, `esp6`, `af_key`, and `xfrm_interface` modules enabled for 3GPP IMS IPsec.
- **Kernel tree**: Vanilla Linux `7.3.5` patched via [patches/kernel/](file:///home/lux/proj/geminux/patches/kernel) (`0001-ixoo-gemini-pda-mainline-7.3.5.patch`, `0002-mt6797-ccci-cldma-and-md1-domain.patch`, `0003-arm64-dts-mediatek-geminux-gemini-pda.patch`, `0004-gemini-ssd2092-display-and-touch.patch`, `0005-mt6797-consys-wifi-factory-firmware.patch`, `0006-mt6797-boot-cleanups.patch`, `0007-mt6797-wlan-peer-deauth-and-rekey.patch`, `0008-gemini-resume-wake-and-spm-standby.patch`, `0009-mt6797-wlan-drop-free-stability.patch`, `0010-mt6797-ccci-md1-boot-hs-v2-and-rpc.patch`, `0011-gemini-lid-sync-filter-and-debounce.patch` adding synchronous Hall GPIO66 lid-close keyboard/touch filtering, `1 ms` Hall EINT debounce, `10 ms` matrix keypad debounce, and touchscreen inhibit, and `0012-gemini-lid-wake-and-fg-taper-fix.patch` adding `gemini-lid` `PM_POST_SUSPEND`/raw-GPIO recheck reconciliation to prevent stuck `BL_CORE_SUSPENDED` / input inhibition alongside `mt6351-fuel-gauge` consecutive `win_ua`+`reg_ua` CV-taper validation, `+2%` step caps, conservative initial charging-OCV scaling, and `180 mV` boot-sag `ADC21` tolerance), with `CONFIG_XFRM_USER=y` and `esp4`, `esp6`, `af_key`, and `xfrm_interface` modules enabled for 3GPP IMS IPsec.
- **Graphics & display**: MediaTek DRM (`mediatek-drm`), Solomon Systech `SSD2092` DSI FHD+ panel & touchscreen, early-boot `simpledrm` (`DRM_SIMPLEDRM=y` + rotated `TER16x32` console), Mali-T880 `panfrost` GPU driver, and `sii902x` Slimport/HDMI bridge.
- **Wi-Fi / Bluetooth CONSYS**: Staged `mt6797_wlan_core` and `btmt6797` drivers backed by NVRAM/factory firmware provisioning (`geminux-wifi-nvram` and `firmware-cache/mt6797/`), hardened by `0007` and `0009` for peer deauth, GTK rekey, and drop-free RX/TX buffer handling.
- **Modem / Telephony / eSIM / IMS**: Staged `mt6797-ccci-cldma` driver exposing `/dev/ccci_md_ctl`, `/dev/ccci_fs`, `/dev/ccci_rpc`, `/dev/ttyC0..3`, and `ccmni*` network interfaces with the 16-byte `struct mt6797_ccci_header` UAPI ([mt6797_ccci.h](file:///home/lux/proj/geminux/prebuilt/kernel/include/linux/mt6797_ccci.h)). `geminux-ccci-daemon` ([geminux-ccci-fs.c](file:///home/lux/proj/geminux/src/geminux-daemons/geminux-ccci-fs.c)) serves MD1 boot handshake v2, NVRAM/CCCI_FS file I/O, and RPC queries (`MD_STATE=READY`); `geminux-cellctl` ([geminux-cellctl.c](file:///home/lux/proj/geminux/src/geminux-daemons/geminux-cellctl.c)) handles physical SIM vs. ST33 eUICC `AT+ESIMS` slot switching, `lpac` AT-`CSIM`/`CGLA` APDU bridging for eSIM provisioning, and `ccmni*` LTE PDN bring-up; `geminux-imsd` ([geminux-imsd.c](file:///home/lux/proj/geminux/src/geminux-daemons/geminux-imsd.c)) provides 3GPP VoLTE over `ccmni*` and VoWiFi `SWu` IKEv2/IPsec via `strongswan`, ISIM/USIM MILENAGE AKA, kernel XFRM `ipsec-3gpp` with RFC 4303 userspace ESP fallback, SIP `REGISTER`/`INVITE`/`BYE`/`MESSAGE`, 3GPP `RP-DATA` SMS, and 20 ms `timerfd` AMR-NB/AMR-WB/G.711/DTMF RTP bridged to PipeWire/ALSA `VoiceCall` UCM2.
@@ -27,7 +27,7 @@ Geminux combines a custom-patched Linux `7.3.5` kernel, pure-Linux MTK flasher,
- **`libgemui.so`** ([src/libgemui/](file:///home/lux/proj/geminux/src/libgemui)): Double-buffered Cairo + Pango/HarfBuzz Xlib toolkit polling X11 events, `SIGUSR1` self-pipe for instant `.Xresources` reloads, dynamic timers, `MSG_NOSIGNAL`/drained Unix socket IPC (`gemui_unix_cmd`), and non-blocking extra FDs (such as V4L2 or `inotify`).
- **11 landscape HiDPI applications** ([src/geminux-apps/](file:///home/lux/proj/geminux/src/geminux-apps)): `geminux-control` (including hardware Airplane Mode toggle), `geminux-audio`, `geminux-datetime`, `geminux-net` (5 tabs including Wi-Fi, Cellular/ST33 eSIM management, Airplane Mode banner, and `DNS` configuration), `geminux-dialer`, `geminux-callscreen`, `geminux-sms`, `geminux-contacts`, `geminux-camera` (MT6797 Media Controller pipeline + 10-bit Bayer demosaic/AWB software ISP), `geminux-themes`, and `geminux-lock`.
- **Zero-poll C11 daemons** ([src/geminux-daemons/](file:///home/lux/proj/geminux/src/geminux-daemons)):
- `geminux-powerd` — `epoll` over `/dev/input/event*` (`SW_LID`, `KEY_POWER`, keyboard/touch/pointer activity), filtered `KOBJECT_UEVENT` (`input`, `power_supply`, `drm`), `/run/geminux/powerd.sock`, and `timerfd`; caches CPUfreq/profile writes, tears down/reloads `mt6797_consys` across suspend (`-EBUSY` workaround with retry-hardened resume reload), manages persisted hardware Airplane Mode (`/var/lib/geminux/airplane-mode`, `/run/geminux/airplane-mode`) by unloading CONSYS Wi-Fi/BT kernel modules and placing MD1 in `AT+CFUN=4` while leaving `usb0` up, drives two-stage screensaver idle dim/lock/suspend timed from the last active user input, and resolves the active desktop user dynamically from UID `10000`.
- `geminux-powerd` — `epoll` over `/dev/input/event*` (`SW_LID`, `KEY_POWER`, `mtk-pmic-keys` `KEY_ESC` wakeup, keyboard/touch/pointer activity), filtered `KOBJECT_UEVENT` (`input` rescan lid-state reconciliation, `power_supply`, `drm`), `/run/geminux/powerd.sock`, and `timerfd`; enforces `inhibit_ac_lid` (blanks/locks without unloading CONSYS or invoking `/sys/power/state` while on USB/AC), tears down/reloads `mt6797_consys` and offlines non-boot CPUs across battery `mem` sleep or zero-thrash `low_power_standby` when `MD1` is powered (no `freeze`/`s2idle` fallback), manages persisted hardware Airplane Mode (`/var/lib/geminux/airplane-mode`, `/run/geminux/airplane-mode`) by unloading CONSYS Wi-Fi/BT kernel modules and placing MD1 in `AT+CFUN=4` while leaving `usb0` up, drives two-stage screensaver idle dim/lock/suspend timed from the last active user input, and resolves the active desktop user dynamically from UID `10000`.
- `geminux-statusd` — `epoll` over `signalfd` (`SIGUSR1`), `RTMGRP_LINK`/`RTMGRP_IPV4_IFADDR`, filtered `KOBJECT_UEVENT` (`power_supply`, `net`), `inotify`, and minute-aligned `timerfd`; displays `AIRPLANE` when hardware Airplane Mode is active and deduplicates root `WM_NAME` updates with zero child shell forks.
- `geminux-touchd` — XInput 2.2 multi-touch gesture daemon (2-finger tap/hold right-click, 3-finger middle-click, 2-finger scroll).
- `geminux-leds` — AW9120 back cover RGB controller driving `rgb:indicator-1..5` (default off when idle/full; `rgb:indicator-6` amber while charging; persistent manual override; `SIGPIPE`-safe socket server at `/run/geminux/leds.sock`).
+1 -1
View File
@@ -116,7 +116,7 @@ Additional flashing and offline image utilities:
Perform these checks on physical hardware after the first boot:
- [ ] Confirm `uname -r` reports `7.3.5-geminux` and `lsmod` shows `mediatek_drm`, `panfrost`, `mt6797_ccci_cldma`, `mt6797_wlan_core`, and `btmt6797`.
- [ ] Verify `ssd2092` touchscreen input, multi-touch gestures (`geminux-touchd`), and physical keyboard mappings (`Fn+1..0 = F1..F10`, `Fn+Alt = Mod4`, Planet key).
- [ ] Verify `ssd2092` touchscreen input, multi-touch gestures (`geminux-touchd`), and physical keyboard mappings (`Fn+1..0 = F1..F10`, `Fn+Z/X = F11/F12`, `Fn+Alt = Mod4`, Planet key).
- [ ] Confirm Glamor 3D acceleration via `glxinfo | grep -i renderer`.
- [ ] Test Wi-Fi connectivity via `geminux-net` or `nmcli`, Bluetooth via `geminux-net`, and audio playback/recording (speaker, 3.5mm jack, internal mic).
- [ ] With MD1 firmware extracted, verify `/dev/ccci_md_ctl`, `/dev/ttyC0`, `doas geminux-cellctl status` (`MD_STATE=READY` + SIM/ST33 eUICC detection), `rc-service geminux-imsd status`, `ccmni*` data registration, voice calls (`geminux-dialer`), and SMS (`geminux-sms`).
+3 -2
View File
@@ -5,6 +5,7 @@
Geminux installs a custom XKB layout (`planet_vndr/geminux`, variant `us`) and matching Linux console keymap (`etc/keymap/gemini-us.map`):
- `Fn + 1` through `Fn + 0`: `F1` through `F10`
- `Fn + Z` / `Fn + X`: `F11` / `F12` (`Shift + Fn + Z/X`: `«` / `»`)
- `Fn + Alt`: `Super_L` (`Mod4`, main window-manager modifier key)
- `Fn + F` (`XF86UWB` / `XF86RFKill`): Toggle true hardware Airplane Mode (`geminux-media-key airplane-toggle`), showing a Dunst OSD notification and displaying `AIRPLANE` in the DWM status bar
- Planet key: mapped to `Mod4` / launcher trigger (also taps cleanly as a one-shot `Mod4` latch in DWM for single-handed operation)
@@ -65,7 +66,7 @@ geminux-apply-theme TokyoNight
- **Audio & date/time**: `geminux-audio` manages PipeWire sink/source routing, mute state, and per-stream volume via `wpctl`/`pactl`. `geminux-datetime` manages the system timezone (`geminux-tzctl`) and shows live Chrony NTP sync status.
- **Connectivity & Airplane Mode**: `geminux-net` manages Wi-Fi (`nmcli`, keeping the currently associated WLAN connection pinned at the top with a `Disconnect` control), 4G/eSIM/CCCI state (`geminux-cellctl` + `mmcli` + `/run/geminux/ccci.sock`), Bluetooth (`bluetoothctl` / `rfkill`), SiI9024 external HDMI output (`xrandr`), and the **`DNS` tab** (`geminux-dnsctl`, supporting router-provided Default DNS, Cloudflare, Google, RadicalDNS, Quad9, custom IPv4/IPv6 nameservers, and live DNS lookup testing). Hardware Airplane Mode (`Fn + F`, `geminux-control`, `geminux-net`, or `doas geminux-power-ctl airplane on|off|toggle|status`) unloads the CONSYS Wi-Fi/BT kernel modules and puts MT6797 MD1 into `AT+CFUN=4` flight mode across reboots while keeping USB NCM (`usb0`) active.
- **Camera**: `geminux-camera` configures the MT6797 Media Controller pipeline (`ov5670`/`s5k4e6` -> `seninf` -> `camsv`), captures 10-bit Bayer (`SBGGR10`/`SGRBG10`) frames over V4L2 `mmap` with a pure-C demosaic + AWB software ISP, and writes native `libjpeg-turbo` stills to `~/Pictures/` and MJPEG-AVI clips to `~/Videos/`.
- **System control, LEDs & lock**: `geminux-control` adjusts display backlight, PipeWire audio volume, MT6797X power profile (`eco`, `balanced`, `performance`), and AW9120 LEDs (`/run/geminux/leds.sock`). `geminux-leds` drives the 5-LED RGB back strip (`rgb:indicator-1..5`, defaulting to off when idle or 100% charged) plus `rgb:indicator-6` (amber while charging), supports calibrated presets including `rgb 160 16 0` ("Amber Warn"), and preserves manual `off` / `rgb` overrides across battery uevents. `geminux-lock` secures the X session using `doas -n /usr/sbin/geminux-checkpw`, resolving the desktop account dynamically from UID `10000` (`--username` or default `user`). `geminux-powerd` implements an input-driven screensaver: on battery it dims then triggers `geminux-lock` + suspend, while on AC / `performance` it triggers `geminux-lock` + backlight blanking (waking back onto the lock screen on key, touch, pointer, or power-button activity), timed strictly from the last active user input.
- **System control, LEDs & lock**: `geminux-control` adjusts display backlight, PipeWire audio volume, MT6797X power profile (`eco`, `balanced`, `performance`), and AW9120 LEDs (`/run/geminux/leds.sock`). `geminux-leds` drives the 5-LED RGB back strip (`rgb:indicator-1..5`, defaulting to off when idle or 100% charged) plus `rgb:indicator-6` (amber while charging), supports calibrated presets including `rgb 160 16 0` ("Amber Warn"), and preserves manual `off` / `rgb` overrides across battery uevents. `geminux-lock` secures the X session using `doas -n /usr/sbin/geminux-checkpw`, resolving the desktop account dynamically from UID `10000` (`--username` or default `user`). `geminux-powerd` implements an input-driven screensaver and lid policy: on USB/AC (`inhibit_ac_lid`), closing the lid or timing out locks X11 and blanks the backlight without unloading CONSYS or invoking `/sys/power/state`; on battery, it enters `mem` sleep when MD1 is gated or falls into a zero-thrash `low_power_standby` (never `freeze`/`s2idle`) when 4G `MD1` is active, waking cleanly on lid open, keyboard/touch/pointer activity, or the physical Esc/power side button (`mtk-pmic-keys`), timed strictly from the last active user input.
- **microSD card automount (`/media/sdcard`)**: Automatically checks (`fsck.fat -a`, `fsck.exfat -p`, `e2fsck -p`) and mounts `/dev/mmcblk1p1` (or unpartitioned superfloppy `/dev/mmcblk1`) at `/media/sdcard` on boot (`geminux-sdcard` OpenRC service) and `eudev` hotplug (`95-geminux-sdcard.rules` -> `/usr/sbin/geminux-sdcard-mount`), cleanly unmounting on card removal or shutdown. Normal desktop users (`UID 10000` in `plugdev` `GID 106`) receive full read/write access: `0660` `plugdev` nodes on `/dev/mmcblk1*`, `uid=10000,gid=106,fmask=0002,dmask=0002,allow_utime=0020` on `vfat`/`exfat` (plus `quiet` on `vfat`), and `10000:106` ownership + `02775` setgid `plugdev` (`u+rwX,g+rwX`, preserving `lost+found`) on writable `ext4`/`ext3`/`ext2` cards. Inspect or manage manually via `geminux-sdcard-mount status`, `geminux-sdcard-mount remove` (before physical eject), or `geminux-sdcard-mount add` (auto-escalating via `doas`), and format/label/repair FAT cards with `dosfstools` (`mkfs.vfat`, `fsck.vfat`, `fatlabel`, included in default shell `PATH`).
- **CLI developer, media & security tools**: Native Alpine Edge `mpv` (`/etc/mpv/mpv.conf` with Panfrost X11 EGL + PipeWire + `/tmp/geminux-mpv.sock` IPC), `ffmpeg`/`ffprobe`, `gst-libav`, `mpg123`, `openmpt123`, `yt-dlp` (`yt-dlp-ejs-rt-quickjs`), `python3` & `pip3` (`py3-pip`), `tcl` (`tclsh` + `tcl-lib` Tcllib + `tcl-tls` TclTLS) & `tk` (`wish` with `gtkTtk 0.9` dynamically following the active GTK2 theme), `gpg` (`gnupg` + `pinentry-curses` + `GPG_TTY`), `pass`, `dosfstools` (`mkfs.vfat`, `fsck.vfat`, `fatlabel`), `bantam` (`geminux-bantam`, minimalist C++20 OpenAI-compatible terminal AI agent defaulting to `kilo-auto/free`; see [src/bantam/README.md](file:///home/lux/proj/geminux/src/bantam/README.md)), `lynx` (configured via `~/.lynx.cfg` with `http://frogfind.com` start page, UTF-8, vi keys, mouse support, and persistent sessions/cookies), `gsocket` (`gs-netcat` plus `gs-key`/`gs-enter`/`gs-deploy-cmd`), `dtach` (`dmux`), `ovault`, default `htop` layout (`/etc/htoprc` / `~/.config/htop/htoprc`), `/etc/skel/.apexrc` defaults (`EDITOR='nano -FEDSMAGic/max%_T2'`, `PAGER='less -RXF'`, `nn`, `pg`, `l`, `defalias`/`toalias`/`savealias`, `rw`/`ee`, `sshed`, `dl`, `gcm`/`gp`/`gpm`, `sloc`, and `doas`-aware `pkgadd`/`pkgdel`/`pkgsearch`/`sysup`/`sysclean`), and `/etc/skel/.gitconfig` are preinstalled.
@@ -78,4 +79,4 @@ doas apk update
doas apk upgrade
```
Because custom Geminux components (`geminux-kernel-modules`, `geminux-xlibre`, `geminux-suckless`, `geminux-dunst`, `geminux-ui`, `geminux-bantam`, `geminux-gsocket`, `geminux-gdk-pixbuf`, `geminux-webarchy`, `geminux-gtkttk`, `geminux-config`) are exact-version pinned (`name@geminux=version`) in `/etc/apk/world` and Rust/Wayland/upstream overrides (`!rust`, `!cargo`, `!libglycin`, `!gdk-pixbuf`, `!deno`, `!py3-cryptography`, `!xorg-server`, `!linux-edge`, etc., with `librsvg`, `rav1e`/`rav1e-libs`, and `libdovi` whitelisted) are negated in `/etc/apk/world`, normal Alpine Edge upgrades update upstream libraries, CLI tools, NetworkManager, ModemManager, PipeWire, and Mesa without overwriting custom patched binaries or pulling disallowed Rust packages.
Because custom Geminux components (`geminux-kernel-modules`, `geminux-xlibre`, `geminux-suckless`, `geminux-dunst`, `geminux-ui`, `geminux-bantam`, `geminux-gsocket`, `geminux-gdk-pixbuf`, `geminux-webarchy`, `geminux-gtkttk`, `geminux-config`) are exact-version pinned (`name@geminux=version`) in `/etc/apk/world` and Rust/Wayland/upstream overrides (`!rust`, `!cargo`, `!libglycin`, `!gdk-pixbuf`, `!deno`, `!py3-cryptography`, `!xorg-server`, `!linux-edge`, etc., with `librsvg`, `rav1e`/`rav1e-libs`, and `libdovi` whitelisted) are negated in `/etc/apk/world`, normal Alpine Edge upgrades update upstream libraries, CLI tools, NetworkManager, ModemManager, PipeWire, and Mesa without overwriting custom patched binaries or pulling disallowed Rust packages. On the build host, running `./rebuild-image.sh --force-bootstrap` upgrades all preinstalled Alpine Edge packages in `rootfs/` to the current Alpine Edge state when generating fresh images.
+6 -6
View File
@@ -8,7 +8,7 @@ Configured in [kernel/configs/geminux-mt6797x.config](file:///home/lux/proj/gemi
- **`CONFIG_HZ_100=y`**: 100 Hz tick rate cuts periodic timer interrupt overhead compared to 250 Hz / 1000 Hz kernels while remaining responsive for interactive X11 workloads.
- **`CONFIG_RCU_LAZY=y`**: Batches RCU callbacks during idle periods to extend CPU C-state residency.
- **`CONFIG_SUSPEND=y`**: Enables deep Suspend-to-RAM (`mem` / `deep`) via `mt6797-spm-sleep` (`sodi_idle=0 pmic_modes=0 timer_sec=600` in [etc/modprobe.d/geminux.conf](file:///home/lux/proj/geminux/overlay/rootfs/etc/modprobe.d/geminux.conf)) triggered on Gemini PDA lid close (`SW_LID`), battery idle timeout, or power button press. Keeping `pmic_modes=0` avoids asserting `MT6351` `VCORE` sleep voltage (`0.600 V`) while CPU0 remains powered in `WFI`, `spm_enter()` bounds silent PCM timer rollovers cleanly without `.suspend_again`, `mtk-eint` clears hardware debounce when switching wakeup pins such as `SW_LID` (`EINT5`) to edge-sensitive mode, `mtk-pmic-keys` reports `pm_wakeup_event()` on wakeup keypresses, and `0011-gemini-lid-sync-filter-and-debounce.patch` tunes Hall EINT debounce to `1 ms` (keypad `10 ms`) while synchronously filtering spurious keystrokes/touches and inhibiting both matrix keypad and touchscreen whenever the lid magnet closes.
- **`CONFIG_SUSPEND=y`**: Enables deep Suspend-to-RAM (`mem` / `deep`) via `mt6797-spm-sleep` (`sodi_idle=0 pmic_modes=0 timer_sec=600` in [etc/modprobe.d/geminux.conf](file:///home/lux/proj/geminux/overlay/rootfs/etc/modprobe.d/geminux.conf)) triggered on Gemini PDA lid close (`SW_LID`), battery idle timeout, or power button press. Keeping `pmic_modes=0` avoids asserting `MT6351` `VCORE` sleep voltage (`0.600 V`) while CPU0 remains powered in `WFI`, `spm_enter()` bounds silent PCM timer rollovers cleanly without `.suspend_again`, `mtk-eint` clears hardware debounce when switching wakeup pins such as `SW_LID` (`EINT5`) to edge-sensitive mode, `mtk-pmic-keys` reports `pm_wakeup_event()` on wakeup keypresses, `0011-gemini-lid-sync-filter-and-debounce.patch` tunes Hall EINT debounce to `1 ms` (keypad `10 ms`) while synchronously filtering spurious keystrokes/touches and inhibiting both matrix keypad and touchscreen whenever the lid magnet closes, and `0012-gemini-lid-wake-and-fg-taper-fix.patch` reconciles `gemini-lid` state on `PM_POST_SUSPEND` and raw-GPIO rechecks to prevent stuck `BL_CORE_SUSPENDED` / input lockouts alongside `mt6351-fuel-gauge` CV-taper (`win_ua`+`reg_ua`, `+2%` cap) and start-up `ADC21` sag tolerance hardening.
- **`CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y`**: Uses scheduler utilization feedback (`schedutil`) across the MT6797X tri-cluster topology instead of static `performance` governors. [etc/init.d/geminux-hwinit](file:///home/lux/proj/geminux/overlay/rootfs/etc/init.d/geminux-hwinit) loads `clk-mt6797-mcusys` and `cpufreq-dt` by default (`GEMINUX_ENABLE_CPUFREQ="yes"` in [etc/conf.d/geminux-hwinit](file:///home/lux/proj/geminux/overlay/rootfs/etc/conf.d/geminux-hwinit)) independently of experimental Cortex-A72 bring-up (`GEMINUX_ENABLE_A72="no"`), enabling `policy0` (`221..897 MHz`) and `policy4` (`325..1209 MHz`) frequency scaling and `soc-thermal` cooling throttling.
- **`mt6797-gate-unused`**: Loaded at the end of `geminux-hwinit` (`GEMINUX_GATE_UNUSED_CLOCKS="yes"`) to gate ~25 unused bootloader peripheral leaf clocks (unused `SPI`, `UART`, `PWM`, `IRTX`, `ICUSB`, `ANC_MD32`, etc.) left enabled due to `clk_ignore_unused` while leaving active display/I2C clocks untouched.
- **Sensor IR LED gating**: `stk3310` is blacklisted in [etc/modprobe.d/geminux.conf](file:///home/lux/proj/geminux/overlay/rootfs/etc/modprobe.d/geminux.conf) (`GEMINUX_ENABLE_SENSORS="no"`) because its probe unconditionally enables continuous ALS and proximity IR LED polling with no userspace consumer.
@@ -19,7 +19,7 @@ Configured in [kernel/configs/geminux-mt6797x.config](file:///home/lux/proj/gemi
All background system services avoid wake-up timers and polling loops:
- **`geminux-powerd`**: Sleeps indefinitely in `epoll_wait()` over `/dev/input/event*` (`SW_LID`, `KEY_POWER`, keyboard/touch/pointer activity), `KOBJECT_UEVENT` netlink (filtered strictly to `input`, `power_supply`, and `drm` subsystems), `/run/geminux/powerd.sock`, and a lazy-rearming `timerfd`; caches applied CPUfreq/profile state to avoid redundant sysfs and `/run/geminux/power-profile` rewrites; implements two-stage screensaver dimming and auto-lock/blank or suspend strictly timed from the last active user input (`dim_timeout_s` / `suspend_timeout_s`). Before entering `/sys/power/state`, it unloads `mt6797_consys` (and reverse dependents `btmt6797`, `radio_mt6797`, `gnss_mt6797`, `mac`) so `mt6797_consys_prepare()` no longer refuses suspend with `-EBUSY` and the `CONN`/`VCN*` rails power down cleanly; on resume, it uses retry-hardened async CONSYS reload while preserving Bluetooth `rfkill` soft-block state and verifies `SW_LID` before re-enabling the backlight. In hardware Airplane Mode (`Fn+F` / `geminux-power-ctl airplane on`, persisted under `/var/lib/geminux/airplane-mode`), `geminux-powerd` keeps the CONSYS Wi-Fi/BT kernel modules unloaded and places MD1 in `AT+CFUN=4` flight mode while leaving `usb0` active.
- **`geminux-powerd`**: Sleeps indefinitely in `epoll_wait()` over `/dev/input/event*` (`SW_LID`, `KEY_POWER`, `mtk-pmic-keys` `KEY_ESC` blank-screen wakeup, keyboard/touch/pointer activity), `KOBJECT_UEVENT` netlink (filtered strictly to `input` with lid-state reconciliation, `power_supply`, and `drm`), `/run/geminux/powerd.sock`, and a lazy-rearming `timerfd`; caches applied CPUfreq/profile state to avoid redundant sysfs and `/run/geminux/power-profile` rewrites; implements two-stage screensaver dimming and auto-lock/blank or suspend strictly timed from the last active user input (`dim_timeout_s` / `suspend_timeout_s`). On USB/AC (`inhibit_ac_lid`), closing the lid or timing out locks X11 and blanks the backlight cleanly without unloading CONSYS or invoking `/sys/power/state`, letting `bq25890`'s `40 s` charger watchdog stay fed without `-EBUSY` suspend thrashing. On battery, before entering `mem` `/sys/power/state`, it unloads `mt6797_consys` (and reverse dependents `btmt6797`, `radio_mt6797`, `gnss_mt6797`, `mac`) so `CONN`/`VCN*` rails power down and parks `cpu1..9` offline; when 4G `MD1` is powered and blocks SPM `mem` sleep, it drops `freeze` (`s2idle`) entirely in favor of zero-thrash `low_power_standby` (`cpu1..9` offline, `cpu0` pinned to `221 MHz` `powersave`, CONSYS unloaded, zero periodic wake timers) until lid open, input wake, or AC/HDMI attach. In hardware Airplane Mode (`Fn+F` / `geminux-power-ctl airplane on`, persisted under `/var/lib/geminux/airplane-mode`), `geminux-powerd` keeps the CONSYS Wi-Fi/BT kernel modules unloaded and places MD1 in `AT+CFUN=4` flight mode while leaving `usb0` active.
- **`geminux-statusd`**: Uses `signalfd` (`SIGUSR1`), `RTMGRP_LINK` netlink, filtered `KOBJECT_UEVENT` (`power_supply` and `net` only), `inotify`, and a minute-aligned `timerfd`; deduplicates root `WM_NAME` updates (`XStoreName`) so `dwm` never repaints when the bar text is unchanged, with zero child shell forks.
- **Display & terminal idle efficiency**: [10-geminux-gpu.conf](file:///home/lux/proj/geminux/overlay/rootfs/etc/X11/xorg.conf.d/10-geminux-gpu.conf) uses `AccelMethod "none"` + `ShadowFB "true"` + `TearFree "true"` for rotated `SSD2092` scanout, avoiding Glamor fence spin-waits, and `st` disables its cursor-blink timeout when unfocused so idle XLibre CPU usage remains near `0%`.
- **`geminux-touchd`**: Event-driven XInput 2.2 multi-touch gesture recognizer with zero polling loops.
@@ -32,13 +32,13 @@ All background system services avoid wake-up timers and polling loops:
| Profile | Governor | A72 big cores (`cpu8..9`) | A53 LL (`policy0`) / L (`policy4`) max freq | Battery idle (dim -> lock+suspend) | AC idle (lock+blank screensaver) |
| --- | --- | --- | --- | --- | --- |
| `eco` | `schedutil` | Offline (`0`) | `624 MHz` / `832 MHz` | `60 s` -> `180 s` | `180 s` |
| `balanced` | `schedutil` | Online (`1`) | `806 MHz` / `1092 MHz` (bat), `897 MHz` / `1209 MHz` (AC) | `120 s` -> `300 s` | `300 s` |
| `performance` | `schedutil` | Online (`1`) | `1547 MHz` / `1846 MHz` (clamped to DT `cpuinfo_max_freq`) | `180 s` (lock+blank, no suspend) | `600 s` |
| `eco` | `schedutil` | Offline (`0`) | `715 MHz` / `962 MHz` | `60 s` -> `180 s` | `180 s` |
| `balanced` | `schedutil` | Online (`1`, `2002 MHz`) | `897 MHz` / `1209 MHz` (bat), `1547 MHz` / `1846 MHz` (AC) | `120 s` -> `300 s` | `300 s` |
| `performance` | `performance` | Online (`1`, `2600 MHz`) | `1547 MHz` / `1846 MHz` (clamped to DT `cpuinfo_max_freq`) | `180 s` (lock+blank, no suspend) | `600 s` |
All idle thresholds above are measured from the last active keyboard, touchscreen, pointer, or lid-open event (`CLOCK_MONOTONIC`) and are not reset by periodic battery `power_supply` uevents.
Closing the Gemini PDA clamshell (`SW_LID = 1`) suspends immediately to RAM (`mem`), unless inhibited by an active voice call (`inhibit add call`), an explicit inhibitor, or a connected external HDMI monitor (`SiI9024`).
Closing the Gemini PDA clamshell (`SW_LID = 1`) on battery enters RAM suspend (`mem` when `MD1` is gated, or zero-thrash `low_power_standby` when `MD1` is active), unless inhibited by USB/AC power (`inhibit_ac_lid`, which locks + blanks without suspend), an active voice call (`inhibit add call`), an explicit inhibitor, or a connected external HDMI monitor (`SiI9024`).
## Audio, radios, and storage defaults
+4 -2
View File
@@ -15,7 +15,7 @@ Geminux is an Alpine Linux (`aarch64`, musl, OpenRC) distribution built specific
| Subsystem | Implementation | Source / Script |
| --- | --- | --- |
| Kernel & boot | Linux `7.3.5-geminux` + Gemini x27 patches (`SSD2092` DSI/touch, synchronous `gemini-lid` Hall filter & inhibit `0011`, CONSYS Wi-Fi/BT + peer deauth/GTK rekey/drop-free stability `0007`/`0009`, S3 resume/SPM `0008`, CCCI/CLDMA + MD1 boot HS v2/RPC `0002`/`0010`, XFRM/ESP IPsec, `sii902x`, `dm-crypt` LUKS2 initramfs) | [scripts/build-kernel.sh](file:///home/lux/proj/geminux/scripts/build-kernel.sh) |
| Kernel & boot | Linux `7.3.5-geminux` + Gemini x27 patches (`SSD2092` DSI/touch, synchronous `gemini-lid` Hall filter, inhibit & `PM_POST_SUSPEND` lockout prevention `0011`/`0012`, `mt6351-fuel-gauge` CV-taper & start-up `ADC21` accuracy `0008`/`0012`, CONSYS Wi-Fi/BT + peer deauth/GTK rekey/drop-free stability `0007`/`0009`, S3 resume/SPM `0008`, CCCI/CLDMA + MD1 boot HS v2/RPC `0002`/`0010`, XFRM/ESP IPsec, `sii902x`, `dm-crypt` LUKS2 initramfs) | [scripts/build-kernel.sh](file:///home/lux/proj/geminux/scripts/build-kernel.sh) |
| Flasher & GPT | Vendored GPLv3 `mtkclient` + MT6797 DA + GPT builder + offline credential & LUKS2 provisioning | [flash-mtk.sh](file:///home/lux/proj/geminux/flash-mtk.sh), [flash-mtk.py](file:///home/lux/proj/geminux/flash-mtk.py), [scripts/geminux_accounts.py](file:///home/lux/proj/geminux/scripts/geminux_accounts.py), [scripts/geminux_luks.py](file:///home/lux/proj/geminux/scripts/geminux_luks.py) |
| Display server | XLibre Xorg 25.x (`modesetting` `ShadowFB` + `TearFree` rotated 2D scanout alongside Panfrost Glamor/EGL 3D, `fbdev`, `libinput`) | [scripts/build-xlibre.sh](file:///home/lux/proj/geminux/scripts/build-xlibre.sh) |
| Window manager & terminal | Patched `dwm` (Pango, systray, `.Xresources`, `Mod4`, `Fn+F` Airplane Mode keybind, `SIGHUP` self-reexec), `st` (HarfBuzz ligatures, focus cursor sync & unfocused cursor-blink gating, wheel scrollback), full-height `dmenu` | [scripts/build-suckless.sh](file:///home/lux/proj/geminux/scripts/build-suckless.sh) |
@@ -47,13 +47,15 @@ Live hardware bring-up on a physical Planet Computers Gemini PDA (x27 Wi-Fi + 4G
./scripts/check-rebuild.sh
```
To rebuild all cross-compiled components from scratch (kernel, XLibre, suckless desktop, dunst, UI apps/daemons, Bantam, gsocket, pure-C `gdk-pixbuf`/Webarchy, signed `@geminux` APKs, and rootfs ext4):
To rebuild all cross-compiled components from scratch (kernel, XLibre, suckless desktop, dunst, UI apps/daemons, Bantam, gsocket, pure-C `gdk-pixbuf`/Webarchy, signed `@geminux` APKs, and rootfs ext4) and upgrade preinstalled Alpine Edge packages in `rootfs/` to the latest Alpine Edge state:
```sh
./rebuild-image.sh --rebuild-all --force-bootstrap
./scripts/check-rebuild.sh
```
Running `./rebuild-image.sh --force-bootstrap` alone also upgrades existing `rootfs/` Alpine Edge packages without recompiling all cross-compiled toolchains.
Further documentation:
- [INSTALL.md](file:///home/lux/proj/geminux/INSTALL.md) — Linux flashing procedure, backup, firmware extraction, and hardware bring-up checklist
+5 -1
View File
@@ -1,6 +1,6 @@
# Geminux Linux VT console keymap for Gemini PDA US physical keyboard
# Complete standalone map (safe for both loadkeys and loadkeys -b -> busybox loadkmap).
# Left Meta (Fn, keycode 125) = AltGr, Fn+1..0 = F1..F10,
# Left Meta (Fn, keycode 125) = AltGr, Fn+1..0 = F1..F10, Fn+Z/X = F11/F12,
# Shift+Fn+1..0 = ~ ` £ € < > [ ] { }
keymaps 0-6,8-9,12
alt_is_meta
@@ -79,6 +79,10 @@ keycode 38 = l L quotedbl
altgr keycode 38 = quotedbl
keycode 40 = backslash bar colon
altgr keycode 40 = colon
keycode 44 = z Z F11
altgr keycode 44 = F11
keycode 45 = x X F12
altgr keycode 45 = F12
keycode 50 = m M apostrophe
altgr keycode 50 = apostrophe
keycode 51 = comma slash
@@ -1,5 +1,5 @@
// Geminux XKB symbols for Planet Computers Gemini PDA
// US layout default: Fn+1..0 -> F1..F10, Shift+Fn+1..0 -> secondary symbols,
// US layout default: Fn+1..0 -> F1..F10, Fn+Z/X -> F11/F12, Shift+Fn+1..0 -> secondary symbols,
// Fn+Alt (either order) -> Super_L (Mod4).
partial hidden alphanumeric_keys modifier_keys
@@ -73,8 +73,8 @@ xkb_symbols "us" {
key <AC09> { type="FOUR_LEVEL", [ l, L, quotedbl, dead_caron ] };
key <AC11> { type="FOUR_LEVEL", [ backslash, bar, colon, dead_acute ] };
key <AB01> { type="FOUR_LEVEL", [ z, Z, guillemotleft, dead_belowdot ] };
key <AB02> { type="FOUR_LEVEL", [ x, X, guillemotright, dead_abovedot ] };
key <AB01> { type="FOUR_LEVEL", [ z, Z, F11, guillemotleft ] };
key <AB02> { type="FOUR_LEVEL", [ x, X, F12, guillemotright ] };
key <AB03> { type="FOUR_LEVEL", [ c, C, XF86AudioLowerVolume, copyright ] };
key <AB04> { type="FOUR_LEVEL", [ v, V, XF86AudioRaiseVolume, leftsinglequotemark ] };
key <AB05> { type="FOUR_LEVEL", [ b, B, XF86MonBrightnessDown,rightsinglequotemark ] };
+2 -1
View File
@@ -69,10 +69,11 @@ if [ ! -f "$ROOTFS/lib/apk/db/installed" ]; then
# shellcheck disable=SC2086
apk --root "$ROOTFS" --arch aarch64 add --initdb --no-scripts $EXTRA_GEMINUX $PKGS >/dev/null
else
# An existing rootfs only needs newly added packages; also refresh @geminux index.
# Refresh repositories, ensure package set, and upgrade installed Alpine Edge packages.
apk --root "$ROOTFS" --arch aarch64 update --force-refresh >/dev/null
# shellcheck disable=SC2086
apk --root "$ROOTFS" --arch aarch64 add --no-scripts $EXTRA_GEMINUX $PKGS >/dev/null
apk --root "$ROOTFS" --arch aarch64 upgrade --no-scripts
fi
"$REPO/scripts/prune-rootfs-packages.sh" "$ROOTFS" purge
+6 -3
View File
@@ -44,7 +44,7 @@ cat /tmp/gemini_dump.xkb
dump = res.stdout
checks = [
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10",
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12",
"asciitilde", "EuroSign", "Super_L", "ISO_Level3_Shift", "Mod4", "Mod5",
"GEMINUX_LALT", "GEMINUX_FN", "SetMods(modifiers=Mod4)",
'include "complete+custom"',
@@ -56,10 +56,13 @@ cat /tmp/gemini_dump.xkb
]
for token in checks:
assert token in dump, f"Expected '{token}' in compiled XKB dump"
# Verify digit AE01 order: [ 1, exclam, F1, asciitilde ]
# Verify digit AE01 and AB01/AB02 Z/X -> F11/F12 order
norm_dump = " ".join(dump.split())
assert "[ 1, exclam, F1, asciitilde ]" in dump or \
"1, exclam, F1, asciitilde" in " ".join(dump.split()), \
"1, exclam, F1, asciitilde" in norm_dump, \
"AE01 digit/F1/tilde mapping mismatch"
assert "z, Z, F11, guillemotleft" in norm_dump, "AB01 Z/F11 mapping mismatch"
assert "x, X, F12, guillemotright" in norm_dump, "AB02 X/F12 mapping mismatch"
with open(os.path.join(BASE_DIR, "src", "dwm", "dwm.c"), "r", encoding="utf-8") as f:
dwm_src = f.read()