Fedora Server无法启动intel WIFI模块

背景

最近把工作PC上的intel ax200网卡升级到了ax210,余留了一个旧的ax200网卡,索性废物利用把网卡移植到以前攒的X99平台上。

由于以前的X99平台fedora平台都是有线直连上网的,没想过重装操作系统后,会在网卡驱动上栽跟头。

具体表现为通过fedora的live镜像进入系统安装引导页面,能识别到无线网卡并且成功直连上了WIFI,但是进入新安装的机器后,发现机器找不到这张网卡。

root@x-cluster:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp6s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:e0:20:67:31:3e brd ff:ff:ff:ff:ff:ff
    altname enx00e02067313e

使用nmcli进行网卡检查,发现同样的找不到对应的设备。

root@x-cluster:~# nmcli dev status
DEVICE          TYPE      STATE         CONNECTION 
lo              loopback  连接(外部)  lo           
enp6s0          ethernet  不可用        --     
root@x-cluster:~#
root@x-cluster:~# nmcli radio
WIFI-HW  WIFI     WWAN-HW  WWAN
missing  enabled  missing  enabled

查看PCI设备,发现是识别的。

root@x-cluster:~# lspci | grep -i network
03:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a)

查看硬件锁与软件锁信息,发现正常。

root@x-cluster:~# rfkill list all
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: wlan0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

查看内核日志,发现报错。

root@x-cluster:~# dmesg | grep -E "iwlwifi|firmware"
[    9.818321] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-cc-a0-77.ucode failed with error -2
[    9.818334] iwlwifi 0000:03:00.0: no suitable firmware found!
[   10.081271] iwlwifi 0000:03:00.0: minimum version required: iwlwifi-cc-a0-77
[   10.081274] iwlwifi 0000:03:00.0: maximum version supported: iwlwifi-cc-a0-77
[   10.081276] iwlwifi 0000:03:00.0: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
[   10.126781] iwlwifi 0000:03:00.0: Found device firmware: intel/ibt-20-1-3.sfi
[   10.126789] iwlwifi 0000:03:00.0: Found device firmware: intel/ibt-20-1-3.sfi
[   10.126801] Bluetooth: hci0: Waiting for firmware download to complete
root@x-cluster:~#

定位到问题为操作系统intel wireless固件加载失败,内核提示找不到iwlwifi-cc-a0-77.ucode微码文件,通过ls发现文件确实不存在。

解决方案

安卓手机通过USB共享网络的方式,连上机器后,进行iwl驱动的安装。

root@x-cluster:~# dnf install iwlwifi-mvm-firmware -y

重启电脑后,WIFI设备上线。查看内核日志,固件加载正常。

root@x-cluster:~# dmesg | grep -E "virtio|net|firmware"
[    0.813924] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    0.885557] audit: initializing netlink subsys (disabled)
[    1.259398] drop_monitor: Initializing network drop monitor service
[    1.259519] Initializing XFRM netlink socket
[    1.260263] can: controller area network core
[   10.501250] SELinux:  Permission firmware_load in class system not defined in policy.
[   10.504391] SELinux:  policy capability network_peer_controls=1
[   10.504396] SELinux:  policy capability always_check_network=0
[   10.504403] SELinux:  policy capability netlink_xperm=0
[   10.504404] SELinux:  policy capability netif_wildcard=0
[   11.330889] systemd[1]: systemd-boot-clear-sysfail.service - Clear SysFail Entry If The Boot Is Successful skipped, unmet condition check ConditionPathExists=/sys/firmware/efi/efivars/LoaderEntrySysFail-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
[   11.331081] systemd[1]: systemd-hibernate-clear.service - Clear Stale Hibernate Storage Info skipped, unmet condition check ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67
[   11.336669] systemd[1]: Starting systemd-network-generator.service - Generate Network Units from Kernel Command Line...
[   11.349831] systemd[1]: Finished systemd-network-generator.service - Generate Network Units from Kernel Command Line.
[   12.224629] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[   12.267584] Bluetooth: hci0: Found device firmware: intel/ibt-20-1-3.sfi
[   12.274479] iwlwifi 0000:03:00.0: loaded firmware version 77.8dbafb52.0 cc-a0-77.ucode op_mode iwlmvm
[   12.739212] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   14.125495] Bluetooth: hci0: Waiting for firmware download to complete
root@x-cluster:~# 

事后思考确认问题触发的原因是安装的发行版本Fedora Server 默认不会打包大体积的无线微码驱动。