Fix xkopher link focus and unlock clock; battery longevity pass
Map xkopher link focus through wrapped display rows and reset horizontal scroll in no-wrap mode. Refresh the status bar clock on unlock and from dmenu before republishing root WM_NAME. Re-analysis found two low-risk wins: force lz4 for the active zram swap and disable proactive compaction. Rebuild dmenu.so and smallweb.so, update guards and docs, redeploy live, and rebuild the image.
This commit is contained in:
1 parent
85c6a7b886
commit
3543556735
22 files changed
+402
-54
No files matched your search
@@ -1,4 +1,8 @@
|
||||
# zram settings...
|
||||
# NOTE: the shipped postmarketos-zram-swap service uses /usr/bin/zramstart,
|
||||
# which reads deviceinfo_zram_swap_algo from /usr/share/misc/source_deviceinfo.
|
||||
# This file is kept for zram-init compatibility; keep algo0 in sync with the
|
||||
# deviceinfo files (lz4, not zramstart's zstd default).
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# load zram kernel module on start?
|
||||
@@ -136,7 +140,7 @@ args3=
|
||||
type3=swap
|
||||
flag3=
|
||||
size3=512
|
||||
algo3=zstd
|
||||
algo3=lz4
|
||||
labl3=zram_swap2
|
||||
uuid3=
|
||||
args3=
|
||||
@@ -12,6 +12,8 @@ fi
|
||||
{ echo 30 > /proc/sys/vm/stat_interval; } 2>/dev/null || true
|
||||
{ echo 6000 > /proc/sys/vm/dirty_writeback_centisecs; } 2>/dev/null || true
|
||||
{ echo 6000 > /proc/sys/vm/dirty_expire_centisecs; } 2>/dev/null || true
|
||||
# Disable proactive compaction: kcompactd0 otherwise wakes ~2/s.
|
||||
{ echo 0 > /proc/sys/vm/compaction_proactiveness; } 2>/dev/null || true
|
||||
{ echo 0 > /proc/sys/kernel/nmi_watchdog; } 2>/dev/null || true
|
||||
{ echo "1 4 1 1" > /proc/sys/kernel/printk; } 2>/dev/null || true
|
||||
{ echo Y > /sys/module/workqueue/parameters/power_efficient; } 2>/dev/null || true
|
||||
|
||||
@@ -2,3 +2,7 @@
|
||||
# VPN tunnels). Removes ND/MLD multicast that keeps Wi-Fi out of BMPS.
|
||||
# The ipv6 module stays loaded for WireGuard/Tor and for ::1 on lo.
|
||||
net.ipv6.conf.default.disable_ipv6=1
|
||||
|
||||
# Proactive compaction wakes kcompactd0 ~2/s on this 512 MB target. Measured
|
||||
# with vm.compaction_proactiveness=0: CPU idle rose from 97.93% to 99.22%.
|
||||
vm.compaction_proactiveness=0
|
||||
Binary file not shown.
Binary file not shown.
@@ -501,6 +501,7 @@ is_screen_dark() {
|
||||
}
|
||||
|
||||
sxmo_debug "$@"
|
||||
force_bar=0
|
||||
case "$1" in
|
||||
network)
|
||||
is_screen_dark && exit 0
|
||||
@@ -514,6 +515,7 @@ case "$1" in
|
||||
time)
|
||||
is_screen_dark && exit 0
|
||||
set_time 1
|
||||
force_bar=1
|
||||
;;
|
||||
modem|volume)
|
||||
is_screen_dark && exit 0
|
||||
@@ -524,8 +526,11 @@ case "$1" in
|
||||
;;
|
||||
state_change)
|
||||
set_state
|
||||
# Always refresh the time file, even if this state-change raced ahead of
|
||||
# display-on; dmenu reads these files directly after unlock.
|
||||
set_time
|
||||
force_bar=1
|
||||
if ! is_screen_dark; then
|
||||
set_time
|
||||
set_inputmethod
|
||||
if [ -z "$SXMO_NO_MODEM" ]; then
|
||||
set_modem
|
||||
@@ -570,7 +575,7 @@ if ! is_screen_dark && [ "${SXMO_WM:-dwm}" = "dwm" ] && command -v xsetroot >/de
|
||||
_bar_cache="${XDG_RUNTIME_DIR:-/run/user/10000}/sxmo_status_bar_cache"
|
||||
_bar_prev=""
|
||||
[ -r "$_bar_cache" ] && { read -r _bar_prev < "$_bar_cache" 2>/dev/null || _bar_prev=""; }
|
||||
if [ "$_bar" != "$_bar_prev" ]; then
|
||||
if [ "$force_bar" = "1" ] || [ "$_bar" != "$_bar_prev" ]; then
|
||||
printf '%s\n' "$_bar" > "$_bar_cache" 2>/dev/null || true
|
||||
DISPLAY="${DISPLAY:-:0}" xsetroot -name "$_bar" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
@@ -14,6 +14,9 @@ if [ -z "$SXMO_DISABLE_LEDS" ]; then
|
||||
fi
|
||||
|
||||
sxmo_wm.sh display on
|
||||
# Refresh the clock synchronously: periodics are suppressed while dark and
|
||||
# dmenu republishes the root status from these files as soon as it opens.
|
||||
sxmo_hook_statusbar.sh time >/dev/null 2>&1 || true
|
||||
( sxmo_hook_statusbar.sh state_change >/dev/null 2>&1 & )
|
||||
if [ -z "$SXMO_NO_VIRTUAL_KEYBOARD" ]; then
|
||||
sxmo_wm.sh inputevent touchscreen on
|
||||
|
||||
Reference in new issue
Block a user