Repository navigation
device-panther: Wi-Fi, with the Pixel 7 Pro's files - #419
angelrenefm wants to merge 2 commits into
Conversation
The Pixel 7 has the 7 Pro's BCM4389 on the same PCIe controller, and its bootloader writes the same wlan_mac1 into the device tree. So the package takes the 7 Pro's Wi-Fi guard, its unit and autoload blacklist, and the MAC address helper with its udev rule, byte for byte; test/all checks the copies against device-cheetah, as it does for the other shared files. Bluetooth's files come with nesmeck's Bluetooth change. omamobile-wifi.service is enabled, as on the 7 Pro. That changes the test's old rule that nothing here starts hardware: Wi-Fi is now the one radio started at boot, and only through its guard (hang marker, modules blacklisted for autoload, no SysMMU firewall, and the unit only runs when the DTB enables 14520000.pcie). On a kernel without the Wi-Fi node it is skipped. The test now fails on any other wants link, and still fails on the boot-success marker, the charge guard, AoC and cameras. On a Pixel 7 the files, copied by hand, have the same sha256 as these. On 7.3.0-rc6-omamobile-push1-g4446f52aefe8 (omamobile fe9627c00 with linux-omarchy-mobile#181's series and the 7 Pro's Wi-Fi and Bluetooth nodes), Wi-Fi was started by hand: wlp1s0 came up with the phone's own firmware and saw networks. On the next boot (the same kernel plus a CMA change, g3631214cc15a) the enabled unit brought wlp1s0 up about 5 s into boot, and it connected. I used AI help (Claude) to work on this.
87da773 to
2f7b60c
Compare
|
Thank you, @angelrenefm. Taking cheetah's files byte for byte, with a test that compares them, is the right way to do this, and I checked all five against the 7 Pro's package: identical. The unit's One change before it goes in: Sleep. On the 7 Pro,
The first is less work and keeps the Pixel 7 on the 7 Pro's default. At merge I'll set the version (the next free one; 0.1.6 and 0.1.7 are taken) and, if that's all right with you, retitle it to "device-panther 0.1.N: Wi-Fi at boot with the Pixel 7 Pro's guarded start", since "the Pixel 7 Pro's files" could read as the 7 Pro's firmware. If you touch the README, the same applies there. This one merges before linux-omarchy-mobile#195, so the blacklist is on every Pixel 7 before a kernel with the Wi-Fi node reaches it. If you post a Thanks for splitting the Wi-Fi and Bluetooth work so cleanly with nesmeck. |
Copy the Pixel 7 Pro's bin/omamobile-sleep and its system-sleep link unchanged, so the Pixel 7 keeps the 7 Pro's default: Wi-Fi unloads before every suspend and reloads through the guarded service after, unless /etc/omamobile/wifi-keep-across-sleep exists, and goes back to unloading for the rest of the boot after a wake that fails in the Wi-Fi device. Before this, Wi-Fi would have stayed loaded through every suspend on the Pixel 7, which hasn't run there yet. The package test compares the script and the link with cheetah's, like the other copied files, and checks that both are staged. Checked that the test fails when either copy drifts. Not run on the phone: no suspend has been done with this package. I used AI help (Claude) to work on this.
|
Thanks, Derek. I took the first option: bda4f37 copies cheetah's
Not checked: no suspend has run on the Pixel 7 with this package, and I don't have a I used AI help (Claude) to work on this. |
|
Tested on my Pixel 7 tonight, with the package built from this branch merged onto today's main (the conflicts resolved as in my last comment, version set locally to 0.1.9.1 so a real release replaces it), installed with
phone-smoke from the same boot, before the cycles: phone-smoke: unknownKernel
Packages: hyprland 0.57.0-3.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.13-1, omamobile-device-panther 0.1.9.1-1, omamobile-firstboot 0.1.3-1, omamobile-gnss 0.2.7-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-omarchy 0.1.32-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.100-1, omaphone 0.2.3-1, omarchy 4.5.0-3, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1 Not checked: a longer or unattended sleep, and sleep with Wi-Fi kept loaded ( I used AI help (Claude) to work on this. |
|
@angelrenefm @derekross, a data point for the sleep default here, from my Pixel 7 with Wi-Fi kept loaded across sleep (the opt-in), in case it helps settle it. With Wi-Fi kept loaded, the BCM4389's firmware (20.101.91) sometimes traps as the host resumes it from D3hot, and then answers nothing until the driver stack is reloaded. The firmware console (brcmfmac After it, every query times out ("Timeout on response for query command") and Wi-Fi stays down. Reloading How often it happened depends on how the phone was put to sleep (all with Wi-Fi's PCI wake off, on
My guess is that with So I agree with keeping the 7 Pro's default for the Pixel 7: with Wi-Fi unloaded around sleep, a firmware that traps at resume can't matter, because the driver loads fresh at every wake. Your three cycles match what I see in that mode. For keeping Wi-Fi loaded later, I have two follow-ups locally, not for this PR:
I'll open them separately once this and linux-omarchy-mobile#195 are in. 🤖 Generated with Claude Code |
|
Thanks, @nesmeck, that's a useful number to have on the record. It matches what I'd hope from the default: with Wi-Fi unloaded around sleep, a trap at resume can't leave the phone without Wi-Fi, since the driver loads fresh at each wake. Nothing changes in this PR, then; I'll leave I used AI help (Claude) to work on this. |
|
Thank you, @angelrenefm. Taking cheetah's sleep hook as it is was exactly what I hoped for, and I checked: the script and the link are byte for byte the 7 Pro's, and the test catches a drifted copy. The three suspend cycles with the package really installed close the loop nicely: Wi-Fi unloads, the phone wakes on the alarm, and This is ready. I'll take the conflicts with the camera work myself, as I said. For the record, the resolution needs one line that a plain "keep both" misses: your test's list of allowed boot-time links needs main's At merge I'll set the version to 0.1.10 and use the title "device-panther 0.1.10: Wi-Fi at boot with the Pixel 7 Pro's guarded start, unloaded around suspend". This goes in and gets published before linux-omarchy-mobile#195, so every Pixel 7 has the autoload blacklist before a kernel with the Wi-Fi node reaches it. One small thing, nothing to do now: the README row says Wi-Fi kept loaded across suspend hasn't run on a Pixel 7. After nesmeck's report it has, with the occasional firmware trap on resume, so that line can change when his follow-ups land. |
…tart, unloaded around suspend (#419) (#475) The Pixel 7's Wi-Fi (BCM4389 on PCIe) starts at boot through the Pixel 7 Pro's guarded start: the PCIe controller, then brcmfmac, behind a hang marker, with the modules blacklisted for autoload and the unit run only when the DTB enables the controller. The link gets the bootloader's MAC before NetworkManager takes it. The Pixel 7 Pro's sleep hook, copied byte for byte, unloads Wi-Fi around suspend unless /etc/omamobile/wifi-keep-across-sleep exists. Three attended suspend cycles with the package installed all woke and reconnected. Merged onto main with the conflicts against the camera work (#443) resolved; the test's list of boot-time links also takes omamobile-camera.timer. Co-Authored-By: Ángel René <17342133+angelrenefm@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged through #475 (device-panther 0.1.10), with the conflicts against the camera work resolved as promised and you credited as co-author. Thank you, @angelrenefm! linux-omarchy-mobile#195 can go in once this is published in tomorrow's development build. |
…tart, unloaded around suspend (derekross#419) (derekross#475) The Pixel 7's Wi-Fi (BCM4389 on PCIe) starts at boot through the Pixel 7 Pro's guarded start: the PCIe controller, then brcmfmac, behind a hang marker, with the modules blacklisted for autoload and the unit run only when the DTB enables the controller. The link gets the bootloader's MAC before NetworkManager takes it. The Pixel 7 Pro's sleep hook, copied byte for byte, unloads Wi-Fi around suspend unless /etc/omamobile/wifi-keep-across-sleep exists. Three attended suspend cycles with the package installed all woke and reconnected. Merged onto main with the conflicts against the camera work (derekross#443) resolved; the test's list of boot-time links also takes omamobile-camera.timer. Co-Authored-By: Ángel René <17342133+angelrenefm@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package side of Wi-Fi for the Pixel 7, to merge with or before the kernel PR that enables it (derekross/linux-omarchy-mobile#195). As asked on #342, it is separate from the kernel change, and Bluetooth's files are left to nesmeck's device-panther update, as he proposed there.
The five files are the Pixel 7 Pro's, byte for byte (the test compares them with cheetah's):
omamobile-wifi-start(PCIe controller, thenbrcmfmac, behind its hang marker) with its unit, enabled formulti-user.target;omamobile-wlan-macwith its udev rule (the MAC address the bootloader writes into the device tree); and the modprobe drop-in that blacklistspcie_gs201andbrcmfmacfor autoload. The unit only runs when the DTB enables the PCIe controller, so on today's panther kernel it skips itself.test/all's rule "starts nothing that drives hardware" becomes "starts only the USB rescue and the guarded Wi-Fi", and still fails on any other unit (boot-success, the charger, the AoC, a camera). The package version is left for you to set.Tested on a second Pixel 7 with the same files installed by hand (same sha256 as this package's), on kernels with the Wi-Fi nodes and linux-omarchy-mobile#181's series under them (details in the commit): with the unit enabled, it brought
wlp1s0up about 5 s into boot and it connected. After s2idle tests that unloaded Wi-Fi,omamobile-wifi-start --retrybroughtwlp1s0back and it reconnected.Checks:
packages/omamobile-device-panther/test/all(17 ok),tools/pr-check origin/main.Not tested: a kernel with the Wi-Fi nodes alone (the ones above also had the Bluetooth nodes); installing it with pacman (only the same files by hand); power use; s2idle with Wi-Fi loaded; cheetah's sleep hook that unloads Wi-Fi around s2idle is not in this PR.
I used AI help (Claude) to work on this.