Thinkpad T14: After lid-close reopening; wifi hangs; fixed by netif restart

Great times using FreeBSD! Go to bed (close laptop).
Open laptop. Can't ping (still have an IP address). Wait, wait. Can't ping, can't DNS Fiddle with wpa_cli. Pray. Curse

Run netif restart. Wait...but....eventually everything comes back.

Using: iwlwifi0.

/var/log/messages does have a lot of diagnostic data, but I'm not sure which of them are actually relevant. I was goin gto ty to isolate which part of netif is the one fixes me, but I was wondering if anyone else has encountered this.
 
Using: iwlwifi0.
This is a Bug 286482 iwlwifi firmware prevents resume? (if_iwlwifi and if_iwx)

It has been fixed on 15.0-CURRENT since 2025-05-28, but wasn't merged into stable/14.


I don't know if merging to the 14 branch is planned, there is no MFC notice in the commit log, also https://cgit.freebsd.org/src/tree/sys/dev/iwx is missing on stable/14.

There is a automatic workaround:

You can also try "down" the interface before suspend, and "up" on resume:
 
Awesome! Thanks for confirming. I was about to build a bleeding edge BE anyhow so this is good timing.
 
This is a Bug 286482 iwlwifi firmware prevents resume? (if_iwlwifi and if_iwx)

It has been fixed on 15.0-CURRENT since 2025-05-28, but wasn't merged into stable/14.


I don't know if merging to the 14 branch is planned, there is no MFC notice in the commit log, also https://cgit.freebsd.org/src/tree/sys/dev/iwx is missing on stable/14.

There is a automatic workaround:

You can also try "down" the interface before suspend, and "up" on resume:
are you sure. I havent tried the tips given yet. my Thinkpad 14s gen 1 is having the issue over and over again. i have to do netif restart ue0 multiple times to get it working.
its even worst that ue0 or wlan0 is not connetcted to the net upon reboot. i have to manually reconfigure to get it working.
btw, i m on 15-CURRENT
 
T-Daemon

Lamentably, after I got 15.0-CURRENT compiled and booted from, this behavior persists.

Code:
$ freebsd-version
15.0-CURRENT
$ uname -a
FreeBSD homebsd 15.0-CURRENT FreeBSD 15.0-CURRENT #0 main-n278204-d86c5811cdb3: Wed Jun 25 17:10:41 EDT 2025     root@homebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
$ tail -10 /var/log/messages
Jun 25 14:47:59 homebsd seatd[3142]: 00:27:30.046 [INFO] [seatd/seat.c:158] No clients on seat0 to activate
Jun 25 14:48:17 homebsd devd[2710]: notify_clients: send() failed; dropping unresponsive client
Jun 25 14:48:17 homebsd syslogd: last message repeated 1 times
Jun 25 14:49:43 homebsd seatd[3142]: 00:29:13.809 [INFO] [seatd/seat.c:158] No clients on seat0 to activate
Jun 25 14:49:44 homebsd devd[2710]: check_clients:  dropping disconnected client
Jun 25 14:49:44 homebsd syslogd: last message repeated 1 times
Jun 25 14:58:04 homebsd kernel: iwlwifi0: linuxkpi_ieee80211_beacon_loss: vif 0xfffffe01135f6f00 vap 0xfffffe01135f6010 state RUN
Jun 25 15:02:33 homebsd wpa_supplicant[426]: wlan0: RSN: Group rekeying completed with fc:34:97:21:af:08 [GTK=CCMP]
Jun 25 15:09:53 homebsd acpi[8136]: suspend at 20250625 15:09:53
Jun 25 22:52:23 homebsd syslogd: Failed to xfer ttymsg nvlist: Resource temporarily unavailable

Penultimate line is the suspend. But when it came back up,
ifconfig wlan0 reported that I was associated and had an ip address. Nevertheless ping time out with no route to host. service netif restart fixed it (and, fwiw seems faster under current!)
 
my Thinkpad 14s gen 1 is having the issue over and over again. i have to do netif restart ue0 multiple times to get it working.
The patch does concern Intel AX20x, AX21x devices (if_iwx(4), not urndis(4) (or ipheth(4)) USB ethernet, tethering devices.

Try workaround
Code:
bkidney@briankidney.ca 2023-08-21 02:29:38 UTC     Comment 27

I have found a workaround for this issue by adding

```
/usr/sbin/service netif stop wlan0
```

to rc.suspend and

```
/usr/sbin/service netif start wlan0
```

to rc.resume.

This is currently working on 14-CURRENT (commit main-n264816-a4aaee2120ce).

If the workaround doesn't have an effect, maybe ask on https://lists.freebsd.org/subscription/freebsd-net.
 
  • Like
Reactions: mro
The patch does concern Intel AX20x, AX21x devices (if_iwx(4), not urndis(4) (or ipheth(4)) USB ethernet, tethering devices.

Try workaround
Code:
bkidney@briankidney.ca 2023-08-21 02:29:38 UTC     Comment 27

I have found a workaround for this issue by adding

```
/usr/sbin/service netif stop wlan0
```

to rc.suspend and

```
/usr/sbin/service netif start wlan0
```

to rc.resume.

This is currently working on 14-CURRENT (commit main-n264816-a4aaee2120ce).

If the workaround doesn't have an effect, maybe ask on https://lists.freebsd.org/subscription/freebsd-net.
Thankx. i will Try That.
 
For me (not associated with this AXE driver afaict), the workaround works fine (no surprise, RC files is something FreeBSD has down solid :) ).

EDIT:

Code:
 $ pciconf -lv iwlwifi0
iwlwifi0@pci0:0:20:3:    class=0x028000 rev=0x20 hdr=0x00 vendor=0x8086 device=0xa0f0 subvendor=0x8086 subdevice=0x0070
    vendor     = 'Intel Corporation'
    device     = 'Wi-Fi 6 AX201'
    class      = network
 
  • Like
Reactions: mro
Have you considered using NETWAIT in /etc/rc.conf ?

Code:
netwait_if="ue0"
netwait_if_timeout="30"

If you are using a USB-type-C jack you might need to go into BIOS and adjust Thunderbolt settings.
This method didn't work either. I dont mind doin doas service netif restart ue0. Thanks anyway.

uname -aKUFreeBSD mrpju 15.0-CURRENT FreeBSD 15.0-CURRENT #45 main-4982db387fc8-dirty: Thu Jul 10 06:15:10 +08 2025 root@mrpju:/usr/obj/usr/src/amd64.amd64/sys/C15 amd64 1500051 1500051

hw.acpi.lid_switch_state=S3 # suspend on lid close
works and upon resume wifi works and ue0 detecs n works.
 
Well I am noticing I forgot the crucial enabler:

netwait_enable="YES"

I am in Wifi testing mode and I seem to have alot of problems with clients DHCP not getting its address so I added netwait for wlan0 and it really helps.
Was experimenting with SYNCDHCP versus DHCP settings and decided to try NETWAIT. That one piece ensures reliable connections for me.
 
Back
Top