LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

Hacks & Builds

His Nokia 6.1's WiFi Died on Linux Because the Modem Couldn't See 8 MB of Memory. Three Lines of Devicetree Fixed It.

Comparing the stalled handset against a working Motorola Moto X4 exposed a silent permissions fault in Qualcomm's remote processor loader and turned an eight-year-old spare phone into a homelab k3s node.

Illustrated Chris in glasses and a plaid shirt smiles and points a stylus at a black Nokia smartphone on a desk stand whose screen shows the Linux penguin, with Wi-Fi arcs above it, a small server rack behind it and a chip on the desk.
Illustration: LockerGnome

Every time Orel Fichman booted postmarketOS on his 2018 Nokia 6.1, the modem woke up, registered its services, read its calibration storage, and dropped dead 150 milliseconds later. The Linux kernel offered a single unhelpful epitaph: qcom-q6v5-mss 4080000.remoteproc: fatal error without message. No stack trace, no firmware dump, just a shrug, “as if it was embarrassed,” Fichman wrote. Because the phone’s WCN3990 chip loads WiFi firmware through the modem subsystem, a dead modem left the handset offline. As Fichman put it, “a phone without WiFi is just a very small, very sad computer.”

The postmarketOS wiki already marked WiFi, Bluetooth, and the modem broken on nokia-pl2, the Snapdragon 630 handset built by FIH. Fichman still worked through the usual hardware suspects first: clocks and RPM proxy votes, SMMU and XPU faults, TrustZone violation counters, shared memory exhaustion, hardware mutexes, EFS contents, and the IPA network accelerator. That slog turned up two unrelated bugs—a missing clock in the SDM660 clock driver and an error code mismatch in rmtfs—while the modem kept dying on schedule (nothing says weekend relaxation like staring at TrustZone counters).

Two comparisons cracked the case. A Motorola Moto X4 running the same Snapdragon 630 chip and the same mainline kernel had working WiFi, and stock Android on this exact Nokia 6.1 connected without a hiccup. Decoding the modem firmware’s log-string database exposed a vendor module from FIH called fih_nv.c that backs up and restores NV data through RAM right after EFS mounts. To watch the stock Android kernel work without wiping his phone, Fichman RAM-booted it into a tiny busybox initramfs and renamed the init arguments so Android could never touch user data (“I like my phone’s data where it is, thanks”).

One line in the stock kernel’s dmesg gave away the whole secret: Assign modem memory 0xac000000 0x800000 (initial). Before starting the modem, Android reassigned an 8 MB memory region at 0xac000000 where the bootloader drops FIH’s RF calibration partitions so Linux and the modem could both read it. Mainline Linux skipped that step, so fih_nv.c stepped into restricted memory, hit a silent permissions fault, and took the entire modem down. Adding three properties—compatible, qcom,client-id, and qcom,vmid—to the existing fih_nv@AC000000 devicetree node solved it without touching a single driver. “After all that staring at hex dumps, the fix was three lines,” Fichman wrote. Pair that with ath10k firmware, a board file, and a systemd drop-in starting diag-router and tqftpserv ahead of rmtfs so the modem avoids a Task starvation: diag crash, and wlan0 grabbed a DHCP lease.

Victory lasted right up until Fichman disconnected from WiFi. Dropping a network immediately tripped err_qdi.c:459:EX:wlan_process and dragged the modem down again. “So you could connect, but never leave. Like a hotel California of WiFi,” he wrote. Talk about a rough breakup—the radio literally couldn’t handle being told it was over. Inside ath10k_bss_disassoc(), the Linux driver tore down the virtual interface (vdev) first and reset the TXBF beamforming parameter second, which this firmware refuses to tolerate on a downed interface. Swapping those two lines stopped the crashes across repeated reconnects and radio toggles. The devicetree patch is now merged in sdm660-mainline/linux#273, while the two-line ath10k reorder is sitting on the linux-wireless and ath10k mailing lists waiting for review.

Handset makers love pitching sustainability while shipping bootloaders and vendor blobs that quietly sabotage any OS shipped after Android updates stop (funny how the green brochure never mentions 0xac000000). As more operators repurpose retired phones into low-power k3s nodes, sensors, and edge boxes, expect more of these microscopic fixes to carry outsized weight. The hardware inside a 2018 midrange phone still has years of useful compute left; the real shelf life is usually locked behind a handful of undocumented kernel assumptions waiting for someone stubborn enough to read dmesg twice.

Now this k3s node can finally check out.

More Hacks & Builds

Every Hacks & Builds story →