# No WiFi and interface name change after update

## Its Not Okay

I'd had my wifi working without any issues for over a year but after an update and a reboot, my laptop wifi stopped working. Prior my wifi interface was named wlp2s0, now it's wlan0. I'm not running dhcpd or wpa_supplicant. I only use nmcli.

make.conf: http://sprunge.us/Zvc0na

ifconfig -a: http://sprunge.us/omsqHC[/code]

uname -a: 

```
Linux asus-g14 5.19.1-gentoo-x86_64 #2 SMP PREEMPT_DYNAMIC Mon Aug 15 00:35:03 EDT 2022 x86_64 AMD Ryzen 9 4900HS with Radeon Graphics AuthenticAMD GNU/Linux
```

dmesg | grep -i -E 'xx:xx.x|wlan|iwl|80211':

```
[    0.867443] cfg80211: Loading compiled-in X.509 certificates for regulatory database

[    0.868458] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'

[    0.868526] cfg80211: failed to load regulatory.db

[   16.009152] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)

[   16.121015] Loading firmware: iwlwifi-cc-a0-72.ucode

[   16.122972] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-cc-a0-72.ucode failed with error -2

[   16.122991] Loading firmware: iwlwifi-cc-a0-71.ucode

[   16.126390] iwlwifi 0000:02:00.0: api flags index 2 larger than supported by driver

[   16.126428] iwlwifi 0000:02:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37

[   16.127564] Loading firmware: iwl-debug-yoyo.bin

[   16.127634] iwlwifi 0000:02:00.0: loaded firmware version 71.058653f6.0 cc-a0-71.ucode op_mode iwlmvm

[   16.765437] iwlwifi 0000:02:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340

[   16.893287] iwlwifi 0000:02:00.0: Detected RF HR B3, rfid=0x10a100

[   16.959330] iwlwifi 0000:02:00.0: base HW address: c8:e2:65:08:85:b8

[ 1016.072690] Loading firmware: iwlwifi-cc-a0-72.ucode

[ 1016.072737] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-cc-a0-72.ucode failed with error -2

[ 1016.072749] Loading firmware: iwlwifi-cc-a0-71.ucode

[ 1016.073414] iwlwifi 0000:02:00.0: api flags index 2 larger than supported by driver

[ 1016.073442] iwlwifi 0000:02:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37

[ 1016.073837] Loading firmware: iwl-debug-yoyo.bin

[ 1016.073854] iwlwifi 0000:02:00.0: loaded firmware version 71.058653f6.0 cc-a0-71.ucode op_mode iwlmvm

[ 1016.080024] iwlmvm: unknown parameter 'iwlwifi' ignored

[ 1016.080514] iwlwifi 0000:02:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340

[ 1016.201964] iwlwifi 0000:02:00.0: Detected RF HR B3, rfid=0x10a100

[ 1016.267687] iwlwifi 0000:02:00.0: base HW address: c8:e2:65:08:85:b8
```

doas lspci -nnkv | sed -n '/Network/,/^$/p':

```
02:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a)

        Subsystem: Intel Corporation Wi-Fi 6 AX200NGW [8086:0084]

        Flags: bus master, fast devsel, latency 0, IRQ 79, IOMMU group 9

        Memory at fc800000 (64-bit, non-prefetchable) [size=16K]

        Capabilities: [c8] Power Management version 3

        Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+

        Capabilities: [40] Express Endpoint, MSI 00

        Capabilities: [80] MSI-X: Enable+ Count=16 Masked-

        Capabilities: [100] Advanced Error Reporting

        Capabilities: [14c] Latency Tolerance Reporting

        Capabilities: [154] L1 PM Substates

        Kernel driver in use: iwlwifi

        Kernel modules: iwlwifi
```

rfkill list:

```
0: hci0: Bluetooth

        Soft blocked: yes

        Hard blocked: no

2: phy1: Wireless LAN

        Soft blocked: no

        Hard blocked: no
```

NetworkManager emerge:

```
[ebuild   R    ] net-misc/networkmanager-1.38.4::gentoo  USE="(audit) bluetooth concheck elogind gtk-doc introspection iwd modemmanager nss policykit ppp resolvconf (selinux) tools wext wifi -connection-sharing -debug -dhclient -dhcpcd -gnutls -iptables -libedit -lto -nftables -ofono -ovs -psl -syslog -systemd -teamd -test -vala" ABI_X86="(64) -32 (-x32)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
```

----------

## alamahant

I dont know why the rename happened.

It is usually a result of

net.ifnames=0

kernel parameter.

But you can try

```

nmcli con show

nmcli con mod <wifi-connection-from-above-command> ifname wlan0

nmcli con up <wifi-connection-from-above-command>

```

----------

## Its Not Okay

 *alamahant wrote:*   

