春节假期在家闲来无事,把大学期间使用的华硕笔记本改造成一台家庭服务器。最小化安装 CentOS 7.7 之后出现了无法启动无线网卡的情况,并且奇怪的是在经过一次休眠之后,无线网卡就会恢复启动。

启动系统之后:

[root@asus ~]# rfkill list
0: asus-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: asus-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
2: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes

输出信息显示 phy0 hard blockedhard blocked 是硬件层关闭了设备,无法通过 rfkill unblock all 方式解决。

组合键 fn + f1 休眠并唤醒之后:

[root@asus ~]# rfkill list
0: asus-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: asus-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
2: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

可以看到,这是网卡已被激活了。每次启动系统之后需要经过一次休眠唤醒的过程无线网卡才能正常启动,这显然很麻烦。但经过网上一番查阅资料都无法解决,包括恢复 BIOS 的设置等,并且 fn + f2 组合键开启 wifi 在新装的 CentOS 下不再起作用。

最后在这里找到了解决方案:

echo "options asus_nb_wmi wapf=4" > /etc/modprobe.d/asus.conf

在 /etc/modprobe.d/ 下创建一个配置文件,内容为 options asus_nb_wmi wapf=4,然后 reboot 重启就可以了。

具体什么原理还不是很清楚,希望知道的朋友可以留言告诉,也希望这篇文章在以后可以帮助一些人。


以下是我的电脑系统信息,作为参考:

网络设备:

[root@asus ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp4s0f2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether ac:22:0b:17:7f:c2 brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 24:fd:52:c5:93:05 brd ff:ff:ff:ff:ff:ff

网卡驱动信息:

[root@asus ~]# ethtool -i wlp3s0
driver: ath9k # 驱动名称
version: 3.10.0-1062.9.1.el7.x86_64
firmware-version: N/A
expansion-rom-version: 
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

华硕笔记本信号:

[root@asus ~]# cat /sys/class/dmi/id/product_name 
X550VB

无线网卡信息:

[root@asus ~]# lspci | egrep -i 'wifi|wireless'
03:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
[root@asus ~]# 
[root@asus ~]# 
[root@asus ~]# lspci -s 03:00.0 -v
03:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
    Subsystem: Lite-On Communications Inc Device 6627
    Flags: bus master, fast devsel, latency 0, IRQ 17
    Memory at f7900000 (64-bit, non-prefetchable) [size=512K]
    Expansion ROM at f7980000 [disabled] [size=64K]
    Capabilities: [40] Power Management version 2
    Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
    Capabilities: [70] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Virtual Channel
    Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
    Kernel driver in use: ath9k
    Kernel modules: ath9k

Xavier
448 声望28 粉丝

最近的关注重心: