我在 Dell XPS-13-9370 上安装了 Ubuntu 20.04。一切正常,但今天我断开 vpn 连接后,我的 wifi 停止工作了。我没有双启动,只有 ubuntu。
我从 Wi-Fi 设置面板看到此错误:“未找到 Wi-Fi 适配器”。
以下是该命令的输出lshw -C net
:
nameen@nameen-XPS-13-9370- /home/nameen> sudo lshw -c net
*-network DISABLED
description: Wireless interface
product: QCA6174 802.11ac Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlp2s0
version: 32
serial: 9c:b6:d0:92:4d:01
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ath10k_pci driverversion=5.4.0-73-generic firmware=WLAN.RM.4.4.1-00140-QCARMSWPZ-1 latency=0 link=no multicast=yes wireless=IEEE 802.11
resources: irq:139 memory:dc000000-dc1fffff
nameen@nameen-XPS-13-9370- /home/nameen>
请注意,当我使用以太网电缆连接时,网络也被设置为 DISBALED。
命令ip addr
返回:
nameen@nameen-XPS-13-9370- /home/nameen> ip addr
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
valid_lft forever preferred_lft forever
2: wlp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 9c:b6:d0:92:4d:01 brd ff:ff:ff:ff:ff:ff
nameen@nameen-XPS-13-9370- /home/nameen>
命令cat /etc/netplan/*.yaml
返回:
nameen@nameen-XPS-13-9370- /home/nameen> cat /etc/netplan/*.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
nameen@nameen-XPS-13-9370- /home/nameen>
我尝试了这里报告的解决方案:Ubuntu 18.04 设置中缺少有线连接但它没有作用。
您能告诉我您对我的问题有何了解以及我该怎么做吗?
谢谢
更多信息:
rfkill list all
给出:
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
该命令sudo ifconfig wlp2s0 up
实际上不会改变网络状态。ip addr
该ifconfig
命令后面的内容如下:
nameen@nameen-XPS-13-9370- /home/nameen> ip addr
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
valid_lft forever preferred_lft forever
2: wlp2s0: <NO-CARRIER, BROADCAST,MULTICAST, UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 9c:b6:d0:92:4d:01 brd ff:ff:ff:ff:ff:ff
cat /etc/network/interfaces
说:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
答案1
以下是我的问题解决的方法。在终端中我输入:
sudo service NetworkManager stop
然后,我编辑了这个文件/var/lib/NetworkManager/NetworkManager.state
(使用 sudo power)
我改变了这一行:
NetworkingEnabled=false
更改为:
NetworkingEnabled=true
最后,我在终端中输入:
sudo service NetworkManager restart
无需重新启动,但为了检查效果是否持久,最好重新启动。
答案2
这可以解决类似的问题:
sudo su
systemctl stop NetworkManager.service
rm /var/lib/NetworkManager/NetworkManager.state
systemctl start NetworkManager.service
无需重启