You are not logged in.

#1 2016-08-25 10:59:37

rubik
Member
Registered: 2012-03-23
Posts: 104

WiFi connection drops periodically, but NetworkManager says it's ok

I've had this issue for a while, where I successfully connect to my home WiFi and after a few minutes it stops working.
In Chromium, I see:
"Resolving host..."

The only way to make it work again is to restart the connection:

    $ nmcli con down streamingnet-wifi && nmcli con up streamingnet-wifi

After this, the connection suddenly works again in a few seconds. The whole process repeats after a few minutes.

I looked into the journal, but there's no sign of errors. When I boot it connects automatically:

Aug 25 12:30:46 miki-laptop wpa_supplicant[528]: wlp2s0: Reject scan trigger since one is already pending
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4825] device (wlp2s0): supplicant interface state: ready -> inactive
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4837] policy: auto-activating connection 'streamingnet-wifi'
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4843] device (wlp2s0): Activation: starting connection 'streamingnet-wifi' (c8de8ffb-3c29-4db1-8b1d-0cf9704b2b24)
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4845] device (wlp2s0): state change: disconnected -> prepare (reason 'none') [30 40 0]
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4846] manager: NetworkManager state is now CONNECTING
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4850] device (wlp2s0): state change: prepare -> config (reason 'none') [40 50 0]
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4852] device (wlp2s0): Activation: (wifi) access point 'streamingnet-wifi' has security, but secrets are required.
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4852] device (wlp2s0): state change: config -> need-auth (reason 'none') [50 60 0]
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4876] device (wlp2s0): state change: need-auth -> prepare (reason 'none') [60 40 0]
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4879] device (wlp2s0): state change: prepare -> config (reason 'none') [40 50 0]
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4881] device (wlp2s0): Activation: (wifi) connection 'streamingnet-wifi' has security, and secrets exist.  No new secrets needed.
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4881] Config: added 'ssid' value 'StreamingNET'
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4881] Config: added 'scan_ssid' value '1'
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4881] Config: added 'key_mgmt' value 'WPA-PSK'
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4881] Config: added 'psk' value '<omitted>'
Aug 25 12:30:47 miki-laptop NetworkManager[476]: <info>  [1472121047.4884] sup-iface[0xa34ec0,wlp2s0]: config: set interface ap_scan to 1
Aug 25 12:30:48 miki-laptop wpa_supplicant[528]: wlp2s0: SME: Trying to authenticate with 4c:60:de:f3:b6:a1 (SSID='StreamingNET' freq=5220 MHz)
Aug 25 12:30:48 miki-laptop kernel: wlp2s0: authenticate with 4c:60:de:f3:b6:a1
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.4966] device (wlp2s0): supplicant interface state: inactive -> authenticating
Aug 25 12:30:48 miki-laptop wpa_supplicant[528]: wlp2s0: Trying to associate with 4c:60:de:f3:b6:a1 (SSID='StreamingNET' freq=5220 MHz)
Aug 25 12:30:48 miki-laptop kernel: wlp2s0: send auth to 4c:60:de:f3:b6:a1 (try 1/3)
Aug 25 12:30:48 miki-laptop kernel: wlp2s0: authenticated
Aug 25 12:30:48 miki-laptop kernel: wlp2s0: associate with 4c:60:de:f3:b6:a1 (try 1/3)
Aug 25 12:30:48 miki-laptop kernel: wlp2s0: RX AssocResp from 4c:60:de:f3:b6:a1 (capab=0x11 status=0 aid=1)
Aug 25 12:30:48 miki-laptop wpa_supplicant[528]: wlp2s0: Associated with 4c:60:de:f3:b6:a1
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5032] device (wlp2s0): supplicant interface state: authenticating -> associating
Aug 25 12:30:48 miki-laptop kernel: wlp2s0: associated
Aug 25 12:30:48 miki-laptop kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5088] device (wlp2s0): supplicant interface state: associating -> 4-way handshake
Aug 25 12:30:48 miki-laptop wpa_supplicant[528]: wlp2s0: WPA: Key negotiation completed with 4c:60:de:f3:b6:a1 [PTK=CCMP GTK=CCMP]
Aug 25 12:30:48 miki-laptop wpa_supplicant[528]: wlp2s0: CTRL-EVENT-CONNECTED - Connection to 4c:60:de:f3:b6:a1 completed [id=0 id_str=]
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5686] device (wlp2s0): supplicant interface state: 4-way handshake -> completed
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5687] device (wlp2s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'StreamingNET
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5687] device (wlp2s0): state change: config -> ip-config (reason 'none') [50 70 0]
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5692] dhcp4 (wlp2s0): activation: beginning transaction (timeout in 45 seconds)
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5957]   address 192.168.0.13
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5957]   plen 24
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5958]   expires in 86400 seconds
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5958]   nameserver '192.168.0.1'
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5958]   gateway 192.168.0.1
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5960] dhcp4 (wlp2s0): state changed unknown -> bound
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5979] device (wlp2s0): state change: ip-config -> ip-check (reason 'none') [70 80 0]
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5982] device (wlp2s0): state change: ip-check -> secondaries (reason 'none') [80 90 0]
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5985] device (wlp2s0): state change: secondaries -> activated (reason 'none') [90 100 0]
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.5986] manager: NetworkManager state is now CONNECTED_LOCAL
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.6018] manager: NetworkManager state is now CONNECTED_GLOBAL
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.6020] policy: set 'streamingnet-wifi' (wlp2s0) as default for IPv4 routing and DNS
Aug 25 12:30:48 miki-laptop NetworkManager[476]: <info>  [1472121048.6021] device (wlp2s0): Activation: successful, device activated.
Aug 25 12:30:50 miki-laptop NetworkManager[476]: <info>  [1472121050.8671] dhcp6 (wlp2s0): activation: beginning transaction (timeout in 45 seconds)
Aug 25 12:30:50 miki-laptop NetworkManager[476]: <info>  [1472121050.8757]   nameserver fe80::4e60:deff:fef3:b6a0
Aug 25 12:30:50 miki-laptop NetworkManager[476]: <info>  [1472121050.8758] dhcp6 (wlp2s0): state changed unknown -> bound

