pvaret / rtl8192cu-fixes

Realtek 8192 chipset driver, ported to kernel 3.11.
800 stars 208 forks source link

Kubuntu 17.10, 4.13 kernel: awful performance #123

Closed Vantuz closed 6 years ago

Vantuz commented 6 years ago

My dongle is ASUSTek USB-N13 rev. B1. I was using this driver on Kubuntu 16.10 and 17.04 without any problems. Recently I did a fresh install of Kubuntu 17.10 and installed this driver. But performance is wery bad: it is like sometimes it just hangs and stops transfering any data (but stays connected to AP), after like ~30-60 seconds it starts working again but it is really annoying. You can see this effect in this ping output. Notice the huge difference in timings for some packets

PING ya.ru (87.250.250.242) 56(84) bytes of data.
64 bytes from ya.ru (87.250.250.242): icmp_seq=1 ttl=50 time=21.4 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=2 ttl=50 time=22.5 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=3 ttl=50 time=21.2 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=4 ttl=50 time=23.5 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=5 ttl=50 time=19.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=6 ttl=50 time=20.8 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=7 ttl=50 time=20.7 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=8 ttl=50 time=20.8 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=9 ttl=50 time=22.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=10 ttl=50 time=24.4 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=11 ttl=50 time=20.7 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=12 ttl=50 time=21.3 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=13 ttl=50 time=21.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=14 ttl=50 time=1091 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=15 ttl=50 time=64.4 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=16 ttl=50 time=22.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=17 ttl=50 time=22.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=18 ttl=50 time=6616 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=19 ttl=50 time=9158 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=20 ttl=50 time=8149 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=21 ttl=50 time=7163 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=22 ttl=50 time=11687 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=23 ttl=50 time=10663 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=24 ttl=50 time=9642 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=25 ttl=50 time=8641 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=26 ttl=50 time=7626 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=27 ttl=50 time=6602 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=28 ttl=50 time=5598 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=29 ttl=50 time=4601 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=30 ttl=50 time=3575 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=31 ttl=50 time=2551 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=32 ttl=50 time=1527 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=33 ttl=50 time=508 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=34 ttl=50 time=26.9 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=35 ttl=50 time=24.6 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=36 ttl=50 time=565 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=37 ttl=50 time=22.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=38 ttl=50 time=21.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=39 ttl=50 time=19.7 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=40 ttl=50 time=21.7 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=41 ttl=50 time=20.2 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=42 ttl=50 time=984 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=43 ttl=50 time=25.2 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=44 ttl=50 time=24.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=45 ttl=50 time=61.3 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=46 ttl=50 time=22.4 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=47 ttl=50 time=20.7 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=48 ttl=50 time=2708 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=50 ttl=50 time=2099 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=51 ttl=50 time=2626 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=52 ttl=50 time=1615 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=53 ttl=50 time=824 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=54 ttl=50 time=278 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=55 ttl=50 time=2104 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=56 ttl=50 time=1320 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=57 ttl=50 time=1599 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=58 ttl=50 time=798 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=59 ttl=50 time=119 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=60 ttl=50 time=36.9 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=61 ttl=50 time=6767 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=62 ttl=50 time=6736 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=63 ttl=50 time=5712 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=64 ttl=50 time=4693 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=65 ttl=50 time=3669 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=66 ttl=50 time=2653 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=67 ttl=50 time=1629 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=68 ttl=50 time=642 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=69 ttl=50 time=455 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=70 ttl=50 time=24.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=71 ttl=50 time=20.7 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=72 ttl=50 time=21.3 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=73 ttl=50 time=29.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=74 ttl=50 time=516 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=75 ttl=50 time=986 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=76 ttl=50 time=118 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=77 ttl=50 time=1061 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=78 ttl=50 time=74.5 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=79 ttl=50 time=22.9 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=80 ttl=50 time=21.5 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=81 ttl=50 time=21.3 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=82 ttl=50 time=21.5 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=83 ttl=50 time=21.5 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=84 ttl=50 time=21.3 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=85 ttl=50 time=23.3 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=86 ttl=50 time=20.8 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=87 ttl=50 time=40.3 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=88 ttl=50 time=25.8 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=89 ttl=50 time=21.6 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=90 ttl=50 time=20.2 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=91 ttl=50 time=21.2 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=92 ttl=50 time=51.7 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=93 ttl=50 time=19.6 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=95 ttl=50 time=3554 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=96 ttl=50 time=2534 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=98 ttl=50 time=13631 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=99 ttl=50 time=12690 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=100 ttl=50 time=11674 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=101 ttl=50 time=10650 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=102 ttl=50 time=9630 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=103 ttl=50 time=8610 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=104 ttl=50 time=7591 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=105 ttl=50 time=6576 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=106 ttl=50 time=5729 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=107 ttl=50 time=4718 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=108 ttl=50 time=3694 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=109 ttl=50 time=2675 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=110 ttl=50 time=1655 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=111 ttl=50 time=631 ms
^C
--- ya.ru ping statistics ---
112 packets transmitted, 108 received, 3% packet loss, time 112071ms
rtt min/avg/max/mdev = 19.120/2465.103/13631.494/3537.638 ms, pipe 14

