因此,在全新安装(Ubuntu 20.04)后,一切都运行正常。我下载了一些文件,使用了互联网,一切都正常。但第一次重启后,Wi-Fi 根本不起作用。
Wi-Fi 卡是 RTL8723AE 。我遇到了同样的问题:更新后 Wi-Fi 网络丢失
我尝试了以下方法:
sudo apt-get update && sudo apt-get install build-essential git dkms
sudo apt-get install mokutil && mokutil --sb-state
sudo apt-get install git build-essential linux-headers-$(uname -r)
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install
rm -v -R --interactive=never rtlwif*
还有一些变体,例如:
git clone -b extended https://github.com/lwfinger/rtlwifi_new.git
sudo dkms add ./rtlwifi_new
sudo dkms install rtlwifi-new/0.6
sudo modprobe -r rtl8723ae && sudo modprobe rtl8723ae
echo "options rtl8723ae ant_sel=3" | sudo tee /etc/modprobe.d/rtl8723ae.conf
但我没有得到好结果。问题是:它本来就运行良好,为什么重启后就全都出错了?如果一开始运行正常,现在会发生什么?
我还附加了无线脚本生成的文本文件(当我在 ubuntu 论坛上提出这个问题时创建):https://ubuntuforums.org/showthread.php?t=370108):https://pastebin.com/fHEDL5Yk
非常感谢您的帮助。(我之前在这里提出过这个问题,但 20.04 尚未正式发布,所以他们关闭了它。现在它可用了,我已经使用官方 20.04 重新安装进行了验证,但我仍然没有 Wi-Fi。甚至在安装开始时也没有。)
结果$ lsmod | grep rtl
rtl8723ae 90112 0
btcoexist 155648 1 rtl8723ae
rtl8723_common 24576 1 rtl8723ae
rtl_pci 28672 1 rtl8723ae
rtlwifi 90112 4 rtl_pci,btcoexist,rtl8723ae,rtl8723_common
mac80211 843776 3 rtl_pci,rtl8723ae,rtlwifi
btrtl 24576 1 btusb
cfg80211 704512 2 rtlwifi,mac80211
bluetooth 581632 31 btrtl,btintel,btbcm,bnep,btusb,rfcomm
结果$ lspci -knn | grep Net -A3; rfkill 列表:
04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723AE PCIe Wireless Network Adapter [10ec:8723]
Subsystem: Realtek Semiconductor Co., Ltd. RTL8723AE PCIe Wireless Network Adapter [10ec:0726]
Kernel driver in use: rtl8723ae
Kernel modules: rtl8723ae
05:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411 PCI Express Card Reader [10ec:5289] (rev 01)
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
输出$ dmesg|复制代码:
[ 0.147894] pci 0000:04:00.0: [10ec:8723] type 00 class 0x028000
[ 1.077465] usb 3-7: New USB device found, idVendor=0bda, idProduct=8723, bcdDevice= 2.00
[ 3.344439] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723a_fw.bin
[ 3.426191] rtl8723ae: Using firmware rtlwifi/rtl8723fw_B.bin
[ 3.556218] rtl8723ae 0000:04:00.0 wlp4s0: renamed from wlan0
[ 6.943635] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.943849] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.944286] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.945908] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.947019] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.947880] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.948227] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.948663] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.948948] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.949191] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 6.949457] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 10.442737] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 33.450917] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 47.134911] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 90.457744] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 108.088089] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 172.090897] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 208.602618] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 273.115580] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
安装了内核 5.6.7-050607-generic,但没有结果。Wi-Fi 仍然无法使用
输出$ dmesg|复制代码
[ 0.148284] pci 0000:04:00.0: [10ec:8723] type 00 class 0x028000
[ 1.221886] usb 3-7: New USB device found, idVendor=0bda, idProduct=8723, bcdDevice= 2.00
[ 3.415513] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723a_fw.bin
[ 3.458617] rtl8723ae: Using firmware rtlwifi/rtl8723fw_B.bin
[ 3.589877] rtl8723ae 0000:04:00.0 wlp4s0: renamed from wlan0
[ 11.540903] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 34.532879] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 67.661409] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 110.646875] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 163.705916] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 226.648493] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 289.698981] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 352.723416] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
最后一次编辑,我让它工作了一段时间由于这是完全随机的事情,我重新运行了 ubuntuforums 脚本,以查看它起作用和不起作用时的区别。主要区别如下:
GENERAL.DEVICE: enp5s0f2
GENERAL.TYPE: ethernet
GENERAL.NM-TYPE: NMDeviceEthernet
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/Devices/2
GENERAL.VENDOR: Realtek Semiconductor Co., Ltd.
GENERAL.PRODUCT: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
GENERAL.DRIVER: r8169
GENERAL.DRIVER-VERSION: --
GENERAL.FIRMWARE-VERSION: --
GENERAL.HWADDR: <MAC 'enp5s0f2' [IF1]>
GENERAL.MTU: 1500
GENERAL.STATE: 20 (unavailable)
GENERAL.REASON: 2 (Device is now managed)
##When there was NO WIFI the value of GENERAL.REASON was: 40 (Carrier/link changed)
还消息已经发生了很大变化(WIFI 不工作):
##### dmesg #############################
[ 6.990240] r8169 0000:05:00.2 enp5s0f2: Link is Down
[ 7.387187] rtlwifi: ****** Calling c2h_command_handle with hw 00000000a4ada57c
[ 7.387215] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 7.387218] rtlwifi: ****** back from c2h_command_handle
[ 11.502458] rtlwifi: ****** Calling c2h_command_handle with hw 00000000a4ada57c
[ 11.520833] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 11.523569] rtlwifi: ****** back from c2h_command_handle
[ 34.572875] rtlwifi: ****** Calling c2h_command_handle with hw 00000000a4ada57c
[ 34.928824] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 34.932942] rtlwifi: ****** back from c2h_command_handle
至此(WIFI工作正常):
##### dmesg #############################
[ 7.380836] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 7.380841] rtlwifi: ****** back from c2h_command_handle
[ 7.381140] rtlwifi: ****** Calling c2h_command_handle with hw 00000000950d7059
[ 7.381161] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 7.381164] rtlwifi: ****** back from c2h_command_handle
[ 34.411323] rtlwifi: ****** Calling c2h_command_handle with hw 00000000950d7059
[ 34.411342] rtlwifi: ****** back from c2h_command_handle
[ 34.412444] rtlwifi: ****** Calling c2h_command_handle with hw 00000000950d7059
[ 34.412466] rtl8723ae: ***** Before switch (c2h_event.cmd_id)
[ 34.412469] rtlwifi: ****** back from c2h_command_handle
[ 35.380432] wlp4s0: authenticate with <MAC 'PROVIDER_85' [AC1]>
答案1
我遇到了完全相同的问题,但我找到了一种解决方法:每次我挂起计算机时,唤醒后我都会恢复 wifi 连接。我注意到 dmesg 中最初没有几行:
[ 1045.522721] wlp5s0: authenticate with 0a:47:17:b9:79:d8
[ 1045.539247] wlp5s0: send auth to 0a:47:17:b9:79:d8 (try 1/3)
[ 1045.549974] wlp5s0: authenticated
[ 1045.550150] rtl8723ae 0000:05:00.0 wlp5s0: disabling HT/VHT/HE due to WEP/TKIP use
[ 1045.550840] wlp5s0: associate with 0a:47:17:b9:79:d8 (try 1/3)
[ 1045.554430] wlp5s0: RX AssocResp from 0a:47:17:b9:79:d8 (capab=0x411 status=0 aid=3)
[ 1045.554621] wlp5s0: associated
[ 1046.143069] IPv6: ADDRCONF(NETDEV_CHANGE): wlp5s0: link becomes ready
我不知道是什么让它在醒来后这样做,尤其是那部分:rtl8723ae 0000:05:00.0 wlp5s0: disabling HT/VHT/HE due to WEP/TKIP
使用
有时,启动电脑后,wifi 连接会立即生效。那么前面几行也会出现在 dmesg 中。
答案2
我有相同的适配器和相同的问题。我的笔记本电脑电池没电了,所以它总是连接到电源。如果我禁用笔记本电脑并让它连接到电源,然后启用它,wifi 适配器将无法工作。如果我禁用笔记本电脑,断开电源,重新连接,启用笔记本电脑,wifi 就可以正常工作了。希望这些信息能对某些人有所帮助。
答案3
我在旧笔记本电脑上遇到了同样的问题。经过大量故障排除后,以下方法对我有用:
安装 systool 来检查模块参数(可选)。
在 /etc/modprobe.d 创建了一个文件“rtl8723ae.conf”,其中包含以下行:
选项 rtl8723ae ant_sel=2 msi=1 swlps=0 ips=0
关闭。
尝试打开笔记本电脑几次后(启动时冻结),wifi 就好了!
我的 systool -vm rtl8723ae:
Module = "rtl8723ae"
Attributes:
coresize = "90112"
initsize = "0"
initstate = "live"
refcnt = "0"
srcversion = "6828B67B4471E494CE27C12"
taint = ""
uevent = <store method only>
Parameters:
aspm = "1"
debug_level = "0"
debug_mask = "0"
disable_watchdog = "N"
fwlps = "N"
ips = "N"
msi = "Y"
swenc = "N"
swlps = "N"