There are also no errors whatsoever until I have to reconnect manually. Since Chromium is stuck on "Resolving hosts" I tried to change DNS servers, but that does not resolve the issue. It also cannot be my router, since all my other devices work normally, including my desktop computer, which has the same Arch kernel and the same overall setup.

Also, looking for firmware issues, I only found the following error in the journal, but it's been there for a long time and probably isn't relevant:

Aug 25 12:30:43 miki-laptop kernel: iwlwifi 0000:02:00.0: Unsupported splx structure

Offline

#2 2016-08-25 13:54:18

metr
Member
Registered: 2016-01-02
Posts: 3

Re: WiFi connection drops periodically, but NetworkManager says it's ok

Hello. Have you tried something other than Chromium? Ping wget etc... Is local network reachable? Do you have some antivirus or firewall software? And does ethernet connection work?
While problem persists you can temporarily add crontab to restart WiFi every 5 minutes.

Last edited by metr (2016-08-25 13:58:59)

Offline

#3 2016-08-25 14:28:14

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: WiFi connection drops periodically, but NetworkManager says it's ok

As a sanity check, please post the output of find /etc/systemd
Also, The outputs of ip addr and ip link

Edit:  Is the desktop wired or wireless?

Last edited by ewaller (2016-08-25 14:28:45)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2016-08-26 08:55:55

rubik
Member
Registered: 2012-03-23
Posts: 104

Re: WiFi connection drops periodically, but NetworkManager says it's ok

I'm sorry that I left out important information that I had actually observed but forgot to include in the original post. Here are the answers to your questions:

*) ping and wget do not work until I restart the connection (and neither does pacman, when it's downloading)
*) ping 127.0.0.1 always succeeds, even when the connection gets stuck
*) no antivirus or firewall
*) $ find /etc/systemd

/etc/systemd
/etc/systemd/journal-remote.conf
/etc/systemd/coredump.conf
/etc/systemd/sleep.conf
/etc/systemd/system.conf
/etc/systemd/user.conf
/etc/systemd/system
/etc/systemd/system/sleep.target.wants
/etc/systemd/system/sleep.target.wants/tlp-sleep.service
/etc/systemd/system/sleep.target.wants/suspend@miki.service
/etc/systemd/system/powertop.service
/etc/systemd/system/cpupower.service.d
/etc/systemd/system/getty.target.wants
/etc/systemd/system/getty.target.wants/getty@tty1.service
/etc/systemd/system/suspend@.service
/etc/systemd/system/multi-user.target.wants
/etc/systemd/system/multi-user.target.wants/lm_sensors.service
/etc/systemd/system/multi-user.target.wants/netctl-ifplugd@enp0s2f0u1.service
/etc/systemd/system/multi-user.target.wants/devmon@miki.service
/etc/systemd/system/multi-user.target.wants/rfkill-block@bluetooth.service
/etc/systemd/system/multi-user.target.wants/powertop.service
/etc/systemd/system/multi-user.target.wants/acpid.service
/etc/systemd/system/multi-user.target.wants/remote-fs.target
/etc/systemd/system/multi-user.target.wants/netctl-auto@wlp2s0.service
/etc/systemd/system/multi-user.target.wants/netctl-ifplugd@enp0s20f0u1.service
/etc/systemd/system/multi-user.target.wants/tlp.service
/etc/systemd/system/timers.target.wants
/etc/systemd/system/timers.target.wants/fstrim.timer
/etc/systemd/journald.conf
/etc/systemd/network
/etc/systemd/timesyncd.conf
/etc/systemd/resolved.conf
/etc/systemd/journal-upload.conf
/etc/systemd/user
/etc/systemd/logind.conf