I applyed the disable powermanagement fix, bit it didn't help. Also, in Readme.md I can see

As it currently stands, the driver doesn't populate /proc with informational data from the driver.

I don't really understand what it means cause I am new to linux but Plasma has nice widget with graph which displays connection speed, and on 16.10 and 17.04 this graph was filled with nothing as it didn't have any info about connection speed, but now I can see this: img

Some info about my system:


########## wireless info START ##########

Report from: 07 Nov 2017 20:26 MSK +0300

Booted last: 07 Nov 2017 00:00 MSK +0300

Script from: 25 Mar 2017 07:04 UTC +0000

##### release ###########################

Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:    17.10
Codename:   artful

##### kernel ############################

Linux 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Parameters: ro, quiet, splash, vt.handoff=7

##### desktop ###########################

/usr/share/xsessions/plasma

##### lspci #############################

00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8]
    Subsystem: ASRock Incorporation Ethernet Connection (2) I219-V [1849:15b8]
    Kernel driver in use: e1000e

##### lsusb #############################

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 09da:054f A4Tech Co., Ltd. 
Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 003: ID 0461:4d0f Primax Electronics, Ltd HP Optical Mouse
Bus 001 Device 006: ID 0ac8:c40a Z-Star Microelectronics Corp. 
Bus 001 Device 002: ID 0b05:17ab ASUSTek Computer, Inc. USB-N13 802.11n Network Adapter (rev. B1) [Realtek RTL8192CU]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

##### PCMCIA card info ##################

##### rfkill ############################

0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

##### lsmod #############################

8192cu                536576  0
mac80211              778240  0
cfg80211              610304  1 mac80211
wmi                    24576  0

##### interfaces ########################

auto lo
iface lo inet loopback

##### ifconfig ##########################

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback <MAC address> brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether <MAC 'enp0s31f6' [IF1]> brd <MAC address>
3: wlx<IF from MAC [IF2]>: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether <MAC 'wlx<IF from MAC [IF2]>' [IF2]> brd <MAC address>
    inet 192.168.1.6/24 brd 192.168.1.255 scope global dynamic wlx<IF from MAC [IF2]>
       valid_lft 42419sec preferred_lft 42419sec
    inet6 fe80::6654:b060:ff6:3b03/64 scope link 
       valid_lft forever preferred_lft forever

##### iwconfig ##########################

lo        no wireless extensions.

enp0s31f6  no wireless extensions.

wlx<IF from MAC [IF2]>  IEEE 802.11bgn  ESSID:"WTFnet"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.437 GHz  Access Point: <MAC 'WTFnet' [AC1]>   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=100/100  Signal level=72/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

##### route #############################

