Problematic RTL8188EE Wireless Network Adapter

Good Day All,
There are numerous results when searching google on this issue, however, none seem to have a solution.
I have read until my eyes bleed and banged my head on the table more than once! :slight_smile:

I am hoping to resolve this issue -- or at least have a decent workaround.
It is a real pain not to be able to put my laptop in standby knowing that if I do, I will have to reboot to regain my wireless connectivity.

I have copied snippets from **lshw** which first shows what type of system we are dealing with and then the state that the
wireless adapter is left in after going into sleep mode.

Unloading and reloading the drivers, obviously, has no effect. The card stays disabled.

My question:
Is there a way (via scripting or creating a small piece of executable code) to access the hardware, turn the wireless adapter back on,
and reload the drivers to regain connectivity without rebooting?

I am using Fedora 21 with the most recent kernel updates...

I can provide whatever other information that might be needed for this project very expeditiously.
Many people will be benefited by a workaround for this issue.

Code snippets...

root@redbrick /home/redbrick: uname -a
Linux redbrick 3.19.5-200.fc21.x86_64 #1 SMP Mon Apr 20 19:51:56 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    redbrick                  
    description: Notebook
    product: HP Pavilion 15 Notebook PC (L0Q40UA#ABA)
    vendor: Hewlett-Packard
    version: 0971120002405F10000620180
    serial: 5CD5091N1V
    width: 64 bits
    capabilities: smbios-2.7 dmi-2.7 vsyscall32
    configuration: administrator_password=disabled boot=normal chassis=notebook family=103C_5335KV G=N L=CON B=HP S=PAV X=Null sku=L0Q40UA#ABA uuid=35434435-3039-314E-3156-D0BF9C8A3141
     *-core
       description: Motherboard
       product: 2293
       vendor: Hewlett-Packard
       physical id: 0
       version: 78.21
       serial: PEWMT028J8A0XM
       slot: Type2 - Board Chassis Location
     *-firmware
          description: BIOS
          vendor: Insyde
          physical id: 0
          version: F.36
          date: 02/02/2015
          size: 128KiB
          capacity: 6080KiB
          capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
         *-cpu
          description: CPU
          product: Core i7 (To Be Filled By O.E.M.)
          vendor: Intel Corp.
          physical id: 4
          bus info: cpu@0
          version: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
          serial: To Be Filled By O.E.M.
          slot: U3E1
          size: 2981MHz
          capacity: 3GHz
          width: 64 bits
          clock: 100MHz
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt cpufreq
          configuration: cores=2 enabledcores=2 threads=4

     *-network DISABLED
                description: Wireless interface
                product: RTL8188EE Wireless Network Adapter
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:08:00.0
                logical name: wlo1
                version: 01
                serial: ac:d1:b8:3f:24:d2
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
                configuration: broadcast=yes driver=rtl8188ee driverversion=3.19.5-200.fc21.x86_64 firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn
                resources: irq:53 ioport:4000(size=256) memory:c3100000-c3103fff

What modules are loaded to deal with this adapter? You may need to rmmod them, modprobe them, and restart the service for that network device.

It may be simply buggy, however. Realtek is at least enthusiastic for linux, but as for actual quality, their drivers are very poor.

1 Like

Thank you for your reply.

Previously, I had only unsed modprobe for removing and reloading the drivers.
I will try rmmod to see if that uses a different (maybe more thorough) method.
Using modprobe didn't work because the card itself somehow became "disabled" in the suspend process.
I started to wonder if there wasn't something like an internal "wake up" signal that I could send to the adapter, from a terminal,
that would allow the driver reload to be effective.

That is what prompted my post.

This has been on the RedHat bug list for a long time.
I am hoping to find some kind of a workaround until they get it fixed.

Roger

Probably not.

Suspend in linux tends to work badly with buggy drivers.

1 Like

Try this -- unload the driver before you suspend.

1 Like

hmmmmm. Definitely. Hadn't thought of that!

---------- Post updated at 03:26 PM ---------- Previous update was at 02:28 PM ----------

I forgot to answer you question about the modules involved...

root@redbrick /home/redbrick: modprobe -av rtl8188ee
insmod /lib/modules/3.19.5-200.fc21.x86_64/kernel/net/wireless/cfg80211.ko.xz 
insmod /lib/modules/3.19.5-200.fc21.x86_64/kernel/net/mac80211/mac80211.ko.xz 
insmod /lib/modules/3.19.5-200.fc21.x86_64/kernel/drivers/net/wireless/rtlwifi/rtlwifi.ko 
insmod /lib/modules/3.19.5-200.fc21.x86_64/kernel/drivers/net/wireless/rtlwifi/rtl8188ee/rtl8188ee.ko

---------- Post updated at 03:38 PM ---------- Previous update was at 03:26 PM ----------

We'll I unloaded the driver stack prior to suspend.
Then I opened the lid of the laptop and ran:

redbrick@redbrick ~: sudo modprobe -av rtl8188ee
insmod /lib/modules/3.19.5-200.fc21.x86_64/kernel/net/wireless/cfg80211.ko.xz 
insmod /lib/modules/3.19.5-200.fc21.x86_64/kernel/net/mac80211/mac80211.ko.xz 
insmod /lib/modules/3.19.5-200.fc21.x86_64/kernel/drivers/net/wireless/rtlwifi/rtlwifi.ko 
insmod /lib/modules/3.19.5-200.fc21.x86_64/kernel/drivers/net/wireless/rtlwifi/rtl8188ee/rtl8188ee.ko 

redbrick@redbrick ~: sudo lshw | grep network
           *-network DISABLED
           *-network

It appears that it is not the driver stack that is causing the card to become disabled...

Maybe it the ACPI??

I did notice that the system log shows a notice that the generic ACPI should be replaced by a proprietary driver if available...

May 25 15:29:10 redbrick kernel: ACPI Warning: SystemIO range 0x0000000000006040-0x000000000000605f conflicts with OpRegion 0x0000000000006040-0x000000000000604f (\_SB_.PCI0.SBUS.SMBI) (20141107/utaddress-258)
May 25 15:29:10 redbrick kernel: ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver

Thoughts?

Did you restart the network service? The driver doesn't do everything by itself.

1 Like

Duuuuuuhhhh. No I didn't. Let me do that....

---------- Post updated at 06:42 PM ---------- Previous update was at 06:29 PM ----------

After restarting NetworkManager I got:

root@redbrick /home/redbrick: systemctl status NetworkManager
 NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled)
   Active: active (running) since Mon 2015-05-25 18:38:04 CDT; 1min 55s ago
 Main PID: 4735 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           4735 /usr/sbin/NetworkManager --no-daemon
           4965 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-eno1.pid -lf /var/lib/NetworkManager/dhclient-81788e24-85a9-4795-a271-b...

