diff --git a/CHANGELOG.md b/CHANGELOG.md index c358f98..216219f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,7 @@ Release versions follow the `
` format (where `2026` is `a`, - Updated the `fcitx5` `superd` service wrapper (`bananarchy-fcitx5.sh`) and XIM environment propagation across `st`, `dmenu`, and `dwm-plugin` so T9 keypad input stays supervised and active across all terminal and menu sessions. - Removed the non-applicable `Toggle Bar` entry from the `Config` menu. - **Battery life and background service optimizations**: - - Removed `upowerd` and `sxmo_battery_monitor` (eliminating 3.5-second D-Bus broadcasts and shell forks in favor of direct `sysfs` `/sys/class/power_supply/` reads), `sxmo-x11-status` (updating the X11 root statusbar directly from `sxmo_hook_statusbar.sh`, `fcitx5-t9`, and `dmenu`), redundant 5-minute `mmcli` polling loops in `sxmo_modemmonitor.sh`, eMMC `/swapfile` (relying exclusively on compressed RAM `/dev/zram0`), `hkdm`, `haveged`, `iio-sensor-proxy`, `sleep-inhibitor`, `kill-plymouth`, `nftables`, `logbookd`, `openrc-user`, and unused `tty2`–`tty6` / `ttyMSM0` `getty` instances. + - Removed `upowerd` and `sxmo_battery_monitor` (eliminating 3.5-second D-Bus broadcasts and shell forks in favor of direct `sysfs` `/sys/class/power_supply/` reads), `sxmo-x11-status` (updating the X11 root statusbar directly from `sxmo_hook_statusbar.sh`, `fcitx5-t9`, and `dmenu`), redundant 5-minute `mmcli` polling loops in `sxmo_modemmonitor.sh`, eMMC `/swapfile` (relying exclusively on compressed RAM `/dev/zram0`), `hkdm`, `haveged`, `iio-sensor-proxy`, `sleep-inhibitor`, `nftables`, `logbookd`, and unused `tty2`–`tty6` / `ttyMSM0` `getty` instances. --- diff --git a/overlay/rootfs/etc/doas.d/50-sxmo.conf b/overlay/rootfs/etc/doas.d/50-sxmo.conf index f8e7e6e..826b9be 100644 --- a/overlay/rootfs/etc/doas.d/50-sxmo.conf +++ b/overlay/rootfs/etc/doas.d/50-sxmo.conf @@ -35,5 +35,7 @@ permit nopass :wheel as root cmd tee args /sys/module/leds_msm8905_torch/paramet permit nopass :wheel as root cmd /usr/bin/tee args /sys/module/leds_msm8905_torch/parameters/next_reboot_mode permit nopass :wheel as root cmd /usr/bin/sxmo_power.sh permit nopass :wheel as root cmd sxmo_power.sh +permit nopass :wheel as root cmd /usr/bin/plymouth args quit +permit nopass :wheel as root cmd plymouth args quit permit nopass :wheel as root cmd rc-service args hexagonrpcd-adsp-sensorspd stop permit nopass :wheel as root cmd systemctl args stop hexagonrpcd-adsp-sensorspd diff --git a/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh b/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh index cf64ada..20fbd60 100755 --- a/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh +++ b/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh @@ -17,12 +17,14 @@ if command -v fc-cache > /dev/null && [ -z "$(ls -A /var/cache/fontconfig 2>/dev fc-cache >/dev/null 2>&1 & fi -sxmo_jobs.sh start daemon_manager superd - -# let time to superd to start correctly -while ! superctl status > /dev/null 2>&1; do - sleep 0.05 -done +if ! superctl status > /dev/null 2>&1; then + pkill -9 -x superd > /dev/null 2>&1 || true + rm -f "$XDG_RUNTIME_DIR/superd.lock" "$XDG_RUNTIME_DIR/superd.sock" + sxmo_jobs.sh start daemon_manager superd + while ! superctl status > /dev/null 2>&1; do + sleep 0.05 + done +fi if [ -n "$SXMO_ROTATE_START" ]; then sxmo_rotate.sh diff --git a/overlay/rootfs/usr/bin/bananarchy-x11-session.sh b/overlay/rootfs/usr/bin/bananarchy-x11-session.sh index 6e8651f..aa37016 100755 --- a/overlay/rootfs/usr/bin/bananarchy-x11-session.sh +++ b/overlay/rootfs/usr/bin/bananarchy-x11-session.sh @@ -66,6 +66,10 @@ XORG_BIN="Xorg" XORG_MODPATH="/usr/lib/xorg/modules/xlibre-25,/usr/lib/xorg/modules" [ -d /tmp/x11/usr/lib/xorg/modules ] && XORG_MODPATH="/tmp/x11/usr/lib/xorg/modules/xlibre-25,/tmp/x11/usr/lib/xorg/modules" +if pidof -s plymouthd >/dev/null 2>&1; then + /usr/bin/plymouth quit >/dev/null 2>&1 || doas -n /usr/bin/plymouth quit >/dev/null 2>&1 || true +fi + if ! pidof -s Xorg >/dev/null 2>&1; then "$XORG_BIN" :0 -s 0 -dpms -nocursor -nolisten tcp -config "$XORG_CONFIG" -modulepath "$XORG_MODPATH" -logfile /tmp/Xorg.0.log >/dev/null 2>&1 /dev/null && [ -z "$(ls -A /var/cache/fontconfig 2>/dev fc-cache >/dev/null 2>&1 & fi -sxmo_jobs.sh start daemon_manager superd - -# let time to superd to start correctly -while ! superctl status > /dev/null 2>&1; do - sleep 0.05 -done +if ! superctl status > /dev/null 2>&1; then + pkill -9 -x superd > /dev/null 2>&1 || true + rm -f "$XDG_RUNTIME_DIR/superd.lock" "$XDG_RUNTIME_DIR/superd.sock" + sxmo_jobs.sh start daemon_manager superd + while ! superctl status > /dev/null 2>&1; do + sleep 0.05 + done +fi if [ -n "$SXMO_ROTATE_START" ]; then sxmo_rotate.sh diff --git a/scripts/apply-bananarchy-overlay.sh b/scripts/apply-bananarchy-overlay.sh index 1e3e64f..7fddc07 100755 --- a/scripts/apply-bananarchy-overlay.sh +++ b/scripts/apply-bananarchy-overlay.sh @@ -137,15 +137,14 @@ rm -rf \ "$TARGET_ROOTFS/etc/runlevels/default/haveged" \ "$TARGET_ROOTFS/etc/runlevels/default/iio-sensor-proxy" \ "$TARGET_ROOTFS/etc/runlevels/default/sleep-inhibitor" \ - "$TARGET_ROOTFS/etc/runlevels/default/kill-plymouth" \ "$TARGET_ROOTFS/etc/runlevels/default/swapfile" \ "$TARGET_ROOTFS/etc/runlevels/default/nftables" \ "$TARGET_ROOTFS/etc/runlevels/boot/logbookd" \ - "$TARGET_ROOTFS/etc/init.d/user.user" \ "$TARGET_ROOTFS/usr/share/superd/services/sxmo_battery_monitor.service" \ "$TARGET_ROOTFS/usr/share/superd/services/sxmo-x11-status.service" \ "$TARGET_ROOTFS/swapfile" \ "$TARGET_ROOTFS/var/log/logbookd.db"* +ln -sf /etc/init.d/kill-plymouth "$TARGET_ROOTFS/etc/runlevels/default/kill-plymouth" mkdir -p "$TARGET_ROOTFS/var/lib/tinydm" ln -sf /usr/share/xsessions/sxmo.desktop "$TARGET_ROOTFS/var/lib/tinydm/default-session.desktop"