您尚未登录。

#1 2018-04-10 22:15:58

tommy0607
会员
注册时间: 2018-04-10
帖子: 9

NetworkManager连接不上wifi

本来连接得好好的,突然网断了,然后删掉这个wifi重新添加,提示我找不到这个wifi,但我换用netctl却没有问题,可以正常连接。
PS:使用的桌面环境是KDE(Plasma)

离线

#2 2018-04-12 09:34:27

tommy0607
会员
注册时间: 2018-04-10
帖子: 9

Re: NetworkManager连接不上wifi

没人理我吗

离线

#3 2018-04-12 10:09:39

wxg4net
会员
注册时间: 2012-01-07
帖子: 274

Re: NetworkManager连接不上wifi

wifi消失了?


Arch Linux User

离线

#4 2018-04-12 13:25:28

jouyouyun
会员
注册时间: 2011-10-10
帖子: 268

Re: NetworkManager连接不上wifi

tommy0607 说:

没人理我吗

看下 NetworkManager 有没有扫描到你的 ssid

# 获取所有网络设备
qdbus --system --literal org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.GetAllDevices
# 然后拿到设备列表一个一个执行下面的命令,执行成功的为无线设备,失败的忽略
qdbus --system --literal org.freedesktop.NetworkManager <Device> org.freedesktop.NetworkManager.Device.Wireless.GetAccessPoints
# 这会得到此设备扫描到的ssid列表,然后在一个一个执行获取名称,得到的是 Byte Array,最后看看有没有你自己ssid(Byte Array格式的)
qdbus --system --literal org.freedesktop.NetworkManager <AccessPoint> org.freedesktop.NetworkManager.AccessPoint.Ssid

或者安装一个 network-manager-applet 用它来看下你的 ssid 存在不

或者看下你的 ssid 频段,最好在 1-11 之内

最近编辑记录 jouyouyun (2018-04-12 13:26:26)

离线

#5 2018-04-16 15:01:22

tommy0607
会员
注册时间: 2018-04-10
帖子: 9

Re: NetworkManager连接不上wifi

jouyouyun 说:

看下 NetworkManager 有没有扫描到你的 ssid

# 获取所有网络设备
qdbus --system --literal org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.GetAllDevices
# 然后拿到设备列表一个一个执行下面的命令,执行成功的为无线设备,失败的忽略
qdbus --system --literal org.freedesktop.NetworkManager <Device> org.freedesktop.NetworkManager.Device.Wireless.GetAccessPoints
# 这会得到此设备扫描到的ssid列表,然后在一个一个执行获取名称,得到的是 Byte Array,最后看看有没有你自己ssid(Byte Array格式的)
qdbus --system --literal org.freedesktop.NetworkManager <AccessPoint> org.freedesktop.NetworkManager.AccessPoint.Ssid

我执行完了第一个命令,得到了三个device,然后只有第三个可以成功运行第二条命令,但返回结果如下:
AccessPoints
[Argument: ao {}]
没有什么AccessPoint值。

离线

#6 2018-04-16 19:17:03

jouyouyun
会员
注册时间: 2011-10-10
帖子: 268

Re: NetworkManager连接不上wifi

tommy0607 说:
jouyouyun 说:

看下 NetworkManager 有没有扫描到你的 ssid

# 获取所有网络设备
qdbus --system --literal org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.GetAllDevices
# 然后拿到设备列表一个一个执行下面的命令,执行成功的为无线设备,失败的忽略
qdbus --system --literal org.freedesktop.NetworkManager <Device> org.freedesktop.NetworkManager.Device.Wireless.GetAccessPoints
# 这会得到此设备扫描到的ssid列表,然后在一个一个执行获取名称,得到的是 Byte Array,最后看看有没有你自己ssid(Byte Array格式的)
qdbus --system --literal org.freedesktop.NetworkManager <AccessPoint> org.freedesktop.NetworkManager.AccessPoint.Ssid

我执行完了第一个命令,得到了三个device,然后只有第三个可以成功运行第二条命令,但返回结果如下:
AccessPoints
[Argument: ao {}]
没有什么AccessPoint值。

