I don't have an exact answer but I have the same wi-fi adapter (RTL8188ee) and I want to share my investigation.
In short, try to go to your Network Configuration and choose BSSID, press OK button and reconnect. This variant won't work if you use wi-fi roaming. If you use archlinux you can install networkmanager-noscan
The idea is to disable background wi-fi scanning that doesn't work properly and has errors. Maybe there are another ways to disable the scanning, try to find these variants if needed.
The source the solution is here
Firstly, there is a list of commands that can help you reveal a reason of the problem.
- Look at firmware info in a log file and find realtek or rtl words. rtl is an abbreviation of realtek.
dmesg | grep -i firm
or
dmesg | grep -i firmware
or
dmesg | grep rtl
- Look at a list of network cards.
sudo lshw -class network
- Look at systemd journal and find an info about NetworkManager.
journalctl $(type -p NetworkManager)
- Look at your wi-fi module (driver) available option list.
user@user-PC:~$ modinfo rtl8188ee
filename: /lib/modules/4.18.0-17-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rtl8188ee.ko
firmware: rtlwifi/rtl8188efw.bin
description: Realtek 8188E 802.11n PCI wireless
license: GPL
author: Larry Finger <Larry.Finger@lwfinger.net>
author: Realtek WlanFAE <wlanfae@realtek.com>
author: zhiyuan_yang <zhiyuan_yang@realsil.com.cn>
srcversion: 69B74227D1AF7CF8C664053
alias: pci:v000010ECd00008179sv*sd*bc*sc*i*
depends: rtlwifi,rtl_pci,mac80211
retpoline: Y
intree: Y
name: rtl8188ee
vermagic: 4.18.0-17-generic SMP mod_unload
signat: PKCS#7
signer:
sig_key:
sig_hashalgo: md4
parm: swenc:Set to 1 for software crypto (default 0)
(bool)
parm: ips:Set to 0 to not use link power save (default 1)
(bool)
parm: swlps:Set to 1 to use SW control power save (default 0)
(bool)
parm: fwlps:Set to 1 to use FW control power save (default 1)
(bool)
parm: msi:Set to 1 to use MSI interrupts mode (default 1)
(bool)
parm: aspm:Set to 1 to enable ASPM (default 1)
(int)
parm: debug_level:Set debug level (0-5) (default 0) (int)
parm: debug_mask:Set debug mask (default 0) (ullong)
parm: disable_watchdog:Set to 1 to disable the watchdog (default 0)
(bool)
You can add these options to /etc/modprobe.d/rtl8188ee.conf
file. If there is no such file then you should create the file sudo touch /etc/modprobe.d/rtl8188ee.conf
For example, we can disable power saving like that:
options rtl8188ee ips=0 swlps=0 fwlps=0 aspm=0
- You can look at exact module (driver) name with these commands.
sudo apt install ethtool # install an utility
sudo lshw -class network # find a value of "logical name:" field (e.g. wlp19s0)
ethtool -i wlp19s0 | grep driver # use the value of "logical name:" in the command (e.g. wlp19s0)
An example of that where rtl8188ee is a name of a module (driver).
user@user-PC:~$ sudo lshw -class network
*-network
description: Ethernet interface
product: RTL810xE PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:07:00.0
logical name: enp7s0
version: 07
serial: dc:4a:3e:d3:2e:f5
size: 10Mbit/s
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:18 ioport:5000(size=256) memory:d6000000-d6000fff memory:d6100000-d6103fff
*-network
description: Wireless interface
product: RTL8188EE Wireless Network Adapter
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:13:00.0
logical name: wlp19s0
version: 01
serial: 26:70:f9:cd:0e:3c
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rtl8188ee driverversion=4.18.0-17-generic firmware=N/A ip=192.168.1.3 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:48 ioport:3000(size=256) memory:d3000000-d3003fff
user@user-PC:~$ ethtool -i wlp19s0 | grep driver
driver: rtl8188ee
Set wi-fi region to use local area frequency.
Open /etc/default/crda
file and set REGDOMAIN=
to REGDOMAIN=RU
for Russia (use a value of your country). List of REGDOMAIN values you can find here https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
Reboot your system.
There is a case when your wi-fi module can have only one wi-fi antenna instead of two antennas. But wi-fi driver algorithms work as for two wi-fi antennas.
See:
https://askubuntu.com/a/1018851
https://askubuntu.com/a/883688
https://askubuntu.com/a/1079892
In short, you should add options ant_sel=1
or options ant_sel=2
to /etc/modprobe.d/rtl8188ee.conf
and reboot your system.
You can to try install a newer driver from the driver developer repository, see https://github.com/lwfinger/rtlwifi_new
You can try to disable power saving https://unix.stackexchange.com/a/315400
In addition, you can disable module (driver) power saving by adding options rtl8188ee ips=0 swlps=0 fwlps=0 aspm=0
to /etc/modprobe.d/rtl8188ee.conf
and rebooting your system.
The possible reason of the error is an background wi-fi scaning. As I understood there is an error in the driver but NetworkManager try to call this buggy background scanning anyway.
You can lock BSSID by setting it explicitly in your system Network Configurer to prevent this buggy background scanning or you can install networkmanager-noscan if you use Archlinux.
Secondly, my experience.
I have tried all of these options except installing newer version of the driver from https://github.com/lwfinger/rtlwifi_new
Now I locked BSSID and all works fine for a while. To lock BSSID just choose a value from a list in your GUI network configurer. See https://askubuntu.com/a/834013/813587
journalctl $(type -p NetworkManager)
– waltinator Oct 05 '18 at 17:40