> I dont know why the rename happened.
> 
> It is usually a result of
> 
> net.ifnames=0
> ...

 

I did that and get: Error: Connection activation failed: No suitable device found for this connection (device enp4s0f3u1u1 not available because profile is not compatible with device (mismatching interface name)).

ifconfig alone just shows:

```
enp4s0f3u1u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.10.12  netmask 255.255.255.0  broadcast 192.168.10.255

        inet6 fe80::717e:3bd9:4517:9c06  prefixlen 64  scopeid 0x20<link>

        ether 00:0e:c6:ca:3c:39  txqueuelen 1000  (Ethernet)

        RX packets 244968  bytes 241028840 (229.8 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 150766  bytes 21877263 (20.8 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 164  bytes 18485 (18.0 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 164  bytes 18485 (18.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

ifconfig -a shows:

```
dummy0: flags=130<BROADCAST,NOARP>  mtu 1500

        ether 36:3a:ec:e3:a0:c9  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp4s0f3u1u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.10.12  netmask 255.255.255.0  broadcast 192.168.10.255

        inet6 fe80::717e:3bd9:4517:9c06  prefixlen 64  scopeid 0x20<link>

        ether 00:0e:c6:ca:3c:39  txqueuelen 1000  (Ethernet)

        RX packets 246166  bytes 241565718 (230.3 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 151938  bytes 22022232 (21.0 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 164  bytes 18485 (18.0 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 164  bytes 18485 (18.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480

        sit  txqueuelen 1000  (IPv6-in-IPv4)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500

        ether c8:e2:65:08:85:b8  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

It seems like wlan0 or previously wlp2s0 is not being recognized by nmcli despite the kernel modules being loaded as shown in the lspci

----------

## Its Not Okay

 *alamahant wrote:*   

> I dont know why the rename happened.
> 
> It is usually a result of
> 
> net.ifnames=0
> ...

 

/etc/default/grub hasn't been changed since I installed Gentoo and this issue only started a week ago, I have that setting commented out:

```
  29   | # Boot with network interface renaming disabled

  30   | # GRUB_CMDLINE_LINUX="net.ifnames=0"
```

----------

## alamahant

 *Quote:*   

> 
> 
> I did that and get: Error: Connection activation failed: No suitable device found for this connection (device enp4s0f3u1u1 not available because profile is not compatible with device (mismatching interface name)).
> 
> 

 

You tried to edit the wrong connection.

enp4s0f3u1u1 is ethernet NOT wifi.

Plz post your

```

nmcli con show

```

Something really strange is going on :

You have wifi renamed to wlan0

BUT

ethernet retained its ugly long name.

Plz

Activate 

net.ifnames=0

reboot and retry.

----------

## Its Not Okay

 *alamahant wrote:*   

>  *Quote:*   
> 
> I did that and get: Error: Connection activation failed: No suitable device found for this connection (device enp4s0f3u1u1 not available because profile is not compatible with device (mismatching interface name)).
> 
>  
> ...

 

nmcli output:

```
NAME                                  UUID                                  TYPE       DEVICE

Wired connection 1                    f8d189cc-4b6c-31d0-b0b9-cbcba89e64f2  ethernet   enp4s0f3u1u1

homewifi                              b234f20c-9edc-425a-99a7-5fc803c6f2fb  wifi       --

wg0                                   6a145759-dccb-4e8b-b220-5f0078d7effb  wireguard  --
```

command followed:

```
nmcli con mod homewifi ifname wlan0

nmcli con up homewifi
```

output:  *Quote:*   

> Error: Connection activation failed: No suitable device found for this connection (device enp4s0f3u1u1 not available because profile is not compatible with device (mismatching interface name)).

 

doas cat /etc/NetworkManager/system-connections/homewifi.nmconnection

```
[connection]

id=homewifi

uuid=b234f20c-9edc-425a-99a7-5fc803c6f2fb

type=wifi

interface-name=wlan0

timestamp=1660376125

[wifi]

mode=infrastructure

ssid=homewifi
```

----------

## alamahant

Ok your wifi iface is not recognized.

Probably kernel or lfirmware related.

How did you create the wifi connection?

Via nmcli or GUI

Try

```

nmcli con del homewifi

```

and recreate a wifi connection.

Also try

```

rfkill list

```

and check if wifi is blocked.

Anything in dmesg wifi-related?

Also try

```

ip link set wlan0 up

iw dev wlan0 scan 

```

is wlan0 functional?

----------

## Its Not Okay

 *alamahant wrote:*   

> Ok your wifi iface is not recognized.
> 
> Probably kernel or lfirmware related.
> 
> How did you create the wifi connection?
> ...

 

I created the wifi connection with nmcli (haven't had any issues with it up until last week I think was working for over a year perfectly before that)

rfkill list:

```
0: phy0: Wireless LAN

        Soft blocked: no

        Hard blocked: no

1: hci0: Bluetooth

        Soft blocked: no

        Hard blocked: no
```

I don't have iw installed and  *Quote:*   

> ip link set wlan0 up

  does nothing.

ip a still shows:

```
wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000

    link/ether c8:e2:65:08:85:b8 brd ff:ff:ff:ff:ff:ff
```

----------

## Its Not Okay

nmcli dev wifi rescan:  *Quote:*   

> Error: Scanning not allowed while unavailable.

 

nmcli dev wifi connect homewifi: 

```
Error: No network with SSID 'homewifi' found.
```

----------

## jburns

Networkmanager recently changed the default from  wpa_supplicant to iwd.  Iwd changes the device name.

----------

## alamahant

 *Quote:*   

> 
> 
> I created the wifi connection with nmcli (haven't had any issues with it up until last week I think was working for over a year perfectly before that)
> 
> 

 

Apparently now you do.

 *jburns wrote:*   

> 
> 
> Networkmanager recently changed the default from wpa_supplicant to iwd. Iwd changes the device name.
> 
> 

 

Plz try either of the two 

1.Delete and recreate the wifi connection

2.Build networkmanager with USE="-iwd".If it works make it permanent via package.use.

```

I don't have iw installed and

Quote:

ip link set wlan0 up

does nothing.

```

Plz be willing to emerge

```

net-wireless/iw

```

and run

```

ip link set wlan0 up

iw dev wlan0 scan

```

Lets ascertain wlan0 is functional

If you prefer to not use iw try

```

nmcli radio wifi on

nmcli dev wifi list

```

----------

## Its Not Okay

 *alamahant wrote:*   

>  *Quote:*   
> 
> I created the wifi connection with nmcli (haven't had any issues with it up until last week I think was working for over a year perfectly before that)
> 
>  
> ...

 

output from doas iw dev wlan0 scan: http://sprunge.us/mkvWfa

----------

## alamahant

Ok so your wlan0 is functional.

Now plz delete and recreate the NM wifi connection.

```

nmcli con del homewifi

nmcli con add con-name homewifi ifname wlan0 type wifi ssid homewifi

nmcli con modify homewifi wifi-sec.key-mgmt wpa-psk

nmcli con modify homewifi wifi-sec.psk <password>

nmcli con up homewifi

```

This is dhcp setup.if you prefer static IP let me know.

If this works and to avoid further future disappointments plz use

```

net.ifnames=0

```

as a grub kernel parameter.

Of course in such case you will need to modify your ethernet connection also.

----------

## Its Not Okay

 *alamahant wrote:*   

> Ok so your wlan0 is functional.
> 
> Now plz delete and recreate the NM wifi connection.
> 
> ```
> ...

 

I deleted and recreated the NM wifi connection but get this message: 

```
Error: Connection activation failed: No suitable device found for this connection (device wlan0 not available because device is not available).
```

Wnen I do nmcli device this is what shows:

```
DEVICE  TYPE      STATE        CONNECTION

eth0    ethernet  connected    Wired connection 1

wlan0   wifi      unavailable  --

dummy0  dummy     unmanaged    --

sit0    iptunnel  unmanaged    --

lo      loopback  unmanaged    --
```

----------

## alamahant

Ok it seems  NM is the problem.

Since you had no indications in dmesg and you were able to scan with "iw" it seems indeed NM is the problem

Plz try another version and/or open a bug report.

The following will let you know which wifi driver you use

```

lspci -nkk | grep -A3 $(lspci | grep -i wireless | awk '{ print $1 }') 

```

Can you plz post the output

----------

## Its Not Okay

 *alamahant wrote:*   

> Ok it seems  NM is the problem.
> 
> Since you had no indications in dmesg and you were able to scan with "iw" it seems indeed NM is the problem
> 
> Plz try another version and/or open a bug report.

 

Downgrading to 1.38.2 fixed the issue.

----------

## alamahant

Plz open a bug report.

----------

## pigeon768

set 

```
USE=-iwd
```

NetworkManager has changed its default from using wpa_supplicant to configure wifi to using iwd to configure wifi, and iwd ... just doesn't work I guess.

There's a bug report about it on bugzilla, but the responses seem to be more concerned with adding a news item that the default has changed, but doesn't seem to want to talk about fixing iwd. I dunno.

----------

## logrusx

 *alamahant wrote:*   

> Plz open a bug report.

 

That's not necessary.

 *pigeon768 wrote:*   

> set 
> 
> ```
> USE=-iwd
> ```
> ...

 

That's not necessary either as far as it's not related.

Udev is responsible for interface names. It has not been renamed to wlan0. It just hasn't been renamed to whatever the rules udev follows tell it to.

You won't find anything in any nmcli or even dmesg. Dmesg will only contain something *if* there was a rename, like:

```
kernel: iwlwifi 0000:04:00.0 wlp4s0: renamed from wlan0
```

There wasn't, that's why you have it as wlan0. Wired interfaces are ethX without udev taking care of them. Udev does that because sometimes interface names change depending on which driver loaded first and cause a mess. Udev takes care you have consistent interface names across reboots.

Check in /var/log/emerge.log if uder update occurred. Try reemerging it.

I'd recommend seeking help in #gentoo at Libera.chat. It's much faster and easier and you won't get into unnecessary stuff.

Regards,

Georgi

----------

## jburns

See the Interface management section in https://wiki.gentoo.org/wiki/Iwd, it gives what to change to prevent the device name change.

----------

## logrusx

 *jburns wrote:*   

> See the Interface management section in https://wiki.gentoo.org/wiki/Iwd, it gives what to change to prevent the device name change.

 

So after all something is messing with udev.

But from this becomes clear that the OP is using testing packages, because I just synced and updated world and NM still has iwd disabled by default.

So the solution is:

 *Iwd Wiki Page wrote:*   

> configuring setting UseDefaultInterface to true in /etc/iwd/main.conf

 

EDIT: Or as I continue to read about it, from the client perspective nothing has changed except if IWD is stopped. So maybe it needs to be enabled in OpenRC or Systemd and everything will work automatically.

EDIT2: I migrated and the only problem is that it didn't want to connect automatically. I needed to forget the old wireless networks and connect anew. I guess iwd won't work with wireless connections setup by wpa_supplicant.

EDIT3: as properly pointed out below, wpa_supplicant must be disabled. However with iwd my wifi only works in g modes.

Regards,

GeorgiLast edited by logrusx on Wed Aug 17, 2022 3:42 pm; edited 2 times in total

----------

## alamahant

 *logrusx wrote:*   

> 
> 
> Udev is responsible for interface names. It has not been renamed to wlan0. It just hasn't been renamed to whatever the rules udev follows tell it to.
> 
> You won't find anything in any nmcli or even dmesg. Dmesg will only contain something *if* there was a rename, like:
> ...

 

Still the OP changed ifname to wlan0 in nmcli invocation.

Still no wlan0 visible.

Apparently in the case of "iwd" it needs to be enabled whereas "wpa_supplicant" needs to be disabled or you will have a race condition.

Apparently NM know when to use it without the need to have it enabled by the user.

NM using iwd and causing havoc is rather irresponsible

----------

## logrusx

 *alamahant wrote:*   

>  *logrusx wrote:*   
> 
> Udev is responsible for interface names. It has not been renamed to wlan0. It just hasn't been renamed to whatever the rules udev follows tell it to.
> 
> You won't find anything in any nmcli or even dmesg. Dmesg will only contain something *if* there was a rename, like:
> ...

 

I wrote most of that before knowing iwd did its own interface management. Still nmcli and interface renaming is not going anywhere. Assuming what the issue is without confirming it is a sure way of unecessary trouble.

Neither wpa_supplicant, nor NM, nor iwd are to blame here. This is a question of proper migration. NM 1.38.4 is still marked testing for a reason.

Regards,

Georgi

----------

## alamahant

 *logrusx wrote:*   

> 
> 
> Neither wpa_supplicant, nor NM, nor iwd are to blame here. This is a question of proper migration. NM 1.38.4 is still marked testing for a reason.
> 
> 

 

Thats why it is good if the OP opened a bug report.

----------

## logrusx

 *alamahant wrote:*   

>  *logrusx wrote:*   
> 
> Neither wpa_supplicant, nor NM, nor iwd are to blame here. This is a question of proper migration. NM 1.38.4 is still marked testing for a reason.
> 
>  
> ...

 

That is a bad suggestion unless you want to volunteer in bug processing.

In the mean time I'm migrating back to NM 1.38.2 and wpa_supplicant as 1.38.4 and iwd is still not good for use as evident.

----------

## pigeon768

 *logrusx wrote:*   

> In the mean time I'm migrating back to NM 1.38.2 and wpa_supplicant as 1.38.4 and iwd is still not good for use as evident.

  nm 1.38.4 is fine, it's just that the default has switched from wpa_supplicant to iwd, and iwd is broken. It's fine to simply set USE=-iwd and use nm 1.38.4.

----------

## logrusx

 *pigeon768 wrote:*   

>  *logrusx wrote:*   In the mean time I'm migrating back to NM 1.38.2 and wpa_supplicant as 1.38.4 and iwd is still not good for use as evident.  nm 1.38.4 is fine, it's just that the default has switched from wpa_supplicant to iwd, and iwd is broken. It's fine to simply set USE=-iwd and use nm 1.38.4.

 

Yes, this is what I eventually did, although there was no good reason to update to 1.38.4.

Regards,

Georgi

----------