意味着 NetworkManager 没有找到可用的 ssid,更改下 wifi 频段试试。
看下 NetworkManager 的日志,看看有没有报错,命令:

sudo journalctl -u NetworkManager -r

离线

#7 2018-04-17 22:01:58

tommy0607
会员
注册时间: 2018-04-10
帖子: 9

Re: NetworkManager连接不上wifi

jouyouyun 说:

意味着 NetworkManager 没有找到可用的 ssid,更改下 wifi 频段试试。
看下 NetworkManager 的日志,看看有没有报错,命令:

sudo journalctl -u NetworkManager -r

Apr 17 21:49:19 TommyPC NetworkManager[5584]: <info>  [1523972959.8052] manager: startup complete
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.9373] supplicant: wpa_supplicant running
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.9373] supplicant: wpa_supplicant running
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.8617] ovsdb: Could not connect: No such file or directory
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.8286] manager: rfkill: WiFi now disabled by radio killswitch
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.8019] device (wlo1): set-hw-addr: set MAC address to 8A:0A:7B:13:26:BA (scanning)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.8013] device (wlo1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.8006] manager: (wlo1): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/3)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.7998] device (wlo1): driver supports Access Point (AP) mode
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.7996] wifi-nl80211: (wlo1): using nl80211 for WiFi device control
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.5974] device (enp2s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.5918] manager: (enp2s0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.5857] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.5823] device (lo): carrier: link connected
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.5758] Loaded device plugin: NMBluezManager (/usr/lib/NetworkManager/libnm-device-plugin-bluetooth.so)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.5178] Loaded device plugin: NMOvsFactory (/usr/lib/NetworkManager/libnm-device-plugin-ovs.so)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.5171] Loaded device plugin: NMTeamFactory (/usr/lib/NetworkManager/libnm-device-plugin-team.so)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.4091] Loaded device plugin: NMWwanFactory (/usr/lib/NetworkManager/libnm-device-plugin-wwan.so)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3795] Loaded device plugin: NMWifiFactory (/usr/lib/NetworkManager/libnm-device-plugin-wifi.so)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3772] Loaded device plugin: NMAtmManager (/usr/lib/NetworkManager/libnm-device-plugin-adsl.so)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3735] Loaded device plugin: NMVxlanDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3735] Loaded device plugin: NMVlanDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3734] Loaded device plugin: NMVethDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3734] Loaded device plugin: NMTunDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3733] Loaded device plugin: NMPppDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3733] Loaded device plugin: NMMacvlanDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3732] Loaded device plugin: NMMacsecDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3732] Loaded device plugin: NMIPTunnelDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3731] Loaded device plugin: NMInfinibandDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3730] Loaded device plugin: NMEthernetDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3730] Loaded device plugin: NMDummyDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3729] Loaded device plugin: NMBridgeDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3728] Loaded device plugin: NMBondDeviceFactory (internal)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3717] dhcp-init: Using DHCP client 'internal'
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3714] manager: Networking is enabled by state file
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3710] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3705] manager: rfkill: WiFi enabled by radio killswitch; disabled by state file
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3650] settings: loaded plugin iBFT: (c) 2014 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list. (/usr/>
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3567] settings: loaded plugin keyfile: (c) 2007 - 2016 Red Hat, Inc.  To report bugs please use the NetworkManager mailing li>
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <error> [1523972953.3555] dispatcher: could not get dispatcher proxy! Error calling StartServiceByName for org.freedesktop.nm_dispatcher: GDBus.E>
Apr 17 21:49:13 TommyPC systemd[1]: Started Network Manager.
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3222] manager[0x5610009ac0c0]: rfkill: WWAN hardware radio set enabled
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.3221] manager[0x5610009ac0c0]: rfkill: WiFi hardware radio set disabled
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.2833] rfkill1: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.5/0000:03:00.0/ieee80211/phy0/rfkill1) (dri>
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.2793] dns-mgr[0x5610009c6960]: init: dns=default, rc-manager=symlink
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.2784] hostname: hostname changed from (none) to "TommyPC"
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.2783] hostname: hostname: using hostnamed
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.0641] manager[0x5610009ac0c0]: monitoring kernel firmware directory '/usr/lib/firmware'.
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.0061] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 20-connectivity.conf)
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.0058] NetworkManager (version 1.10.6-3, Arch Linux) is starting... (for the first time)
Apr 17 21:49:12 TommyPC systemd[1]: Starting Network Manager...

