From 67ec3db647720de06461f2f71c7e0cc41691b257 Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Wed, 28 Oct 2026 06:40:30 +0000 Subject: [PATCH 1/4] device-raven, device-cheetah: make USB the last gateway, not the first 20-usb-gadget.network gave usb0 the laptop as its Gateway=, which networkd installs as the default route at metric 0, ahead of Wi-Fi (600) and mobile data (700). With ConfigureWithoutCarrier=yes the route stays after an unplug, and usb0 keeps its carrier then anyway. So once the phone left the desk, IPv4 still went into the dead cable: on raven, github.com (IPv4 only) failed on Wi-Fi while sites with IPv6 loaded. The gateway is now a [Route] at metric 2000: the laptop's shared connection is the fallback when there is no Wi-Fi or mobile data, and SSH over the cable is unaffected (it uses the link's own subnet). Both packages' tests check that usb0 sets no metric-0 default route. Co-Authored-By: Claude Opus 5.5 --- packages/omamobile-device-cheetah/test/all | 8 ++++++++ .../vendor/systemd/network/20-usb-gadget.network | 12 ++++++++++-- packages/omamobile-device-raven/test/all | 8 ++++++++ .../vendor/systemd/network/20-usb-gadget.network | 12 ++++++++++-- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/packages/omamobile-device-cheetah/test/all b/packages/omamobile-device-cheetah/test/all index 695081b94..4736702a5 100755 --- a/packages/omamobile-device-cheetah/test/all +++ b/packages/omamobile-device-cheetah/test/all @@ -75,3 +75,11 @@ grep -qx '\[Login\]' "$power" || fail "the power-key drop-in needs a [Login] hea grep -qx 'HandlePowerKey=ignore' "$power" || fail "a short press must not power the phone off" grep -qx 'HandlePowerKeyLongPress=ignore' "$power" || fail "the long press stays the PMIC reset" pass "install stages the package" + +# USB is the last gateway: its route outlives an unplug, so ahead of Wi-Fi +# it sent IPv4 into a dead cable (raven, 2026-10-28). +net=vendor/systemd/network/20-usb-gadget.network +! sed -n '/^\[Network\]/,/^\[/p' "$net" | grep -q '^Gateway=' || fail "usb0 sets no default route in [Network] (metric 0)" +metric=$(sed -n '/^\[Route\]/,/^\[/{s/^Metric=//p}' "$net") +[[ ${metric:-0} -gt 700 ]] || fail "usb0's gateway goes after Wi-Fi (600) and mobile data (700)" +pass "USB is the last gateway" diff --git a/packages/omamobile-device-cheetah/vendor/systemd/network/20-usb-gadget.network b/packages/omamobile-device-cheetah/vendor/systemd/network/20-usb-gadget.network index 4e30191f6..973c61db7 100644 --- a/packages/omamobile-device-cheetah/vendor/systemd/network/20-usb-gadget.network +++ b/packages/omamobile-device-cheetah/vendor/systemd/network/20-usb-gadget.network @@ -2,13 +2,21 @@ # Omarchy Mobile: USB networking to the host. The initramfs sets up the USB # gadget (CDC NCM) before handing over to Arch; this gives it an address. # The host shares its internet over this link (NetworkManager "shared" -# mode on 172.16.42.2), so it is also the gateway. DNS goes to public resolvers. +# mode on 172.16.42.2), so it is also a gateway, the last one: Wi-Fi (600) +# and mobile data (700) go first. ConfigureWithoutCarrier keeps this route +# after an unplug (and usb0 keeps its carrier anyway), so at metric 0 IPv4 +# went into the dead cable once the phone left the desk: IPv4-only sites +# such as github.com failed on Wi-Fi while IPv6 ones loaded (raven, +# 2026-10-28). DNS goes to public resolvers. [Match] Name=usb0 [Network] Address=172.16.42.1/24 -Gateway=172.16.42.2 DNS=1.1.1.1 DNS=9.9.9.9 ConfigureWithoutCarrier=yes + +[Route] +Gateway=172.16.42.2 +Metric=2000 diff --git a/packages/omamobile-device-raven/test/all b/packages/omamobile-device-raven/test/all index 6fca3a01b..6da623b21 100755 --- a/packages/omamobile-device-raven/test/all +++ b/packages/omamobile-device-raven/test/all @@ -98,3 +98,11 @@ for m in pcie_gs201_cp cpif shm_ipc boot_device_spi; do grep -qx "blacklist $m" vendor/modprobe.d/omamobile-raven-modem.conf || fail "$m stays blacklisted (modem bring-up)" done pass "the modem's drivers never load at boot" + +# USB is the last gateway: its route outlives an unplug, so ahead of Wi-Fi +# it sent IPv4 into a dead cable (raven, 2026-10-28). +net=vendor/systemd/network/20-usb-gadget.network +! sed -n '/^\[Network\]/,/^\[/p' "$net" | grep -q '^Gateway=' || fail "usb0 sets no default route in [Network] (metric 0)" +metric=$(sed -n '/^\[Route\]/,/^\[/{s/^Metric=//p}' "$net") +[[ ${metric:-0} -gt 700 ]] || fail "usb0's gateway goes after Wi-Fi (600) and mobile data (700)" +pass "USB is the last gateway" diff --git a/packages/omamobile-device-raven/vendor/systemd/network/20-usb-gadget.network b/packages/omamobile-device-raven/vendor/systemd/network/20-usb-gadget.network index 4e30191f6..973c61db7 100644 --- a/packages/omamobile-device-raven/vendor/systemd/network/20-usb-gadget.network +++ b/packages/omamobile-device-raven/vendor/systemd/network/20-usb-gadget.network @@ -2,13 +2,21 @@ # Omarchy Mobile: USB networking to the host. The initramfs sets up the USB # gadget (CDC NCM) before handing over to Arch; this gives it an address. # The host shares its internet over this link (NetworkManager "shared" -# mode on 172.16.42.2), so it is also the gateway. DNS goes to public resolvers. +# mode on 172.16.42.2), so it is also a gateway, the last one: Wi-Fi (600) +# and mobile data (700) go first. ConfigureWithoutCarrier keeps this route +# after an unplug (and usb0 keeps its carrier anyway), so at metric 0 IPv4 +# went into the dead cable once the phone left the desk: IPv4-only sites +# such as github.com failed on Wi-Fi while IPv6 ones loaded (raven, +# 2026-10-28). DNS goes to public resolvers. [Match] Name=usb0 [Network] Address=172.16.42.1/24 -Gateway=172.16.42.2 DNS=1.1.1.1 DNS=9.9.9.9 ConfigureWithoutCarrier=yes + +[Route] +Gateway=172.16.42.2 +Metric=2000 From b63519b00b45ad15ff24cd9a00523b5995b140cb Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Wed, 28 Oct 2026 11:31:05 +0000 Subject: [PATCH 2/4] device-felix, device-husky: make USB the last gateway, not the first felix and husky ship the same 20-usb-gadget.network as raven and cheetah, with the laptop as usb0's Gateway= at metric 0, a route that outlives an unplug. They get the same fix: the gateway is a [Route] at metric 2000, after Wi-Fi (600) and mobile data (700), and the same test. Not tested on those phones. Co-Authored-By: Claude Opus 5.5 --- packages/omamobile-device-felix/test/all | 8 ++++++++ .../vendor/systemd/network/20-usb-gadget.network | 12 ++++++++++-- packages/omamobile-device-husky/test/all | 8 ++++++++ .../vendor/systemd/network/20-usb-gadget.network | 12 ++++++++++-- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/packages/omamobile-device-felix/test/all b/packages/omamobile-device-felix/test/all index c665daaeb..b6641e88c 100755 --- a/packages/omamobile-device-felix/test/all +++ b/packages/omamobile-device-felix/test/all @@ -100,3 +100,11 @@ for absent in usr/bin/omamobile-boot-success usr/bin/omamobile-bootctl \ [[ ! -e $tmp/root/$absent ]] || fail "install includes $absent" done pass "install stages the udev rule, the USB link, and the mirrorlist, and nothing that marks a slot or starts hardware" + +# USB is the last gateway: its route outlives an unplug, so ahead of Wi-Fi +# it sent IPv4 into a dead cable (seen on raven, 2026-10-28). +net=vendor/systemd/network/20-usb-gadget.network +! sed -n '/^\[Network\]/,/^\[/p' "$net" | grep -q '^Gateway=' || fail "usb0 sets no default route in [Network] (metric 0)" +metric=$(sed -n '/^\[Route\]/,/^\[/{s/^Metric=//p}' "$net") +[[ ${metric:-0} -gt 700 ]] || fail "usb0's gateway goes after Wi-Fi (600) and mobile data (700)" +pass "USB is the last gateway" diff --git a/packages/omamobile-device-felix/vendor/systemd/network/20-usb-gadget.network b/packages/omamobile-device-felix/vendor/systemd/network/20-usb-gadget.network index 4e30191f6..a3050f612 100644 --- a/packages/omamobile-device-felix/vendor/systemd/network/20-usb-gadget.network +++ b/packages/omamobile-device-felix/vendor/systemd/network/20-usb-gadget.network @@ -2,13 +2,21 @@ # Omarchy Mobile: USB networking to the host. The initramfs sets up the USB # gadget (CDC NCM) before handing over to Arch; this gives it an address. # The host shares its internet over this link (NetworkManager "shared" -# mode on 172.16.42.2), so it is also the gateway. DNS goes to public resolvers. +# mode on 172.16.42.2), so it is also a gateway, the last one: Wi-Fi (600) +# and mobile data (700) go first. ConfigureWithoutCarrier keeps this route +# after an unplug (and usb0 keeps its carrier anyway), so at metric 0 IPv4 +# went into the dead cable once the phone left the desk: IPv4-only sites +# such as github.com failed on Wi-Fi while IPv6 ones loaded (seen on raven, +# 2026-10-28). DNS goes to public resolvers. [Match] Name=usb0 [Network] Address=172.16.42.1/24 -Gateway=172.16.42.2 DNS=1.1.1.1 DNS=9.9.9.9 ConfigureWithoutCarrier=yes + +[Route] +Gateway=172.16.42.2 +Metric=2000 diff --git a/packages/omamobile-device-husky/test/all b/packages/omamobile-device-husky/test/all index 9e380df01..cc380d15e 100755 --- a/packages/omamobile-device-husky/test/all +++ b/packages/omamobile-device-husky/test/all @@ -89,3 +89,11 @@ pass "install stages the udev rule, the USB link, and the mirrorlist, and nothin [[ ! -e $tmp/root/usr/lib/systemd/logind.conf.d/10-omamobile-lid.conf ]] \ || fail "husky has no lid: no lid drop-in" pass "no lid drop-in" + +# USB is the last gateway: its route outlives an unplug, so ahead of Wi-Fi +# it sent IPv4 into a dead cable (seen on raven, 2026-10-28). +net=vendor/systemd/network/20-usb-gadget.network +! sed -n '/^\[Network\]/,/^\[/p' "$net" | grep -q '^Gateway=' || fail "usb0 sets no default route in [Network] (metric 0)" +metric=$(sed -n '/^\[Route\]/,/^\[/{s/^Metric=//p}' "$net") +[[ ${metric:-0} -gt 700 ]] || fail "usb0's gateway goes after Wi-Fi (600) and mobile data (700)" +pass "USB is the last gateway" diff --git a/packages/omamobile-device-husky/vendor/systemd/network/20-usb-gadget.network b/packages/omamobile-device-husky/vendor/systemd/network/20-usb-gadget.network index 4e30191f6..a3050f612 100644 --- a/packages/omamobile-device-husky/vendor/systemd/network/20-usb-gadget.network +++ b/packages/omamobile-device-husky/vendor/systemd/network/20-usb-gadget.network @@ -2,13 +2,21 @@ # Omarchy Mobile: USB networking to the host. The initramfs sets up the USB # gadget (CDC NCM) before handing over to Arch; this gives it an address. # The host shares its internet over this link (NetworkManager "shared" -# mode on 172.16.42.2), so it is also the gateway. DNS goes to public resolvers. +# mode on 172.16.42.2), so it is also a gateway, the last one: Wi-Fi (600) +# and mobile data (700) go first. ConfigureWithoutCarrier keeps this route +# after an unplug (and usb0 keeps its carrier anyway), so at metric 0 IPv4 +# went into the dead cable once the phone left the desk: IPv4-only sites +# such as github.com failed on Wi-Fi while IPv6 ones loaded (seen on raven, +# 2026-10-28). DNS goes to public resolvers. [Match] Name=usb0 [Network] Address=172.16.42.1/24 -Gateway=172.16.42.2 DNS=1.1.1.1 DNS=9.9.9.9 ConfigureWithoutCarrier=yes + +[Route] +Gateway=172.16.42.2 +Metric=2000 From 40a9a8200529fda4548f9587b279fa74ac5a3f11 Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Wed, 28 Oct 2026 16:30:42 +0000 Subject: [PATCH 3/4] device-lynx 0.2.1: make USB the last gateway, not the first lynx's package (#88) ships the same 20-usb-gadget.network as the others, with the laptop as usb0's Gateway= at metric 0, a route that outlives an unplug. It gets the same fix: the gateway is a [Route] at metric 2000, after Wi-Fi (600) and mobile data (700), and the same test. Not tested on a Pixel 7a. Co-Authored-By: Claude Opus 5.5 --- packages/omamobile-device-lynx/test/all | 8 ++++++++ .../vendor/systemd/network/20-usb-gadget.network | 12 ++++++++++-- packages/omamobile-device-lynx/version | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/omamobile-device-lynx/test/all b/packages/omamobile-device-lynx/test/all index 48cea51fd..0df95a6de 100755 --- a/packages/omamobile-device-lynx/test/all +++ b/packages/omamobile-device-lynx/test/all @@ -119,3 +119,11 @@ for absent in usr/bin/omamobile-wifi-start usr/bin/omamobile-charge-guard \ [[ ! -e $tmp/root/$absent ]] || fail "install includes $absent" done pass "install stages the udev rule, the USB link, the mirrorlist, and the boot-success marker, and nothing that starts hardware" + +# USB is the last gateway: its route outlives an unplug, so ahead of Wi-Fi +# it sent IPv4 into a dead cable (seen on raven, 2026-10-28). +net=vendor/systemd/network/20-usb-gadget.network +! sed -n '/^\[Network\]/,/^\[/p' "$net" | grep -q '^Gateway=' || fail "usb0 sets no default route in [Network] (metric 0)" +metric=$(sed -n '/^\[Route\]/,/^\[/{s/^Metric=//p}' "$net") +[[ ${metric:-0} -gt 700 ]] || fail "usb0's gateway goes after Wi-Fi (600) and mobile data (700)" +pass "USB is the last gateway" diff --git a/packages/omamobile-device-lynx/vendor/systemd/network/20-usb-gadget.network b/packages/omamobile-device-lynx/vendor/systemd/network/20-usb-gadget.network index 4e30191f6..a3050f612 100644 --- a/packages/omamobile-device-lynx/vendor/systemd/network/20-usb-gadget.network +++ b/packages/omamobile-device-lynx/vendor/systemd/network/20-usb-gadget.network @@ -2,13 +2,21 @@ # Omarchy Mobile: USB networking to the host. The initramfs sets up the USB # gadget (CDC NCM) before handing over to Arch; this gives it an address. # The host shares its internet over this link (NetworkManager "shared" -# mode on 172.16.42.2), so it is also the gateway. DNS goes to public resolvers. +# mode on 172.16.42.2), so it is also a gateway, the last one: Wi-Fi (600) +# and mobile data (700) go first. ConfigureWithoutCarrier keeps this route +# after an unplug (and usb0 keeps its carrier anyway), so at metric 0 IPv4 +# went into the dead cable once the phone left the desk: IPv4-only sites +# such as github.com failed on Wi-Fi while IPv6 ones loaded (seen on raven, +# 2026-10-28). DNS goes to public resolvers. [Match] Name=usb0 [Network] Address=172.16.42.1/24 -Gateway=172.16.42.2 DNS=1.1.1.1 DNS=9.9.9.9 ConfigureWithoutCarrier=yes + +[Route] +Gateway=172.16.42.2 +Metric=2000 diff --git a/packages/omamobile-device-lynx/version b/packages/omamobile-device-lynx/version index 0ea3a944b..0c62199f1 100644 --- a/packages/omamobile-device-lynx/version +++ b/packages/omamobile-device-lynx/version @@ -1 +1 @@ -0.2.0 +0.2.1 From 4240838240668a1f820191221fbc626d93bfd196 Mon Sep 17 00:00:00 2001 From: Derek Ross Date: Fri, 30 Oct 2026 15:36:23 -0400 Subject: [PATCH 4/4] device packages: the Pixel 7 too, and every package's next version panther shipped the same 20-usb-gadget.network with Gateway= under [Network]; it gets felix's [Route] block at metric 2000 and the same test. Versions: cheetah 0.1.35, raven 0.1.28, felix 0.1.5, husky 0.1.1, panther 0.1.2 (lynx was already 0.2.1). Co-Authored-By: Claude Opus 5.5 --- packages/omamobile-device-cheetah/version | 2 +- packages/omamobile-device-felix/version | 2 +- packages/omamobile-device-husky/version | 2 +- packages/omamobile-device-panther/test/all | 7 +++++++ .../vendor/systemd/network/20-usb-gadget.network | 12 ++++++++++-- packages/omamobile-device-panther/version | 2 +- packages/omamobile-device-raven/version | 2 +- 7 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packages/omamobile-device-cheetah/version b/packages/omamobile-device-cheetah/version index 9dd179330..a52e04166 100644 --- a/packages/omamobile-device-cheetah/version +++ b/packages/omamobile-device-cheetah/version @@ -1 +1 @@ -0.1.34 +0.1.35 diff --git a/packages/omamobile-device-felix/version b/packages/omamobile-device-felix/version index 845639eef..9faa1b7a7 100644 --- a/packages/omamobile-device-felix/version +++ b/packages/omamobile-device-felix/version @@ -1 +1 @@ -0.1.4 +0.1.5 diff --git a/packages/omamobile-device-husky/version b/packages/omamobile-device-husky/version index 6e8bf73aa..17e51c385 100644 --- a/packages/omamobile-device-husky/version +++ b/packages/omamobile-device-husky/version @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/packages/omamobile-device-panther/test/all b/packages/omamobile-device-panther/test/all index 6f5fccb27..4f9c837c8 100755 --- a/packages/omamobile-device-panther/test/all +++ b/packages/omamobile-device-panther/test/all @@ -106,3 +106,10 @@ for absent in usr/bin/omamobile-boot-success usr/bin/omamobile-bootctl \ [[ ! -e $tmp/root/$absent ]] || fail "install includes $absent" done pass "install stages the udev rules, the USB link, and the mirrorlist, and nothing that marks a slot or starts hardware" +# USB is the last gateway: its route outlives an unplug, so ahead of Wi-Fi +# it sent IPv4 into a dead cable (seen on raven, 2026-10-28). +net=vendor/systemd/network/20-usb-gadget.network +! sed -n '/^\[Network\]/,/^\[/p' "$net" | grep -q '^Gateway=' || fail "usb0 sets no default route in [Network] (metric 0)" +metric=$(sed -n '/^\[Route\]/,/^\[/{s/^Metric=//p}' "$net") +[[ ${metric:-0} -gt 700 ]] || fail "usb0's gateway goes after Wi-Fi (600) and mobile data (700)" +pass "USB is the last gateway" diff --git a/packages/omamobile-device-panther/vendor/systemd/network/20-usb-gadget.network b/packages/omamobile-device-panther/vendor/systemd/network/20-usb-gadget.network index 4e30191f6..a3050f612 100644 --- a/packages/omamobile-device-panther/vendor/systemd/network/20-usb-gadget.network +++ b/packages/omamobile-device-panther/vendor/systemd/network/20-usb-gadget.network @@ -2,13 +2,21 @@ # Omarchy Mobile: USB networking to the host. The initramfs sets up the USB # gadget (CDC NCM) before handing over to Arch; this gives it an address. # The host shares its internet over this link (NetworkManager "shared" -# mode on 172.16.42.2), so it is also the gateway. DNS goes to public resolvers. +# mode on 172.16.42.2), so it is also a gateway, the last one: Wi-Fi (600) +# and mobile data (700) go first. ConfigureWithoutCarrier keeps this route +# after an unplug (and usb0 keeps its carrier anyway), so at metric 0 IPv4 +# went into the dead cable once the phone left the desk: IPv4-only sites +# such as github.com failed on Wi-Fi while IPv6 ones loaded (seen on raven, +# 2026-10-28). DNS goes to public resolvers. [Match] Name=usb0 [Network] Address=172.16.42.1/24 -Gateway=172.16.42.2 DNS=1.1.1.1 DNS=9.9.9.9 ConfigureWithoutCarrier=yes + +[Route] +Gateway=172.16.42.2 +Metric=2000 diff --git a/packages/omamobile-device-panther/version b/packages/omamobile-device-panther/version index 17e51c385..d917d3e26 100644 --- a/packages/omamobile-device-panther/version +++ b/packages/omamobile-device-panther/version @@ -1 +1 @@ -0.1.1 +0.1.2 diff --git a/packages/omamobile-device-raven/version b/packages/omamobile-device-raven/version index a2e1aa9d9..baec65a93 100644 --- a/packages/omamobile-device-raven/version +++ b/packages/omamobile-device-raven/version @@ -1 +1 @@ -0.1.27 +0.1.28