default via 192.168.1.1 dev wlx<IF from MAC [IF2]> proto static metric 600 
169.254.0.0/16 dev wlx<IF from MAC [IF2]> scope link metric 1000 
192.168.1.0/24 dev wlx<IF from MAC [IF2]> proto kernel scope link src 192.168.1.6 metric 600 

##### resolv.conf #######################

nameserver 127.0.0.53

search lan

##### network managers ##################

Installed:

    NetworkManager

Running:

root       885     1  0 20:02 ?        00:00:01 /usr/sbin/NetworkManager --no-daemon

##### NetworkManager info ###############

GENERAL.DEVICE:                         wlx<IF from MAC [IF2]>
GENERAL.TYPE:                           wifi
GENERAL.NM-TYPE:                        NMDeviceWifi
GENERAL.VENDOR:                         Realtek
GENERAL.PRODUCT:                        802.11n WLAN Adapter
GENERAL.DRIVER:                         rtl8192cu
GENERAL.DRIVER-VERSION:                 --
GENERAL.FIRMWARE-VERSION:               --
GENERAL.HWADDR:                         <MAC 'wlx<IF from MAC [IF2]>' [IF2]>
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.REASON:                         0 (No reason given)
GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/net/wlx<IF from MAC [IF2]>
GENERAL.IP-IFACE:                       wlx<IF from MAC [IF2]>
GENERAL.IS-SOFTWARE:                    no
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     WTFnet
GENERAL.CON-UUID:                       5cf3c719-2c0c-424a-bffd-b7f549a0b273
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/6
GENERAL.METERED:                        no (guessed)
CAPABILITIES.CARRIER-DETECT:            no
CAPABILITIES.SPEED:                     72 Mb/s
CAPABILITIES.IS-SOFTWARE:               no
CAPABILITIES.SRIOV:                     no
WIFI-PROPERTIES.WEP:                    yes
WIFI-PROPERTIES.WPA:                    yes
WIFI-PROPERTIES.WPA2:                   yes
WIFI-PROPERTIES.TKIP:                   yes
WIFI-PROPERTIES.CCMP:                   yes
WIFI-PROPERTIES.AP:                     no
WIFI-PROPERTIES.ADHOC:                  yes
WIFI-PROPERTIES.2GHZ:                   yes
WIFI-PROPERTIES.5GHZ:                   no
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/{1,2}
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   (null) | (null)
CONNECTIONS.AVAILABLE-CONNECTIONS[2]:   5cf3c719-2c0c-424a-bffd-b7f549a0b273 | WTFnet
IP4.ADDRESS[1]:                         192.168.1.6/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]:                             192.168.1.1
IP4.DOMAIN[1]:                          lan
DHCP4.OPTION[1]:                        requested_subnet_mask = 1
DHCP4.OPTION[2]:                        requested_rfc3442_classless_static_routes = 1
DHCP4.OPTION[3]:                        subnet_mask = 255.255.255.0
DHCP4.OPTION[4]:                        domain_name_servers = 192.168.1.1
DHCP4.OPTION[5]:                        ip_address = 192.168.1.6
DHCP4.OPTION[6]:                        requested_static_routes = 1
DHCP4.OPTION[7]:                        dhcp_server_identifier = 192.168.1.1
DHCP4.OPTION[8]:                        requested_time_offset = 1
DHCP4.OPTION[9]:                        broadcast_address = 192.168.1.255
DHCP4.OPTION[10]:                       requested_interface_mtu = 1
DHCP4.OPTION[11]:                       dhcp_rebinding_time = 37800
DHCP4.OPTION[12]:                       requested_domain_name_servers = 1
DHCP4.OPTION[13]:                       dhcp_message_type = 5
DHCP4.OPTION[14]:                       requested_broadcast_address = 1
DHCP4.OPTION[15]:                       routers = 192.168.1.1
DHCP4.OPTION[16]:                       dhcp_renewal_time = 21600
DHCP4.OPTION[17]:                       requested_domain_name = 1
DHCP4.OPTION[18]:                       domain_name = lan
DHCP4.OPTION[19]:                       requested_routers = 1
DHCP4.OPTION[20]:                       expiry = 1510117994
DHCP4.OPTION[21]:                       host_name = DESKTOP-0TJEJBJ
DHCP4.OPTION[22]:                       requested_netbios_scope = 1
DHCP4.OPTION[23]:                       requested_wpad = 1
DHCP4.OPTION[24]:                       requested_ms_classless_static_routes = 1
DHCP4.OPTION[25]:                       requested_netbios_name_servers = 1
DHCP4.OPTION[26]:                       network_number = 192.168.1.0
DHCP4.OPTION[27]:                       requested_domain_search = 1
DHCP4.OPTION[28]:                       next_server = 192.168.1.1
DHCP4.OPTION[29]:                       requested_ntp_servers = 1
DHCP4.OPTION[30]:                       requested_host_name = 1
DHCP4.OPTION[31]:                       dhcp_lease_time = 43200
IP6.ADDRESS[1]:                         fe80::6654:b060:ff6:3b03/64
IP6.GATEWAY:                            --

