Replace idle network poller with event-driven dispatcher
A/B measure and reject additional VM/sysctl/mount tweaks that did not improve idle without trade-offs. Remove sxmo_networkmonitor's long-lived nmcli device monitor, replace it with NetworkManager dispatcher hooks that run Sxmo network/statusbar hooks as the X session user, disable the superd unit in both start hooks, guard it in check-rebuild.sh, update docs, rebuild the image, and verify live Wi-Fi reconnect and idle context switches.
This commit is contained in:
1 parent
3543556735
commit
608a8ac71b
11 files changed
+236
-7
No files matched your search
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# NetworkManager dispatcher: replace sxmo_networkmonitor's long-lived
|
||||
# "nmcli device monitor" with event-driven Sxmo network/statusbar hooks.
|
||||
# The helper re-executes as the X session user so status files stay owned by
|
||||
# user:user. Double-fork so NetworkManager never waits for shell hooks.
|
||||
case "${2:-}" in
|
||||
up|down|pre-up|pre-down|vpn-up|vpn-down|vpn-pre-up|vpn-pre-down|\
|
||||
connectivity-change|dhcp4-change|dhcp6-change|dns-change) ;;
|
||||
*) exit 0 ;;
|
||||
esac
|
||||
( su user -s /bin/sh -c \
|
||||
"/usr/bin/bananarchy-network-event.sh '$1' '$2'" \
|
||||
>/dev/null 2>&1 & ) 2>/dev/null || true
|
||||
exit 0
|
||||
Reference in new issue
Block a user