[SOLVED] Ubuntu WiFi sometimes fails to come back after waking from sleep

I have Framework Laptop 12 running Ubuntu. Occasionally when I wake it up after it goes to sleep my WiFi connection doesn’t come back up. Instead, NetworkManager keeps trying to connect and tells me every 30 seconds ago “network activation failed.”

I looked at the wpa_supplicant logs and this is the relevant section with errors:

May 12 09:09:02 framework1l wpa_supplicant[1861]: wlp166s0: CTRL-EVENT-DISCONNECTED bssid=d8:47:32:db:02:4e reason=3 locally_generated=1
May 12 09:09:02 framework1l wpa_supplicant[1861]: wlp166s0: CTRL-EVENT-DSCP-POLICY clear_all
May 12 09:09:02 framework1l wpa_supplicant[1861]: p2p-dev-wlp166s: CTRL-EVENT-DSCP-POLICY clear_all
May 12 09:09:02 framework1l wpa_supplicant[1861]: p2p-dev-wlp166s: CTRL-EVENT-DSCP-POLICY clear_all
May 12 09:09:02 framework1l wpa_supplicant[1861]: nl80211: deinit ifname=p2p-dev-wlp166s disabled_11b_rates=0
May 12 09:09:02 framework1l wpa_supplicant[1861]: wlp166s0: Do not deauthenticate as part of interface deinit since WoWLAN is enabled
May 12 09:09:03 framework1l wpa_supplicant[1861]: wlp166s0: CTRL-EVENT-DSCP-POLICY clear_all
May 12 09:09:03 framework1l wpa_supplicant[1861]: nl80211: deinit ifname=wlp166s0 disabled_11b_rates=0
May 12 09:09:03 framework1l wpa_supplicant[1861]: wlp166s0: Reject scan trigger since one is already pending
May 12 09:09:09 framework1l wpa_supplicant[1861]: wlp166s0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=WORLD
May 12 09:09:09 framework1l wpa_supplicant[1861]: p2p-dev-wlp166s: CTRL-EVENT-DSCP-POLICY clear_all
May 12 09:09:09 framework1l wpa_supplicant[1861]: p2p-dev-wlp166s: CTRL-EVENT-DSCP-POLICY clear_all
May 12 09:09:09 framework1l wpa_supplicant[1861]: nl80211: deinit ifname=p2p-dev-wlp166s disabled_11b_rates=0
May 12 09:09:09 framework1l wpa_supplicant[1861]: wlp166s0: Do not deauthenticate as part of interface deinit since WoWLAN is enabled
May 12 09:09:09 framework1l wpa_supplicant[1861]: wlp166s0: CTRL-EVENT-DSCP-POLICY clear_all
May 12 09:09:09 framework1l wpa_supplicant[1861]: nl80211: deinit ifname=wlp166s0 disabled_11b_rates=0
May 12 09:09:09 framework1l wpa_supplicant[1861]: wlp166s0: Reject scan trigger since one is already pending
May 12 09:09:12 framework1l wpa_supplicant[1861]: wlp166s0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=COUNTRY alpha2=US
May 12 09:09:12 framework1l wpa_supplicant[1861]: wlp166s0: WPS-CANCEL
May 12 09:09:12 framework1l wpa_supplicant[1861]: MBO: Disable MBO/OCE due to misbehaving AP not having enabled PMF
May 12 09:09:12 framework1l wpa_supplicant[1861]: wlp166s0: SME: Trying to authenticate with d8:47:32:db:02:4e (SSID='rivimand' freq=5180 MHz)
May 12 09:09:16 framework1l wpa_supplicant[1861]: BSSID d8:47:32:db:02:4e ignore list count incremented to 2, ignoring for 10 seconds
May 12 09:09:16 framework1l wpa_supplicant[1861]: MBO: Disable MBO/OCE due to misbehaving AP not having enabled PMF
May 12 09:09:16 framework1l wpa_supplicant[1861]: wlp166s0: SME: Trying to authenticate with d8:47:32:db:02:4f (SSID='rivimand' freq=2447 MHz)
May 12 09:09:19 framework1l wpa_supplicant[1861]: BSSID d8:47:32:db:02:4f ignore list count incremented to 2, ignoring for 10 seconds
May 12 09:09:20 framework1l wpa_supplicant[1861]: wlp166s0: SME: Trying to authenticate with 78:d2:94:32:ef:d7 (SSID='rivimand' freq=2427 MHz)
May 12 09:09:23 framework1l wpa_supplicant[1861]: BSSID 78:d2:94:32:ef:d7 ignore list count incremented to 2, ignoring for 10 seconds
May 12 09:09:24 framework1l wpa_supplicant[1861]: wlp166s0: SME: Trying to authenticate with 78:d2:94:32:ef:d9 (SSID='rivimand' freq=5765 MHz)
May 12 09:09:27 framework1l wpa_supplicant[1861]: BSSID 78:d2:94:32:ef:d9 ignore list count incremented to 2, ignoring for 10 seconds
May 12 09:09:27 framework1l wpa_supplicant[1861]: wlp166s0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="rivimand" auth_failures=1 duration=10 reason=CONN_FAILED
May 12 09:09:38 framework1l wpa_supplicant[1861]: wlp166s0: Reject scan trigger since one is already pending
May 12 09:09:40 framework1l wpa_supplicant[1861]: wlp166s0: WPS-CANCEL

