iPhone battery drain when connected to wifi

Hi,

I know this might sound strange and all but when my iPhone is connected to my home wifi its battery drains super fast. Starting with 100% charge in the morning, by 7pm it is usually out of battery. While this could of course be iPhone related, I noticed that if I am in a different wifi my iPhone holds its charge for almost two full days. All this of course with about the same usage.

I am running KONG's latest OpenWrt build for 21.02 on a Netgear Nighthawk R7800. I've been a fan of his build since my DD-WRT days. (@KONG if you are reading this: Danke KONG fuer deine tolle Arbeit!)

I really appreciate all the efforts taken in developing OpenWrt and I am loving it. Already donated to the Software Freedom Conservancy a couple times. Such great work! I am not going back to stock firmware. Ever.

It is however annoying to have to recharge the phone during the day.

What is the first thing I could possibly troubleshoot? Syslog doesn't show any crazy activity. Here and there some of these logs, related to my phone:

IEEE 802.11: disconnected due to excessive missing ACKs
AP-STA-DISCONNECTED c2:74:47:41:c6:a7
IEEE 802.11: did not acknowledge authentication response
...
Thu Mar 17 12:44:13 2022 daemon.info hostapd: wlan1: STA <Phone-MAC> IEEE 802.11: authenticated
Thu Mar 17 12:44:13 2022 daemon.info hostapd: wlan1: STA <Phone-MAC> IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Thu Mar 17 12:46:14 2022 daemon.info hostapd: wlan1: STA <Phone-MAC> IEEE 802.11: authenticated
Thu Mar 17 12:46:14 2022 daemon.info hostapd: wlan1: STA <Phone-MAC> IEEE 802.11: associated (aid 6)
Thu Mar 17 12:46:14 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED <Phone-MAC>
Thu Mar 17 12:46:14 2022 daemon.info hostapd: wlan1: STA <Phone-MAC>RADIUS: starting accounting session <session-key>
Thu Mar 17 12:46:14 2022 daemon.info hostapd: wlan1: STA <Phone-MAC> WPA: pairwise key handshake completed (RSN)

...after these logs were captured around noon today, nothing else was logged with my phone's mac.

Some information regarding my configuration:

  • I removed IPv6 from interface, firewall, etc
  • Added guest network
  • PiHole is added as dhcp option under each interface's advanced setting

I am not quite sure where to start troubleshooting. Any pointers and tips are greatly appreciated. Everything else is working just great. Up- and download speeds are perfect and there is nothing else I can complain about, except the battery drainage. Looking forward to hearing your thoughts :slight_smile:

Thank you very much for taking your time to read through my post!

Try turning off auto connection on the iPhone.

It's a battery killer.

Hi Jim,

Thanks for your reply. Are you referring to the Auto-Join option? I can try and turn it off for my home wifi. I am wondering why it would drain the battery in my home wifi while the battery holds it charge just fine in other wifis.
I am more leaning towards me having something misconfigured haha
…but I am not sure where to start?

Unfortunately I can't fix this as radio firmware is closed source. Current ath10k mainline has ps turned off, see dmesg output:

firmware ver 10.4-3.9.0.2-00131 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps,peer-fixed-rate crc32 23bd9e43

Not sure if ct firmware has it enabled, I don't have a unit running with ct at the moment. Powersave also has its drawbacks, it can cause stalls etc on buggy client devices.

1 Like

Thank you very much @KONG !
I didn’t know this was by design. Very interesting. I’ll try the ct-firmware and I’ll report back.
Should it be enough to install these two:
kmod-ath10k-ct and ath10k-firmware-qca9984-ct?
Or should I replace everything with ath10k-ct firmware?

Again, Thanks a lot for you help! Very much appreciated!

opkg remove ath10k-firmware-qca9984 kmod-ath10k

opkg update && opkg install ath10k-firmware-qca9984-ct kmod-ath10k-ct

1 Like

Thanks @OldNavyGuy! I just gave it a shot but I got these error messages:

root@OpenWrt:~# opkg update && opkg install ath10k-firmware-qca9984-ct kmod-ath1
0k-ct
Downloading https://www.desipro.de/openwrt/repo/21/targets/ipq806x/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/kong_core
Downloading https://www.desipro.de/openwrt/repo/21/targets/ipq806x/generic/packages/Packages.sig
Signature check passed.
Installing ath10k-firmware-qca9984-ct-htt (2020-11-08-1) to root...
Downloading https://www.desipro.de/openwrt/repo/21/targets/ipq806x/generic/packages/ath10k-firmware-qca9984-ct-htt_2020-11-08-1_arm_cortex-a15_neon-vfpv4.ipk
Installing kmod-ath10k-ct (5.4.182+2021-09-22-e6a7d5b5-1) to root...
Downloading https://www.desipro.de/openwrt/repo/21/targets/ipq806x/generic/packages/kmod-ath10k-ct_5.4.182%2b2021-09-22-e6a7d5b5-1_arm_cortex-a15_neon-vfpv4.ipk
Configuring kmod-ath10k-ct.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.182-1-017a6bfd276c608840372d84d99c3ed4) for kmod-cfg80211
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.182-1-017a6bfd276c608840372d84d99c3ed4) for kmod-mac80211
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.182-1-017a6bfd276c608840372d84d99c3ed4) for kmod-ath
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.182-1-017a6bfd276c608840372d84d99c3ed4) for kmod-hwmon-core
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.182-1-017a6bfd276c608840372d84d99c3ed4) for kmod-ath10k-ct
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-ath10k-ct found, but incompatible with the architectures configured
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for ath10k-firmware-qca9984-ct-htt:
 * 	kernel (= 5.4.182-1-017a6bfd276c608840372d84d99c3ed4)
 * opkg_install_cmd: Cannot install package ath10k-firmware-qca9984-ct.

I was stupid enough to not roll back my changes but instead I rebooted the router... Of course the interfaces didn't come back up, so I had to use an ethernet connection to restore the latest KONG firmware. I guess the good thing about that was, that I realized that @KONG had just released a new build. So now I am running KONG's 3/18/22 firmware on my R7800.

@OldNavyGuy I'll give it another shot tomorrow. I am not exactly sure why this failed. It's interesting that ath10k-firmware-qca9984-ct got switched to: ath10k-firmware-qca9984-cth-htt.

These are available for the 21.02.2 release (kernel 5.4.179) -

As is kmod-ath10k-ct.

Looks like his build is now on a newer kernel (5.4.182), so updating to the newest build solved the package dependency issue for the kmod.

Works the same way for snapshot builds.

It's whatever ath10k CT drivers he's included in his build.

Great! Now everything installed smoothly. I should have tried one more time after upgrading to the latest build.

I am now seeing this message in the kernel log:

firmware ver 10.4b-ct-9984-tH-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,htt-mgt-CT,set-special-CT,no-bmiss-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b8ee13f

I am not seeing the no-ps option, so maybe this did the trick. I'll let you guys know :slight_smile:

Thank you @OldNavyGuy and @KONG for your help and tips! :slight_smile:

Switching to ath10k-firmware-qca9984-ct and kmod-ath10k-ct really did the trick for me. No more battery draining on my phone!

Thanks a lot for your help @OldNavyGuy and @KONG :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.