*) $ ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    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
2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:21:5c:e2:50:c2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.13/24 brd 192.168.0.255 scope global dynamic wlp2s0
       valid_lft 86084sec preferred_lft 86084sec
    inet6 2002:5236:cd4a:e472:4365:c515:29c0:7b0a/64 scope global noprefixroute dynamic 
       valid_lft 2089sec preferred_lft 1489sec
    inet6 fe80::7168:cb2:92df:bc7a/64 scope link 
       valid_lft forever preferred_lft forever

*) $ ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 00:21:5c:e2:50:c2 brd ff:ff:ff:ff:ff:ff

*) the desktop computer is wireless as well, with Arch and NetworkManager. It does not experience connection problems. My smartphone is also connected with no problems and I have another Windows laptop which connects wirelessly without problems.

*) network card:
$ lspci -s 02:00 -vv | head -n6

02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
	Subsystem: Intel Corporation Dual Band Wireless-AC 7265
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 129

*) some months ago I also disabled 11n, because of WiFi instability (more info here: https://bugs.launchpad.net/ubuntu/+sour … g/1451246)
$ cat /etc/modprobe.d/iwlwifi.conf

options iwlwifi 11n_disable=1

I'll try and disable it now, maybe with some firmware updates it got better.

Last edited by rubik (2016-08-26 09:02:37)

Offline

#5 2016-08-26 15:01:56

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: WiFi connection drops periodically, but NetworkManager says it's ok

Well, this is a bit of a mess.   You have enabled netctl in systemd, but you have not enabled NetworkManager;  I assume you want to use NetworkManager.

Let's start by disabling netctl-ifplugd@enp0s2f0u1.service, acpid.service, netctl-auto@wlp2s0.service and netctl-ifplugd@enp0s20f0u1.service.
Netctl and NetworkManager will struggle for control of the network hardware.   Also, acpid.service runs the acpid daemon from systemd; but the acpid service is used to run a DHCP server.  I doubt that it what you want to do.  You need a client, but both Netctl and NetworkManager handle the spawning dhcpcd (the client daemon) when they need it.

After you disable them, rerun the find command I gave you and verify all the above services are gone.  If not, use rm to remove them.   Then, use sysemctl to enable NetworkManager.

Then, a good old Redmond style reboot to ensure we have a clean state.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2016-08-26 16:42:48

rubik
Member
Registered: 2012-03-23
Posts: 104

Re: WiFi connection drops periodically, but NetworkManager says it's ok

Thanks for the quick reply and explanation. It's indeed a mess, but it's not actually how it appears to be. For some weird reason,  the services you mentioned do not exist. Instead, systemd left broken symlinks inside the multi-user-targets.wants folder. For example,

acpid.service -> /usr/lib/systemd/system/acpid.service

but the latter does not exist. Originally I wrongly installed acpid, and then uninstalled and disabled it from systemd. I don't know why there's still a symlink there. Same thing with netctl: prior to switching to NetworkManager I disabled all the files.

On the contrary, I am sure I enabled NetworkManager, but it's not showing up in the directory. Enabling it again fixed the issue.

Now, since it connected automatically on boot, how could it be disabled?!

Last edited by rubik (2016-08-26 16:43:50)

Offline

#7 2016-08-27 04:45:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: WiFi connection drops periodically, but NetworkManager says it's ok

Do you run Gnome?  If so, it might be that Gnome was starting it.  I cannot test that theory as I use neither Gnome or NetworkManager.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2016-08-27 13:16:35

rubik
Member
Registered: 2012-03-23
Posts: 104

Re: WiFi connection drops periodically, but NetworkManager says it's ok

Nope, X and i3 are started automatically when I log in with my user name in TTY 1 (the code is in .zlogin).
But most importantly, now the connection is working wonderfully!

Thanks for the help!

Offline

Board footer

Powered by FluxBB