离线

#8 2018-04-18 11:59:00

matrikslee
会员
注册时间: 2017-04-21
帖子: 450
个人网站

Re: NetworkManager连接不上wifi

用rfkill list命令看设备状态,有可能是被WiFi功能键给锁死了。
PS:NM的这个问题很普遍,换netctl是最简单的办法。

离线

#9 2018-04-18 18:02:22

tommy0607
会员
注册时间: 2018-04-10
帖子: 9

Re: NetworkManager连接不上wifi

matrikslee 说:

用rfkill list命令看设备状态,有可能是被WiFi功能键给锁死了。
PS:NM的这个问题很普遍,换netctl是最简单的办法。

0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
看结果并没有被锁啊,而且被锁的话netctl也是用不了的,我自己尝试过

最近编辑记录 tommy0607 (2018-04-18 18:05:32)

离线

#10 2018-04-19 09:14:04

jouyouyun
会员
注册时间: 2011-10-10
帖子: 268

Re: NetworkManager连接不上wifi

Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.8286] manager: rfkill: WiFi now disabled by radio killswitch

显示wifi被禁用了,键盘上有没有切换WIFI的快捷键,按一下试试.

看下这个:https://bbs.archlinux.org/viewtopic.php?id=108881

最近编辑记录 jouyouyun (2018-04-19 09:33:19)

离线

#11 2018-04-21 23:17:14

tommy0607
会员
注册时间: 2018-04-10
帖子: 9

Re: NetworkManager连接不上wifi

jouyouyun 说:
Apr 17 21:49:13 TommyPC NetworkManager[5584]: <info>  [1523972953.8286] manager: rfkill: WiFi now disabled by radio killswitch

显示wifi被禁用了,键盘上有没有切换WIFI的快捷键,按一下试试.

看下这个:https://bbs.archlinux.org/viewtopic.php?id=108881

我研究了一下,我在开启NetworkManager之前用rfkill检测网络是没有被锁的,但当我sudo systemctl start NetworkManger(就是这句话导致wifi被锁),sudo systemctl stop netctl以后再rfkill,就显示wifi被锁,不知道是什么原因

离线

#12 2018-04-22 13:00:58

zsrkmyn
lazy...
注册时间: 2013-05-05
帖子: 331

Re: NetworkManager连接不上wifi

先 stop netctl 再 start NM.

离线

#13 2018-04-23 16:35:32

tommy0607
会员
注册时间: 2018-04-10
帖子: 9

Re: NetworkManager连接不上wifi

zsrkmyn 说:

先 stop netctl 再 start NM.

本来就是这么做的。。。

离线

#14 2018-04-29 17:56:59

tommy0607
会员
注册时间: 2018-04-10
帖子: 9

Re: NetworkManager连接不上wifi

求大家帮忙

离线

#15 2018-04-30 05:49:20

驿窗
驿窗
所在地: 基础开源研究
注册时间: 2016-06-03
帖子: 928
个人网站

Re: NetworkManager连接不上wifi

下面这样做管用不?

在笔记本上关闭WLAN

有时候在你使用笔记本上的开关禁用WI-Fi然后重新启用后,NetworkManager无法工作。这常常是rfkill的问题。 $ watch -n1 rfkill list all 检查驱动rfkill是否通知到无线适配器的状态. 如果你开启适配器后,其标识符仍然显示blocked,你可以尝试如下命令手动unblock(X是前一条命令的identifier编号)

# rfkill event unblock X


===
上面的内容来自这个连接:
https://wiki.archlinux.org/index.php/NetworkManager


开源/Linux大众化,从驿窗开始~

离线

页脚