Wi fi starts fast; then slows down. Fast again, after closing and re-opening laptop

Asked by Saul Lubkin

I have a laptop, that on starting up has fast wi fi. But after running several processes, it slows down. If I close the laptop (without logging out), and then re-open it, wi fi is fast again.

????

My guess: closing and reopening the laptop disables and then re-enables wi fi; why that helps, and how one can automate this fixing problem (somehow "touching" wi fi) would be better.

Better yet, if wi fi was simply always fast.

  -- Saul

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

sudo lshw -C network; lsb_release -a; uname -a; sudo dmidecode -t 1

Without some information about the system or even the Ubuntu release the above is hard to troubleshoot.

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#2

Alternatively, to speed up wi fi again, teminate wi fi, then restart it.

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#3

sudo lshw -C network; lsb_release -a; uname -a; sudo dmidecode -t 1
[sudo] password for saul:
  *-network
       description: Wireless interface
       product: RTL8188EE Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlo1
       version: 01
       serial: 9c:30:5b:dc:f7:4c
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet
physical wireless
       configuration: broadcast=yes driver=rtl8188ee
driverversion=5.4.0-33-generic firmware=N/A ip=192.168.0.234 latency=0
link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:97 ioport:2000(size=256) memory:90500000-90503fff
  *-network
       description: Ethernet interface
       product: RTL810xE PCI Express Fast Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 08
       serial: 10:e7:c6:e4:38:a4
       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
firmware=rtl8106e-2_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII
       resources: irq:16 ioport:1000(size=256) memory:90404000-90404fff
memory:90400000-90403fff
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
Linux NullA-4 5.4.0-33-generic #37-Ubuntu SMP Thu May 21 12:53:59 UTC 2020
x86_64 x86_64 x86_64 GNU/Linux
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: HP
Product Name: HP 15 Notebook PC
Version: Type1 - ProductConfigId
Serial Number: 5CD811BGXL
UUID: 38444335-3131-4742-584c-10e7c6e438a4
Wake-up Type: Power Switch
SKU Number: N5Y04UA#ABA
Family: 103C_5335KV HP Notebook

On Tue, Jun 9, 2020 at 11:45 AM actionparsnip <
<email address hidden>> wrote:

> Your question #691234 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/691234
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> What is the output of:
>
> sudo lshw -C network; lsb_release -a; uname -a; sudo dmidecode -t 1
>
> Without some information about the system or even the Ubuntu release the
> above is hard to troubleshoot.
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/691234
>
> You received this question notification because you asked the question.
>

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#4

sudo lshw -C network; lsb_release -a; uname -a; sudo dmidecode -t 1
[sudo] password for saul:
  *-network
       description: Wireless interface
       product: RTL8188EE Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlo1
       version: 01
       serial: 9c:30:5b:dc:f7:4c
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtl8188ee driverversion=5.4.0-33-generic firmware=N/A ip=192.168.0.234 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:97 ioport:2000(size=256) memory:90500000-90503fff
  *-network
       description: Ethernet interface
       product: RTL810xE PCI Express Fast Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 08
       serial: 10:e7:c6:e4:38:a4
       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 firmware=rtl8106e-2_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII
       resources: irq:16 ioport:1000(size=256) memory:90404000-90404fff memory:90400000-90403fff
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
Linux NullA-4 5.4.0-33-generic #37-Ubuntu SMP Thu May 21 12:53:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
 Manufacturer: HP
 Product Name: HP 15 Notebook PC
 Version: Type1 - ProductConfigId
 Serial Number: 5CD811BGXL
 UUID: 38444335-3131-4742-584c-10e7c6e438a4
 Wake-up Type: Power Switch
 SKU Number: N5Y04UA#ABA
 Family: 103C_5335KV HP Notebook

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#5

Some more information:

The file

/etc/modprobe.d/iwlwifi.conf

Had been modified on this computer prior to upgrading to Ubuntu 20.04 -- I'm not sure what is the default file. It's current contents are the single line

options iwlwifi 11n_disable=1

What's the default? Perhaps changing back to the default might fix things.

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#6

I've solved my problem -- sort of, by a "cheat" method.. I purchased an inexpensive USB wi fi plugin device -- it plugs into any USB port, and supplies excellent wi fi. -- with a caveat, see below

The native PCI wi fi on my HP laptop has a driver called rtl8188ee. I found that, even with the USB wi fi plugin enabled, I STILL had variable wi fi reception -- starting out excellent, deteriorating to very poor as I used various apps on the computer.

So I blacklisted the native PCI wireless driver on the notebook by entering the line
blacklist rtl8188ee
to the file
/etc/modprobe.d/blacklist.com

After a reboot, only the USB wi fi was available, and was very fast, no matter how many apps were open and running. I've tested it very excessively; it's very good.

BTW, the wi USB plugin that I used worked right out of the box -- no setup needed (except for blacklisting the notebook's native wi fi driver).

  -- Saul

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#7

I ned the binary package: firmware-realtek (20161130-5) [non-free] . It's available for Debina; and includes the file rtl8188ee.bin, which is what I need to make wifi work properly on my HP notebook Ubuntu computer.

I don't know how to download it for Ubuntu.

Help appreciated.

  -- Saul

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

Grab the deb file and you can extract it with:

ar -x filename.deb

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

So the full thing is:

sudo apt-get install unp

wget -O ~/Downloads/firmware.deb http://security.debian.org/debian-security/pool/updates/non-free/f/firmware-nonfree/firmware-realtek_20161130-5~deb8u1_all.deb
cd ~/Downloads
ar -x ./firmware.deb
rm ./firmware.deb
unp ./data.tar.xz

You now have 2 options:
~/Downloads/lib/firmware/rtlwifi/rtl8188efw.bin
~/Downloads/lib/firmware/rtlwifi/rtl8188eufw.bin

I don't know the difference, you may need to rename it to rtl8188ee.bin in /etc/firmware so it gets used too. You'll have to experiment but you've got enough rope to hang yourself with now :)

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#10

Hi actionparsnip!

I did as you suggested -- and then discovered that the directory
/lib/firmware/rtlwifi already exists on the computer, and contains both
files, rtl8188efw.bin and rtl8188eufw.bin. So, I created the hardlink:
sudo ln rtl8188eefw.bin rtl8188ee.bin. (I also removed the line "blacklist
rtl8188ee" from /etc/microprobe.d/blacklist.conf.) Then I rebooted.
The computer had fast wifi for quite a while -- but after enough
computation, it degenerated.
So, I deleted the hardlink, and linked the other file, rtl8188eufw.bin to
rtl8188ee.bin, and rebooted again. This resulted in a system with no wi
fi. So, I went back to the first hardlink choice, and rebooted again.
Again, fast wifi -- so rtl6188efw.bin is much closer to correct.
I purchased a usb WIFi plugin which I've been using with fast wifi -- it
originally required blacklisting rtl8188ee in the blacklist.conf file --
but I've left that line commented out. Perhaps wifi will work best with
the combo of the slightly off rtl8188ee.bin file and the usb plugin. I'll
see how that works. (Maybe instead of linking rtl8188ewf.bin to
rtl8188ee.bin, I should copy the former onto tje latter?)
  -- Saul

On Wed, Jul 1, 2020 at 11:41 AM actionparsnip <
<email address hidden>> wrote:

> Your question #691234 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/691234
>
> actionparsnip proposed the following answer:
> So the full thing is:
>
> sudo apt-get install unp
>
> wget -O ~/Downloads/firmware.deb
> http://security.debian.org/debian-security/pool/updates/non-free/f/firmware-nonfree/firmware-realtek_20161130-5~deb8u1_all.deb
> cd ~/Downloads
> ar -x ./firmware.deb
> rm ./firmware.deb
> unp ./data.tar.xz
>
> You now have 2 options:
> ~/Downloads/lib/firmware/rtlwifi/rtl8188efw.bin
> ~/Downloads/lib/firmware/rtlwifi/rtl8188eufw.bin
>
> I don't know the difference, you may need to rename it to rtl8188ee.bin
> in /etc/firmware so it gets used too. You'll have to experiment but
> you've got enough rope to hang yourself with now :)
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/691234/+confirm?answer_id=8
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/691234
>
> You received this question notification because you asked the question.
>

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#11

In an archlinux forum, someone with an HP notebook with an rtl8188ee wifi driver had a very similar problem.
The following was suggested:

Your card is probably a RTL8821CE, not RTL8188ee. You most likely need the driver from the AUR: rtl8821ce-dkms-git

The HP owner did that, and claimed that that solved his problem.

What would be the analogous thing to try in Ubuntu 20.04?

  -- Saul

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#12

Can't hurt to try

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

If you want to install a RTL8821CE driver on Ubuntu you can follow https://medium.com/@kimiyukiyukawa/installing-rtl8821ce-network-controller-on-ubuntu-335d8ccb8a92

Up to now I have never heard that a system would confuse RTL8821CE and RTL8188ee devices.

What is he output of
lspci -nnk | grep -i net -A2

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#14

lspci -nnk | grep -i net -A2
02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8188EE Wireless Network Adapter [10ec:8179] (rev 01)
 DeviceName: Realtek 802.11 b/g/n w/ *2 antennas
 Subsystem: Hewlett-Packard Company RTL8188EE mini-PCIe card [103c:197d]
--
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller [10ec:8136] (rev 08)
 Subsystem: Hewlett-Packard Company RTL810xE PCI Express Fast Ethernet controller [103c:21de]
 Kernel driver in use: r8169
 Kernel modules: r8169

Revision history for this message
Manfred Hampl (m-hampl) said :
#15

You might eventually try adding driver options, e.g.
echo "options rtl8188ee ips=0 fwlps=0" | sudo tee /etc/modprobe.d/rtl8188ee.conf

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#16

I don't see any evidence for an RTL8821CE device.

Also, the file /etc/modprobe.d/rtl8188ee.conf already contains those two lines. The full file is:

options rtl8188ee ant_sel=2
#options rtl8188ee aspm=1
options rtl8188ee aspm=0
options rtl8188ee debug_level=0
options rtl8188ee debug_mask=0
options rtl8188ee disable_watchdog=N
options rtl8188ee fwlps=N
#options rtl8188ee ips=Y
options rtl8188ee ips=N
#options rtl8188ee msi=Y
options rtl8188ee msi=N
options rtl8188ee swenc=N
#options rtl8188ee swlps=N

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

Next idea:

If putting the laptop to suspend and waking up again helps, then just disabling and re-enabling the WLAN device might also help.

Possible commands
sudo modprobe -rv rtl8188ee
sudo modprobe -v rtl8188ee

or

sudo rfkill block wlo1
sudo rfkill unblock wlo1

or
use the network control menu in the top right corner to disable /re-enable WLAN.

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#18

Hi Manfred!

Yes; of course that works; it's easier than open and closing the laptop and re-entering my password -- but wifi gets slow again after using the computer a bit.

Thanks for the useful suggestion -- but the idea is to keep wifi going fast while working on the computer -- when an operation takes a while, one doesn't know if it's because of very slow wifi, or if it's due to a slow program.

What has been working consistently, is a small USB plugin that provides wifi, when I also blacklist rtl8188ee in /etc/modprobe.d/blacklist.conf.

I imagine that eventually there will be better drivers for HP laptops running Ubuntu.

But thanks for the useful information.

  -- Saul

Can you help with this problem?

Provide an answer of your own, or ask Saul Lubkin for more information if necessary.

To post a message you must log in.