GENERAL.DEVICE:                         enp0s31f6
GENERAL.TYPE:                           ethernet
GENERAL.NM-TYPE:                        NMDeviceEthernet
GENERAL.VENDOR:                         Intel Corporation
GENERAL.PRODUCT:                        Ethernet Connection (2) I219-V
GENERAL.DRIVER:                         e1000e
GENERAL.DRIVER-VERSION:                 3.2.6-k
GENERAL.FIRMWARE-VERSION:               0.2-4
GENERAL.HWADDR:                         <MAC 'enp0s31f6' [IF1]>
GENERAL.MTU:                            1500
GENERAL.STATE:                          20 (unavailable)
GENERAL.REASON:                         2 (Device is now managed)
GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:1f.6/net/enp0s31f6
GENERAL.IP-IFACE:                       --
GENERAL.IS-SOFTWARE:                    no
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     --
GENERAL.CON-UUID:                       --
GENERAL.CON-PATH:                       --
GENERAL.METERED:                        unknown
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               no
CAPABILITIES.SRIOV:                     no
WIRED-PROPERTIES.CARRIER:               off
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: --

SSID           BSSID              MODE   CHAN  FREQ      RATE       SIGNAL  BARS  SECURITY   ACTIVE  * 
WTFnet         <MAC 'WTFnet' [AC1]>  Infra  6     2437 MHz  8 Mbit/s   72      ▂▄▆_  WPA2       yes     * 
Obit225        <MAC 'Obit225' [AC5]>  Infra  11    2462 MHz  8 Mbit/s   46      ▂▄__  WPA2       no        
RT-WiFi_232    <MAC 'RT-WiFi_232' [AC2]>  Infra  2     2417 MHz  44 Mbit/s  45      ▂▄__  WPA1 WPA2  no        
522CAM         <MAC '522CAM' [AC3]>  Infra  2     2417 MHz  22 Mbit/s  44      ▂▄__  WPA2       no        
newlive        <MAC 'newlive' [AC4]>  Infra  8     2447 MHz  44 Mbit/s  42      ▂▄__  WPA2       no        
DIR-615        <MAC 'DIR-615' [AN6]>  Infra  13    2472 MHz  44 Mbit/s  42      ▂▄__  WPA2       no        
Keenetic-1976  <MAC 'Keenetic-1976' [AN7]>  Infra  11    2462 MHz  44 Mbit/s  38      ▂▄__  WPA2       no        

##### NetworkManager.state ##############

[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true

##### NetworkManager.conf ###############

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

##### NetworkManager profiles ###########

[[/etc/NetworkManager/system-connections/WTFnet]] (600 root)
[connection] id=WTFnet | type=wifi | permissions=user:kubuntu:;
[wifi] mac-address=<MAC 'wlx<IF from MAC [IF2]>' [IF2]> | mac-address-blacklist= | ssid=WTFnet
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/WTFnet-5cf3c719-2c0c-424a-bffd-b7f549a0b273]] (600 root)
[connection] id=WTFnet | type=wifi | permissions=user:vantuz:;
[wifi] mac-address=<MAC 'wlx<IF from MAC [IF2]>' [IF2]> | mac-address-blacklist= | ssid=WTFnet
[ipv4] method=auto
[ipv6] method=auto

