WiFi stops sending/receiving bytes after a while, only disconnect, reconnect works

This has happened on multiple routers (at home, at work, at client’s):

  • Wifi is connected fine
  • After using for a while (maybe an hour or so) it’ll stop sending data (viewing the widget form taskbar shows 0 bytes sending/receiving)
  • Disconnect and reconnect fixes it (for another 1-6 hours - it’s inconsistent)

Any idea what could be causing this? Is there a fix? How do I diagnose this?

OpenSUSE LEAP 42.1 (64 bit)
KDE 5.5.5
Kernel 4.9.0-2 default
Lenovo X1 Carbon 4th gen, Intel i7-6600U, 4 core
16 GB RAM

The wireless hardware details might be useful

/usr/sbin/hwinfo --wlan

Probably a reasonable starting point is to consider what your machine is doing on the network… ie What apps using the network are currently running? What kinds of network resources might be mounted or utilized, eg network shares both in the LAN or across the Internet? Anything like mail which might query a remote server every few minutes? Any notifications generated based on network activity?

You should also consider what kinds of Internet connections are used in each place. Dedicated Internet connections to the Provider are often more stable. Shared connections (upstream, not in your LAN) will often put your connection “to sleep” due to inactivity, particularly if the other upstream Users need that bandwidth.

TSU

I have exactly the same problem on openSUSE LEAP 42.2 (64 bit) with KDE 4.14.25.
No problem when network is wired, but network is often disconnecting when on WiFi. Only restart of the whole system helps.

