Skip to content

Some websites stop loading on Wi-Fi after unplugging the USB cable #103

Closed

Description

@robotosaith

On the Pixel 6 Pro (raven), while the phone is plugged into a computer, everything loads. After unplugging it and staying on Wi-Fi, some sites never load: github.com times out in the browser, while others such as google.com still work. Restarting the phone doesn't help; plugging the cable back in does.

Expected: unplugging the cable shouldn't change which sites load on Wi-Fi.

Seen on raven. Not tried on cheetah.

Activity

  1. changed the title [-]USB gateway outranks Wi-Fi and survives an unplug: IPv4 sites fail on Wi-Fi[/-] [+]Some websites stop loading on Wi-Fi after unplugging the USB cable[/+] on Oct 28, 2026
  2. derekross commented on Oct 28, 2026

    @derekross
    Owner

    Thanks for the clear report. "Plugging the cable back in fixes it" was the clue.

    The cause: our device packages give the USB link a default route through the laptop (Gateway=172.16.42.2 in 20-usb-gadget.network). networkd installs it at metric 0, ahead of Wi-Fi (600). With ConfigureWithoutCarrier=yes that route stays after you unplug, and a restart puts it back at boot, so IPv4 traffic keeps going into the dead cable. Sites that also have IPv6 (google.com) still load over Wi-Fi; IPv4-only ones like github.com time out. Every phone that ships this file has it, the Pixel 7 Pro included.

    The fix is your PR #102: the laptop becomes the last gateway (metric 2000), after Wi-Fi and mobile data, and SSH over the cable is unaffected. It's in review now. It changes the Pixel 7 Pro's package too, so I'll run it on mine before merging.

    Until then, after unplugging:

    sudo ip route del default via 172.16.42.2 dev usb0

    That lasts until the next boot (or until the link is set up again). It doesn't touch the cable's own subnet, so SSH over USB keeps working when you plug back in. I'd rather you didn't copy a fixed .network file into /etc/systemd/network/, because it would shadow the package's file after the fix ships.

    I'll close this when #102 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions