[OnePlus 7 Pro Guides, News, & Discussion] cd993:
** SEE THE EBD OF THIS POST FOR A WORKAROUND! **

Hey all,

I'm bringing the discussion from across a few custom rom threads (Havoc etc.) in to one place to hopefully work towards finding a solution. The issue being on custom roms, some users (myself included) experience Wifi disconnecting/reconnecting when the signal is low - when in the same environment, this does not occur on stock OOS. For example, when I'm in my bedroom, on Havoc for example the signal shows itself to be low but will periodically disconnect/reconnect, despite still actually having a connection, albeit weak. As mentioned, this does not occur on stock.

What I've tried/things to consider:

- It was mentioned that someone who flashed he global rom (I'm on EU) didn't experience this issue. However after a full clean flash I unfortunately encountered the same issue. In hindsight, I didn't boot the rom in to OOS before flashing Havoc, would that make a difference? I wouldn't have thought so though.

- The Magisk module Wifi Bonding, which was thought to perhaps help, didn't make a difference

- The dev (@SKULLSHADY) informed me that Havoc has the Wifi config from OOS, so that unfortunately can't be a solution

- Toggling Wifi scan throttling in developer settings made no difference. Though on this point, it's almost like the custom rom - annoyingly only for some users - is detecting a weak connection and switching to mobile data, despite still having a connection. Like it's got a threshold of what signal strength should be, realises it hasn't, cuts it off but then reconnects.

I've attached a log of when the issue occurs. I'm no expert and don't have a clue what to look for (perhaps someone else does?) but one thing I noticed was this bit upon the disconnection:

04-02 17:43:06.429 I/BugleRcsEngine(6806): [383] uzw.d: Connected state: [1], networkType: [WIFI] 04-02 17:43:06.954 I/WifiHAL (1046): event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xd 04-02 17:43:08.958 I/WifiHAL (1046): event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xd 04-02 17:43:10.968 I/WifiHAL (1046): event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xd 04-02 17:43:13.362 I/WifiHAL (1046): event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xd 04-02 17:43:13.990 D/ConnectivityService(1667): Lingering NetworkAgentInfo [WIFI () - 150] for 30000ms 04-02 17:43:13.993 D/ConnectivityService(1667): Sending DISCONNECTED broadcast for type 1 NetworkAgentInfo [WIFI () - 150] isDefaultNetwork=true 04-02 17:43:18.604 D/QCNEJ/WlanStaInfoRelay(2492): Received action: android.net.wifi.RSSI_CHANGED

So with my absolute amateur analytical observation here, I note the below as perhaps relevant to the disconnection:

"android.net.wifi.RSSI_CHANGED"

After Googling this, I came across the following Reddit page:

[url]https://amp.reddit.com/r/tasker/comments/ccezew/intent_received_context_no_longer_working/[/URL]

They talk of "signal strength verification" - which perhaps is what's going on here as in when further away from the router, something is going and resulting on WiFi disconnecting/reconnecting just because the signal is low, despite still having signal. However, this may or may not be of relevance - I don't have a clue! Lol

There's also this:

D/ConnectivityService(1667): Switching to new default network

Though unsure why its disconnecting in the first place...

So in my humble summary, its like something at some level is monitoring signal strength and disconnecting/reconnecting as the result. But I could be completely wrong. I recall it mainly doing so when further from the router but I'm sure it had a couple times too when very close to it.

I just really wanna solve this issue and seemingly if we can, it could possibly fix it for all custom roms that face this WiFi issue.

Any help would be greatly appreciated!

UPDATE: This issue seemingly is NOT present on the new CarbonROM!!! So whatever the difference is in terms of settings or source code, this rom does no suffer with the Wifi drop out issue!!

WORK AROUND :

Just wanted to update that I'm nicely settled in Havoc now. A workaround was found that when mobile data is disabled, the WiFi doesn't disconnect!

Therefore you can either manually toggle this, or I'm using Macrodroid to automate mobile data enabling upon WiFi disconnect and disable up on WiFi reconnect, via a Macro. I've even used The Data Disabled Icon in Havoc to hide the fact that mobile data is disabled, as that little cross in the icon was bugging me lol

I did test without disabling data for a while yesterday and whilst it did still cut out every now and then, it really is only when signal was quite low. Still though, I'm really liking this workaround as I'd manually toggle WiFi anyway when at home or leaving, so in ways, this workaround is perfect and doesn't present an issue, as such, to me any more.