The only way I’ve found to recover from this is to reboot.

I’m guessing—just a guess—that the WiFi card is in the middle of a scan when I put it to sleep and the driver for this particular WiFi card doesn’t handle this well and gets stuck in the interrupted scan after wake, but that’s just a guess. :person_shrugging:

I don’t recall this ever happening on my ThinkPad X1 Carbon 6th Gen, which I still actively use, so (a) this appears to be something specific to my Framework hardware and (b) this isn’t a new Linux issue because my ThinkPad and Framework are both running the same Linux version (previously Kinetic, now Lunar, both have this issue).

Any suggestions?

Going to assume 22.04 here. Just as I go along below.

I have not experienced this myself, but I also did the following:

  • Followed step 8 in the guide (22.04) or (23.04)
  • Added my wifi card id via lsusb to the denylist if running TLP. (USB section of this guide)
  • Which card model are you working with?
  • Any wifi related kernel parameters in place?
  • MBO: Disable MBO/OCE due to misbehaving AP not having enabled PMF stands out to me. What type of AP are you connecting to?

This sounds relevant. I have had similar problems with my Fedora system before. Turns out the problem was only appearing when I was using an ancient WiFi repeater as access point, which likely had some bug with its communication. Replaced it with a modern one and no problems since.

How the heck do I reply to a previous reply rather than posting a top-level reply to the original posting? I’ve searched all over the UI and I can’t figure out how to reply to a reply. I’m feeling quite stupid. What am I missing?

I’m using 23.04, but this also happened with 22.04.

Yes.

Hadn’t done that before, will add it and see if the problem persists, though it’s intermittent so that will take a while.

AX210

Not as far as I’m aware.

It seems to me that if this were the problem it would also occur on my other laptop and would be less intermittent.

Also, I see this in the logs regularly when everything is working, not just when this problem occurs.

In any case, I don’t know which of my two AP’s the laptop was connected to the most recent time this happens, but they are a TP-Link AX6000 in router mode and a Netgear R9000 in AP mode, both running current firmware.

If you’re using TLP as described in our guide, you’ll definitely need to do this.

Are these two AP near one another or just two AP which you connect to in general, that happen to be in different locales? Ideally, not competing over one another.

1 Like

Two APs in my house, same SSID, one in basement one in attic, configured to use widely different channels so they don’t conflict.

Okay good, yes, on different channels you’d be fine.

Something Jonathan_Haas said strikes me as it also mirrors the error with MBO I mentioned previously (usually with older APs).

This along with me being unable to replicate it with my own 12th gen Framework on Ubuntu, leads me to wonder if this is contributing.

An easy way to test this is to temporarily rename the APs SSIDs, then test one at a time - see if the issue continues. If it does, let’s make sure the TLP denylist recommendation is in place and then reboot.

Please try both suggestions and then report back to see what we find.

I’ve done the denylist thing already. I can’t really do the AP test you proposed because this is an intermittent issue I don’t know how to reproduce, it doesn’t happen that often, and the rest of my family is using these APs every day so I can’t just mess around with their names.

Welp… This just happened with my ThinkPad X1 Carbon 6th Gen, so I’m going to go with “Linux bug, not Framework bug.” Sorry for the false alarm.

1 Like

No worries, appreciate the update. Marking solved as it’s duplicating on non-Framework computers.