##### iw reg get ########################

Region: Europe/Moscow (based on set time zone)

global
country 00: DFS-UNSET
    (2402 - 2472 @ 40), (N/A, 20), (N/A)
    (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR
    (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
    (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
    (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
    (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
    (5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
    (57240 - 63720 @ 2160), (N/A, 0), (N/A)

##### iwlist channels ###################

lo        no frequency information.

enp0s31f6  no frequency information.

wlx<IF from MAC [IF2]>  13 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Current Frequency:2.437 GHz (Channel 6)

##### iwlist scan #######################

lo        Interface doesn't support scanning.

enp0s31f6  Interface doesn't support scanning.

Channel occupancy:

      2   APs on   Frequency:2.417 GHz (Channel 2)
      1   APs on   Frequency:2.437 GHz (Channel 6)
      1   APs on   Frequency:2.447 GHz (Channel 8)
      1   APs on   Frequency:2.462 GHz (Channel 11)

wlx<IF from MAC [IF2]>  Scan completed :
          Cell 01 - Address: <MAC 'WTFnet' [AC1]>
                    ESSID:"WTFnet"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Encryption key:on
                    Bit Rates:72 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=100/100  Signal level=72/100  
          Cell 02 - Address: <MAC 'RT-WiFi_232' [AC2]>
                    ESSID:"RT-WiFi_232"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.417 GHz (Channel 2)
                    Encryption key:on
                    Bit Rates:300 Mb/s
                    Extra:wpa_ie=dd1a0050f20101000050f20202000050f2020050f20401000050f202
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    Quality=32/100  Signal level=41/100  
          Cell 03 - Address: <MAC '522CAM' [AC3]>
                    ESSID:"522CAM"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.417 GHz (Channel 2)
                    Encryption key:on
                    Bit Rates:150 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=85/100  Signal level=44/100  
          Cell 04 - Address: <MAC 'newlive' [AC4]>
                    ESSID:"newlive"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.447 GHz (Channel 8)
                    Encryption key:on
                    Bit Rates:300 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=31/100  Signal level=42/100  
          Cell 05 - Address: <MAC 'Obit225' [AC5]>
                    ESSID:"Obit225"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:72 Mb/s
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=94/100  Signal level=46/100  

##### module infos ######################

[8192cu]
filename:       /lib/modules/4.13.0-16-generic/updates/dkms/8192cu.ko
version:        v4.0.2_9000.20130911
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     C7275C5B6150340CADA28E9
depends:        
name:           8192cu
vermagic:       4.13.0-16-generic SMP mod_unload 
parm:           rtw_ips_mode:The default IPS mode (int)
parm:           ifname:The default name to allocate for first interface (charp)
parm:           if2name:The default name to allocate for second interface (charp)
parm:           rtw_initmac:charp
parm:           rtw_channel_plan:int
parm:           rtw_chip_version:int
parm:           rtw_rfintfs:int
parm:           rtw_lbkmode:int
parm:           rtw_network_mode:int
parm:           rtw_channel:int
parm:           rtw_mp_mode:int
parm:           rtw_wmm_enable:int
parm:           rtw_vrtl_carrier_sense:int
parm:           rtw_vcs_type:int
parm:           rtw_busy_thresh:int
parm:           rtw_ht_enable:int
parm:           rtw_cbw40_enable:int
parm:           rtw_ampdu_enable:int
parm:           rtw_rx_stbc:int
parm:           rtw_ampdu_amsdu:int
parm:           rtw_lowrate_two_xmit:int
parm:           rtw_rf_config:int
parm:           rtw_power_mgnt:int
parm:           rtw_low_power:int
parm:           rtw_wifi_spec:int
parm:           rtw_special_rf_path:int
parm:           rtw_antdiv_cfg:int
parm:           rtw_enusbss:int
parm:           rtw_hwpdn_mode:int
parm:           rtw_hwpwrp_detect:int
parm:           rtw_hw_wps_pbc:int
parm:           rtw_max_roaming_times:The max roaming times to try (uint)
parm:           rtw_force_iol:Force to enable IOL (bool)
parm:           rtw_mc2u_disable:int
parm:           rtw_mac_phy_mode:int
parm:           rtw_80211d:int
parm:           rtw_notch_filter:0:Disable, 1:Enable, 2:Enable only for P2P (uint)

[mac80211]
filename:       /lib/modules/4.13.0-16-generic/kernel/net/mac80211/mac80211.ko
license:        GPL
description:    IEEE 802.11 subsystem
srcversion:     66E288B8743878C5423A01E
depends:        cfg80211
intree:         Y
name:           mac80211
vermagic:       4.13.0-16-generic SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4
parm:           minstrel_vht_only:Use only VHT rates when VHT is supported by sta. (bool)
parm:           max_nullfunc_tries:Maximum nullfunc tx tries before disconnecting (reason 4). (int)
parm:           max_probe_tries:Maximum probe tries before disconnecting (reason 4). (int)
parm:           beacon_loss_count:Number of beacon intervals before we decide beacon was lost. (int)
parm:           probe_wait_ms:Maximum time(ms) to wait for probe response before disconnecting (reason 4). (int)
parm:           ieee80211_default_rc_algo:Default rate control algorithm for mac80211 to use (charp)

[cfg80211]
filename:       /lib/modules/4.13.0-16-generic/kernel/net/wireless/cfg80211.ko
description:    wireless configuration support
license:        GPL
author:         Johannes Berg
srcversion:     A854863B536C70273DE73A5
depends:        
intree:         Y
name:           cfg80211
vermagic:       4.13.0-16-generic SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4
parm:           bss_entries_limit:limit to number of scan BSS entries (per wiphy, default 1000) (int)
parm:           ieee80211_regdom:IEEE 802.11 regulatory domain code (charp)
parm:           cfg80211_disable_40mhz_24ghz:Disable 40MHz support in the 2.4GHz band (bool)

##### module parameters #################

[8192cu]
if2name: wlan%d
ifname: wlan%d
rtw_80211d: 0
rtw_ampdu_amsdu: 0
rtw_ampdu_enable: 1
rtw_antdiv_cfg: 2
rtw_busy_thresh: 40
rtw_cbw40_enable: 3
rtw_channel: 1
rtw_channel_plan: 65
rtw_chip_version: 0
rtw_enusbss: 0
rtw_force_iol: N
rtw_ht_enable: 1
rtw_hwpdn_mode: 2
rtw_hwpwrp_detect: 0
rtw_hw_wps_pbc: 1
rtw_initmac: (null)
rtw_ips_mode: 1
rtw_lbkmode: 0
rtw_low_power: 0
rtw_lowrate_two_xmit: 1
rtw_mac_phy_mode: 0
rtw_max_roaming_times: 2
rtw_mc2u_disable: 0
rtw_mp_mode: 0
rtw_network_mode: 0
rtw_notch_filter: 0
rtw_power_mgnt: 0
rtw_rf_config: 5
rtw_rfintfs: 2
rtw_rx_stbc: 1
rtw_special_rf_path: 0
rtw_vcs_type: 1
rtw_vrtl_carrier_sense: 2
rtw_wifi_spec: 0
rtw_wmm_enable: 1

[mac80211]
beacon_loss_count: 7
ieee80211_default_rc_algo: minstrel_ht
max_nullfunc_tries: 2
max_probe_tries: 5
minstrel_vht_only: Y
probe_wait_ms: 500

[cfg80211]
bss_entries_limit: 1000
cfg80211_disable_40mhz_24ghz: N
ieee80211_regdom: 00

##### /etc/modules ######################

##### modprobe options ##################

[/etc/modprobe.d/8192cu-disable-power-management.conf]
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

[/etc/modprobe.d/blacklist-ath_pci.conf]
blacklist ath_pci

[/etc/modprobe.d/blacklist.conf]
blacklist evbug
blacklist usbmouse
blacklist usbkbd
blacklist eepro100
blacklist de4x5
blacklist eth1394
blacklist snd_intel8x0m
blacklist snd_aw2
blacklist i2c_i801
blacklist prism54
blacklist bcm43xx
blacklist garmin_gps
blacklist asus_acpi
blacklist snd_pcsp
blacklist pcspkr
blacklist amd76x_edac

[/etc/modprobe.d/blacklist-native-rtl8192.conf]
install rtl8192cu /bin/false
install rtl8192c_common /bin/false
install rtlwifi /bin/false
install rtl8xxxu /bin/false

[/etc/modprobe.d/blacklist-rare-network.conf]
alias net-pf-3 off
alias net-pf-6 off
alias net-pf-9 off
alias net-pf-11 off
alias net-pf-12 off
alias net-pf-19 off
alias net-pf-21 off
alias net-pf-36 off

[/etc/modprobe.d/iwlwifi.conf]
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211

[/etc/modprobe.d/mlx4.conf]
softdep mlx4_core post: mlx4_en

##### rc.local ##########################

grep: /etc/rc.local: No such file or directory

##### pm-utils ##########################

##### udev rules ########################

##### dmesg #############################

[   14.812638] rtl8192cu 1-1:1.0 wlx<IF from MAC [IF2]>: renamed from wlan0
[   25.358382] IPv6: ADDRCONF(NETDEV_UP): enp0s31f6: link is not ready (repeated 2 times)
[   25.551963] IPv6: ADDRCONF(NETDEV_UP): wlx<IF from MAC [IF2]>: link is not ready (repeated 4 times)
[  127.432637] IPv6: ADDRCONF(NETDEV_CHANGE): wlx<IF from MAC [IF2]>: link becomes ready
[  559.285611] IPv6: ADDRCONF(NETDEV_UP): wlx<IF from MAC [IF2]>: link is not ready
[  582.139523] IPv6: ADDRCONF(NETDEV_CHANGE): wlx<IF from MAC [IF2]>: link becomes ready
[  662.405877] IPv6: ADDRCONF(NETDEV_UP): wlx<IF from MAC [IF2]>: link is not ready (repeated 2 times)
[  665.647110] IPv6: ADDRCONF(NETDEV_CHANGE): wlx<IF from MAC [IF2]>: link becomes ready

########## wireless info END ############

Also, I tried the rtl8xxxu driver, it is working stable but with very slow speed (~1Mbit/s)

pvaret commented 6 years ago

Hi! Thank you for taking the time to write this thorough ticket.

In general, bugs in the driver should be reported to Realtek, as this repo only packages their driver to make it compile on recent kernels. That said, from your report, based on the line that says "GENERAL.DRIVER", it looks like your device is using the rtl8192cu driver that comes with the kernel. This driver should appear as 8291cu, without the 'rtl' prefix. So that's probably your problem.

That said, now, the rtl8xxxu driver should work pretty well these days, given a proper power management configuration. That's what I'm currently using, to be honest. :) Probably you'll want to look in that direction as a long-term solution?

Vantuz commented 6 years ago

based on the line that says "GENERAL.DRIVER", it looks like your device is using the rtl8192cu driver that comes with the kernel.

I don't know why this line says so. In fact, I even tryed to rename /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rtl8192cu.ko file, which, I guess, is rtl8192cu which comes with kernell and it had no effect. So, I guess, it is not the module I am currently using. But if the problem is really that I am using the wrong driver, then, I guess, something is wrong with installation process, which, I hope, is possible to fix.

I tried the rtl8xxxu driver, it neither disconnects from AP nor halts data transfer but works REALLY slow. Result of speedtest.net test: pic I can't cope with this speed. I get much better performance with 8192cu driver when it works. I did the power management config as described here. Still, no luck.