May 25 18:39:54 redbrick NetworkManager[4735]: <info>  (eno1): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
May 25 18:39:54 redbrick NetworkManager[4735]: <info>  Activation (eno1) Stage 5 of 5 (IPv4 Commit) complete.
May 25 18:39:54 redbrick NetworkManager[4735]: <info>  (eno1): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
May 25 18:39:54 redbrick NetworkManager[4735]: <info>  (eno1): device state change: secondaries -> activated (reason 'none') [90 100 0]
May 25 18:39:54 redbrick NetworkManager[4735]: <info>  NetworkManager state is now CONNECTED_LOCAL
May 25 18:39:54 redbrick dhclient[4965]: bound to 10.19.58.7 -- renewal in 1623 seconds.
May 25 18:39:54 redbrick NetworkManager[4735]: <info>  NetworkManager state is now CONNECTED_SITE
May 25 18:39:54 redbrick NetworkManager[4735]: <info>  Policy set 'eno1' (eno1) as default for IPv4 routing and DNS.
May 25 18:39:54 redbrick NetworkManager[4735]: <info>  Activation (eno1) successful, device activated.
May 25 18:39:55 redbrick NetworkManager[4735]: <info>  NetworkManager state is now CONNECTED_GLOBAL

Nothing in here about the wireless side and I cannot use the interface to turn it on. It goes on for just a half-sec and then goes off again...

BTW, I really appreciate your engaging in this issue with me. :slight_smile:

---------- Post updated at 06:46 PM ---------- Previous update was at 06:42 PM ----------

Notice the following information provided when I attempt to run:

root@redbrick /home/redbrick: ifdown wlo1 ; ifup wlo1

(process:5140): libnm-glib-WARNING **: async_got_type: could not read properties for /org/freedesktop/NetworkManager/ActiveConnection/3: Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist

