16升级到18后无法连接WiFi

16升级到18后无法连接WiFi

升级后我的 WiFi 模块突然被禁用。请帮我找出问题根源。谢谢!

Ubuntu 18.04.3 LTS

iwconfig 

wlan0     IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry short limit:7   RTS thr=2347 B   Fragment thr=2346 B   
          Encryption key:off
          Power Management:on


lshw -C network
  *-usb DISABLED            
       description: Wireless interface
       product: VNT USB-802.11 Wireless LAN Adapter
       vendor: VIA Networking Technologies, Inc.
       physical id: 5
       bus info: usb@1:5
       logical name: wlan0
       version: 2.05
       serial: 00:12:7b:46:2b:07
       capabilities: usb-2.00 ethernet physical wireless
       configuration: broadcast=yes driver=vt6656                               

      driverversion=4.15.0-62-generic firmware=N/A link=no maxpower=500mA multicast=yes speed=480Mbit/s wireless=IEEE 802.11


cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto lo
iface lo inet loopback

# The primary network interface
# auto eth0
# iface eth0 inet dhcp

auto wlan0

cat /etc/netplan/*.yaml

cat: '/etc/netplan/*.yaml': No such file or directory

cat /etc/NetworkManager/NetworkManager.conf

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

sudo lshw -C network
  *-usb DISABLED            
       description: Wireless interface
       product: VNT USB-802.11 Wireless LAN Adapter
       vendor: VIA Networking Technologies, Inc.
       physical id: 5
       bus info: usb@1:5
       logical name: wlan0
       version: 2.05
       serial: 00:12:7b:46:2b:07
       capabilities: usb-2.00 ethernet physical wireless
       configuration: broadcast=yes driver=vt6656 driverversion=4.15.0-62-generic firmware=N/A link=no maxpower=500mA multicast=yes speed=480Mbit/s wireless=IEEE 802.11
  *-network
       description: Ethernet interface
       product: MCP77 Ethernet
       vendor: NVIDIA Corporation
       physical id: a
       bus info: pci@0000:00:0a.0
       logical name: eth0
       version: a2
       serial: 10:bf:48:bb:ea:a9
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 66MHz
       capabilities: pm msi ht bus_master cap_list ethernet physical mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=forcedeth driverversion=0.64 duplex=full ip=10.0.0.101 latency=0 link=yes maxlatency=20 mingnt=1 multicast=yes port=MII speed=100Mbit/s
       resources: irq:25 memory:fe02b000-fe02bfff ioport:d800(size=8) memory:fe02a000-fe02a0ff memory:fe029000-fe02900f

答案1

您的文件/etc/network/interfaces格式不正确。为了让网络管理器管理您的无线设备,必须删除格式不正确的条目。从终端:

sudo nano /etc/network/interfaces

完全删除该行auto wlan0。保存(Ctrl+o 然后按 Enter)并退出 nano(Ctrl+x)。

重新启动网络管理器:

sudo service network-manager restart

网络管理器现在可以看到无线网络并提供连接吗?

我还想知道 netplan 是否已安装并正在运行。请发帖:

ls -al /etc/netplan

编辑:让我们重新创建所需的 netplan 文件,看看是否有帮助。从终端:

sudo mkdir /etc/netplan
sudo nano /etc/netplan/01-network-manager-all.yaml

添加以下文本:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Netplan 对间距、缩进等非常具体。请使用空格,而不是制表符。仔细校对两遍。保存(Ctrl+o 然后按 Enter)并退出(Ctrl+x)文本编辑器。

接下来是:

sudo netplan generate
sudo netplan apply

有什么改善吗?接口是否仍报告为已禁用?

sudo lshw -C network

可能需要重新启动。

相关内容