Slow speed on Hotspot created from Ubuntu 16.04 with RTL8723BE Wireless Network Adapter

Solution 1:

I think that wifi power management is responsible for the slow speeds, it can be disabled with

echo "options rtl8723be ips=0" | sudo tee -a /etc/modprobe.d/50-rtl8723be.conf
sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
Reboot

Solution 2:

Regarding to https://forum.ubuntuusers.de/topic/w-lan-geht-nicht-auf-laptop-bzw-hat-starke-sch/#post-8108483 (German Forum) the cause might be a setting that you can check and reset.

To check use modinfo -F parm rtl8723be

The output should look like this:

parm:           swlps:bool
parm:           swenc:using hardware crypto (default 0 [hardware]) (bool)
parm:           ips:using no link power save (default 1 is open) (bool)
parm:           fwlps:using linked fw control power save (default 1 is open) (bool)
parm:           msi:Set to 1 to use MSI interrupts mode (default 0) (bool)
parm:           debug:Set debug level (0-5) (default 0) (int)
parm:           disable_watchdog:Set to 1 to disable the watchdog (default 0) (bool)
parm:           ant_sel:Set to 1 or 2 to force antenna number (default 0) (int)

The last line is the interesting one. You can change the value of ant_sel from 0 to 1 to 2. Reboot and check. - You have to try and find out the correct value on your own.

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

I dont know if this resolves your problem, but you could give it a try.

Solution 3:

Check your entropy available:

cat /proc/sys/kernel/random/entropy_avail

from an arch wiki on haveged and entropy:

If [entropy] is rather low (<1000), you should probably install haveged. Otherwise cryptographic applications will block until there is enough entropy available, which eg. could result in slow wlan speed, if your server is a Software access point.

Install haveged:

sudo apt install haveged

Check your wifi speed then start haveged:

sudo service haveged start

Now start your AP and check the speed again. Hopefully your issue should be resolved

Solution 4:

Antennae #2 used to be the solution

Looking back through github bug reports, setting your Wifi to use Antennae #2 used to be the solution on kernels >= to 4.12. One person found success switching it back to Antennae #1 under kernel 4.13:

Ah yes, after finding that my kernel loads a firmware that it didn't before (rtl8723befw_36.bin instead of the regular one) i found this issue, very glad!

As far as i see it, 4.13.7 already includes the patch so no action to be made there. in /etc/modprobe.d/rtl8723be.conf i used to have

options rtl8723be fwlps=0
options rtl8723be ant_sel=2

But now i need to ant_sel=1 for a good signal. took me quite a long time figuring this out.

Lots of reports when Ubuntu HWE (Hardware Enablement Stack) took users from Kernel 4.10 branch to kernel 4.13 branch around January 11, 2018. As far as your attempts to downgrade to kernel 4.10 some have had success. Others report success manually installing kernel 4.14 for RTL non-WiFi problems. Still others stayed on 4.13 kernel branch and used rmmod and modprobe as temporary fixes.

Turn off Network Manager WiFi Power saving

Network Manager Power Saving may be enabled by default. Someone reports disabling it improves speed. Look into the file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf:

[connection]
#wifi.powersave = 3
# Slow speed fix: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1670041
wifi.powersave = 2

Commenting out powersave = 3 and using powersave = 2 disables power saving.

All the available options are:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
  • NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3): enable powersave

Turn off ALL WiFi Power Saving

There are three areas of power saving. To turn off all three use:

cat > /etc/modprobe.d/options-rtl8723be.conf <<EOF
options rtl8723be ips=0 swlps=0 fwlps=0
EOF

Don't download and make old drivers

At one time you had to download source code and make the drivers yourself. This is no longer necessary:

The rtl8723ae and rtl8723be modules are included in the mainline Linux kernel.

If you are using DKMS make sure it's not recompiling an old driver with every kernel update.