Error: Connection activation failed: Creating object for path '/org/freedesktop/NetworkManager/ActiveConnection/3' failed in libnm-glib.
root@redbrick /home/redbrick: ifconfig
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.19.58.7  netmask 255.255.255.0  broadcast 10.19.58.255
        inet6 fe80::d2bf:9cff:fe8a:3141  prefixlen 64  scopeid 0x20<link>
        ether d0:bf:9c:8a:31:41  txqueuelen 1000  (Ethernet)
        RX packets 17834  bytes 11801582 (11.2 MiB)
        RX errors 0  dropped 55  overruns 0  frame 0
        TX packets 14598  bytes 1834307 (1.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 380  bytes 30696 (29.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 380  bytes 30696 (29.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 82:0c:61:4e:7d:0d  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Are we onto something here???

I've heard that the early Pavilion BIOS's could be buggy. Have you got the latest BIOS?

Is there anything in the BIOS such as "allow the O/S to turn off this device"? If so, disallow that to keep the wifi adapter power on.

Failing that, it's to do with the suspend function of your O/S and finding a way to not power down the wifi adapter.

(O/S's failing to reconnect through wifi adapters which have been powered off and then back on is quite common).

1 Like

I do believe that I saw something while going through the journal errors about the bios... I need to go back and look at it again.
Thank you very much for the reply!:slight_smile:

---------- Post updated at 12:09 PM ---------- Previous update was at 09:12 AM ----------

After a reboot I could get the the wifi interface to go up and down and it was able to reconnect as required in spite of the following errors...

root@redbrick /home/redbrick: ifdown wlo1
root@redbrick /home/redbrick: ifup wlo1
Error: Connection activation failed.
root@redbrick /home/redbrick: ifdown wlo1
root@redbrick /home/redbrick: ifup wlo1
Error: Timeout 90 sec expired.

So, it definitely looks like a standby process specifically turning off the wifi card and the resume process either cant or doesn't turn it back on...

---------- Post updated at 12:21 PM ---------- Previous update was at 12:09 PM ----------

BTW I did try to change the parameters on the modules and switch the power control to software controlled on; but I could not get the hardware control to turn off...
I now have a file in /etc/modprobe.d that contains those entries so that they are effective every boot.

root@redbrick /home/redbrick: modprobe rtl8188ee ips=0 swlps=1 hwlps=0
root@redbrick /home/redbrick: modinfo rtl8188ee | grep parm
parm:           swenc:Set to 1 for software crypto (default 0)
parm:           ips:Set to 0 to not use link power save (default 1)
parm:           swlps:Set to 1 to use SW control power save (default 0)
parm:           fwlps:Set to 1 to use FW control power save (default 1)
parm:           msi:Set to 1 to use MSI interrupts mode (default 1)
parm:           debug:Set debug level (0-5) (default 0) (int)
parm:           disable_watchdog:Set to 1 to disable the watchdog (default 0)

I think I will try setting debug to 5 and the MSI parameter to 0 and trying again....

It may not be possible to fix a buggy driver by fiddling with a buggy driver. The problem may be the driver itself. A kernel upgrade might help or might not, but would be rather drastic.

It's quite possible the problem is specific to your model of laptop, as well. Manufacturers have a choice of how they attach the wiring to the wireless adaptor, and put whatever workarounds they need into the Windows driver, and Linux has to find out the difference the hard way. (This is why laptop hardware so often has its own particular drivers instead of using the manufacturer's generic ones.) Search for discussions on your exact laptop model.

1 Like

lol yep. I think you are right! :slight_smile:
Well, it looks like my options are to:

  1. Wait it out -- maybe they will get this eventually straightened out,
  2. Replace the wifi card in the laptop to a known good one
  3. Get a different laptop
  4. Live with it

I couldn't change some of the parameters using modprobe -- they wouldn't take.

---------- Post updated at 12:51 PM ---------- Previous update was at 12:47 PM ----------

@Corona688
Thanks for your help. I like working things out and having someone there to bounce ideas off of as I work toward a resolution.

By the way, I did get my disaster recovery script almost finished -- turns out I do not have to create all of the partitions from scratch using sgdisk... :slight_smile:

Replacing the wifi card in your laptop probably isn't an option. Most laptops are programmed to freak out and refuse to boot if you do so, due to FCC regulations. Weird workarounds like disconnecting the detect pin until it boots have been done, but won't work with modern PCIE cards as far as I know.

Using a USB or other kind of external card is okay of course.

Yeah, after some research I'm finding out that there is a whitelist in the BIOS that only allows certain types of cards to be plugged in. typically this involves buying one of their way more expensive cards to replace it.