Hardware details? (Read post #2 for command)

18: PCI 900.0: 0282 WLAN controller
[Created at pci.378]
Unique ID: y9sn.bhUnM+Ctai7
Parent ID: Z7uZ.nmKau2v9EkF
SysFS ID: /devices/pci0000:00/0000:00:1c.3/0000:09:00.0
SysFS BusID: 0000:09:00.0
Hardware Class: network
Device Name: “WLAN”
Model: “Realtek RTL8723BE PCIe Wireless Network Adapter”
Vendor: pci 0x10ec “Realtek Semiconductor Co., Ltd.”
Device: pci 0xb723 “RTL8723BE PCIe Wireless Network Adapter”
SubVendor: pci 0x103c “Hewlett-Packard Company”
SubDevice: pci 0x2231
Driver: “rtl8723be”
Driver Modules: “rtl8723be”
Device File: wlan0
Features: WLAN
I/O Ports: 0x4000-0x40ff (rw)
Memory Range: 0xd0500000-0xd0503fff (rw,non-prefetchable)
IRQ: 19 (no events)
Link detected: yes
WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13
WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472
WLAN encryption modes: WEP40 WEP104 TKIP CCMP
WLAN authentication modes: open sharedkey wpa-psk wpa-eap
Module Alias: “pci:v000010ECd0000B723sv0000103Csd00002231bc02sc80i00”
Driver Info #0:
Driver Status: rtl8723be is active
Driver Activation Cmd: “modprobe rtl8723be”
Config Status: cfg=no, avail=yes, need=no, active=unknown
Attached to: #10 (PCI bridge)

Correct KDE Plasma version: 5.8.6
Kernel version: 4.4.57-18.3-default

The above mentioned problem appeared on each HP laptop I have installed.
However WiFi was always stable on the same machines until openSUSE 13.1.

Ok, a RTL8723BE PCIe Wireless Network Adapter supported by the ‘rtl8723be’ driver. I’ve seen reports that the installed wireless card may have two antenna ports but some vendors saved money by only including a single antenna on some laptop models. Read the comments in this thread by Larry Finger (wireless driver developer) about this situation.

Here’s another thread concerning an openSUSE user discussing the same issue. There is a solution to set the correct antenna (a driver option) when the module loads. This can be trialled by unloading the driver and the loading with an option to explicitly set the deisred antenna ‘ant_sel=1’ or "ant_sel=2’…

sudo modprobe -r rtl8723be
sudo modprobe rtl8723be ant_sel=2

then check the received signal level for each trialled antenna connection

sudo /usr/sbin/iw dev wlan0 scan | egrep "SSID|signal"

It should soon become apparent which antenna port is really connected to a physical antenna by the signal strength reported.

Once it is known whether ant_sel=1 or ant_sel=2 is appropriate, it can be configured permanently like this

echo "options rtl8723be ant_sel=2 fwlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf

The next time the driver is loaded, these settings will take effect.

Hope this helps.

If you’re doing anything that sets up multiple simultaneous network connections like torrent file sharing, you should change your TCP/IP Congesttion Control Algorithm. Also unless you severely throttle the number of simultaneous connections and/or bandwidth, you can also improve performance by enlarging and optimizing your TCP/IP buffers, shifting from local computing to networking.

I describe all you need to know and do, and I describe the networking symptoms that were fixed in this online paper I wrote many years ago for an earlier openSUSE, but is still very applicable today.

https://sites.google.com/site/4techsecrets/optimize-and-fix-your-network-connection

If you have any Q about what is described (I describe why you see what you’re seeing, and why the modifications work), post again.

TSU

Thanks to you all for your help!
I have tested the antenna selection as you suggested. Here is the result:
linux-ondrej:~ # sudo modprobe -r rtl8723be
linux-ondrej:~ # sudo modprobe rtl8723be ant_sel=2
linux-ondrej:~ # sudo /usr/sbin/iw dev wlan0 scan | egrep “MyNet|signal”
signal: -44.00 dBm
signal: -74.00 dBm
signal: -74.00 dBm
signal: -74.00 dBm
signal: -74.00 dBm
signal: -42.00 dBm
signal: -46.00 dBm
signal: -76.00 dBm

SSID: MyNet
signal: -34.00 dBm
signal: -68.00 dBm
signal: -72.00 dBm
signal: -46.00 dBm
signal: -56.00 dBm
signal: -54.00 dBm
signal: -72.00 dBm
signal: -74.00 dBm
signal: -66.00 dBm

linux-ondrej:~ # sudo modprobe rtl8723be
linux-ondrej:~ # sudo modprobe rtl8723be ant_sel=1
linux-ondrej:~ # sudo /usr/sbin/iw dev wlan0 scan | egrep “MyNet|signal”
signal: -46.00 dBm
signal: -42.00 dBm
signal: -46.00 dBm
signal: -42.00 dBm
signal: -66.00 dBm
signal: -58.00 dBm
signal: -34.00 dBm
SSID: MyNet
signal: -34.00 dBm
signal: -50.00 dBm
signal: -50.00 dBm
signal: -58.00 dBm
signal: -66.00 dBm
signal: -62.00 dBm
signal: -68.00 dBm
signal: -56.00 dBm
signal: -74.00 dBm

It seems here is no difference between antenna 1 and 2.
However, I have thoroughly tested WiFi for many hours during couple of days. Until now I have used mainly wired connection because of unstable WiFi. It appears the stability of WiFi is much better than a month ago. Perhaps as a result of updates?
Thank you again.

Thanks to you all for your help!
I have tested the antenna selection as you suggested. Here is the result:

It seems here is no difference between antenna 1 and 2.
However, I have thoroughly tested WiFi for many hours during couple of days. Until now I have used mainly wired connection because of unstable WiFi. It appears the stability of WiFi is much better than a month ago. Perhaps as a result of updates?
Thank you again.

That could be because your laptop does include two connected antennas. In any case, since you report the wifi link is more stable now nothing further needs to be done for now. Enjoy. :slight_smile:

I just noticed one possible mistake you made - when you attempted to test with 'ant_sel=1" you didn’t unload the driver first based on what you posted here…


linux-ondrej:~ # sudo modprobe rtl8723be
linux-ondrej:~ # sudo modprobe rtl8723be ant_sel=1
linux-ondrej:~ # sudo /usr/sbin/iw dev wlan0 scan | egrep "MyNet|signal"

It should have been ‘modprobe -r rtl8723be’

BTW, always use COD tags when posting output (refer to the ‘#’ button in the forum editor).