[SOLVED] Wifi adapter TP-Link TL-WN823N must be reconnected for it to work

Hello community,

after a few years of Mac and Windows i want to give Manjaro (Cinnamon) a try. But I ran into a problem with my wifi stick. I have the wifi stick TP-Link TL-WN823N (V2) and have been trying to get it to work for some time.

Currently I only had to write these lines (which I found after a week...) into the NetworkManager.conf in my fresh installation:

[klaus@klaus-pc ~]$ cat /etc/NetworkManager/NetworkManager.conf 
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.



Before, it was not possible to connect even though different wifi-networks were displayed.

With these entries I am attached to two problems and cannot find a solution:

  1. The stick must be inserted again after each restart. Only then can it easily connect to networks.

  2. The speed is then only about 10% of the speed under Windows and the signal strength jumps around between 25% and 100%. (Windows constantly 100%)

I think there might be a problem with the driver 'rtl8xxxu' which is included in the kernel (4.14.54-1-MANJARO).
Here the output of hwinfo:

[klaus@klaus-pc ~]$ hwinfo --wlan
21: USB 00.0: 0282 WLAN controller                              
  [Created at usb.122]
  Unique ID: eqBD.3tSB9EujntA
  Parent ID: uIhY.2DFUsyrieMD
  SysFS ID: /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0
  SysFS BusID: 3-4:1.0
  Hardware Class: network
  Model: "Realtek 802.11n NIC"
  Hotplug: USB
  Vendor: usb 0x2357 "Realtek"
  Device: usb 0x0109 "802.11n NIC"
  Revision: "2.00"
  Serial ID: "00e04c000001"
  Driver: "rtl8xxxu"
  Driver Modules: "rtl8xxxu"
  Device File: wlp0s20u4
  Features: WLAN
  Speed: 480 Mbps
  HW Address: 50:3e:aa:6d:10:50
  Permanent HW Address: 50:3e:aa:6d:10:50
  Link detected: yes
  WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
  WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472 2.484
  WLAN encryption modes: WEP40 WEP104 TKIP CCMP
  WLAN authentication modes: open sharedkey wpa-psk wpa-eap
  Module Alias: "usb:v2357p0109d0200dc00dsc00dp00icFFiscFFipFFin00"
  Driver Info #0:
    Driver Status: rtl8xxxu is active
    Driver Activation Cmd: "modprobe rtl8xxxu"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #20 (Hub)

Since I'm at a loss, I hope you'll help me out because beside of that i like Manjaro pretty much.

If you'd like help I'd personally suggest staying on the forum longer than 30 seconds.

inxi -Fxzc0


lsusb | grep Realtek

journalctl -b -1 | grep wlan

journalctl -u NetworkManager -f

dmesg | egrep 'rtl8xxxu|[R]ealtek|[F]irm'
find /etc/modprobe.d -type f -name "*.conf" -print -execdir cat '{}' \; -execdir echo \;

The kernel driver is not always the best driver for Realtek NICs.

I don't know why but I suspect it is because the write drivers for Windows only. The same issue with Tp-link T2U which is Mediatek based and again viable support for Linux.

And OEM tend to change chipset if anoter is cheaper - so two - on the outside - identical devices may well be with different chipsets.

Pretty annoying if you ask me.

I have two T2U which were supposed to have a rtl chipset but they came with Realtek - and is pretty much useless on Linux.

In addition to the above,

try a different kernel.

Hello tbg,

I'm sorry, I didn't expect such a quick answer.

Here is the output of the commands:

[klaus@klaus-pc ~]$ inxi -Fxzc0
  Host: klaus-pc Kernel: 4.14.54-1-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 8.1.1 Desktop: Cinnamon 3.8.7 Distro: Manjaro Linux 17.1.11 Hakoila 
  Type: Desktop System: ASUS product: All Series v: N/A serial: <filter> 
  Mobo: ASUSTeK model: SABERTOOTH Z87 v: Rev 1.xx serial: <filter> 
  UEFI: American Megatrends v: 2103 date: 08/18/2014 
  Device-1: hidpp_battery_0 
  model: Logitech K850 Performance Wireless Keyboard charge: 100% 
  status: Discharging 
  Device-2: hidpp_battery_1 
  model: Logitech M720 Triathlon Multi-Device Mouse charge: 55% 
  status: Discharging 
  Topology: Quad Core model: Intel Core i7-4770K bits: 64 type: MT MCP 
  arch: Haswell rev: 3 L2 cache: 8192 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 56114 
  Speed: 1302 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 1210 2: 1207 
  3: 1224 4: 1112 5: 1110 6: 1129 7: 1138 8: 1282 
  Card-1: NVIDIA GK104 [GeForce GTX 670] driver: nvidia v: 396.24 
  bus ID: 01:00.0 
  Display: x11 server: X.Org 1.19.6 driver: nvidia tty: N/A 
  OpenGL: renderer: GeForce GTX 670/PCIe/SSE2 v: 4.6.0 NVIDIA 396.24 
  direct render: Yes 
  Card-1: Intel 8 Series/C220 Series High Definition Audio 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  Card-2: NVIDIA GK104 HDMI Audio driver: snd_hda_intel v: kernel 
  bus ID: 01:00.1 
  Sound Server: ALSA v: k4.14.54-1-MANJARO 
  Card-1: Intel Ethernet Connection I217-V driver: e1000e v: 3.2.6-k 
  port: f040 bus ID: 00:19.0 
  IF: eno1 state: down mac: <filter> 
  IF-ID-1: wlp0s20u4 state: up mac: <filter> 
  HDD Total Size: 1.07 TiB used: 5.38 GiB (0.5%) 
  ID-1: /dev/sda vendor: Intel model: SSDSC2CT180A4 size: 167.68 GiB 
  ID-2: /dev/sdb vendor: Western Digital model: WD10EZEX-00RKKA0 
  size: 931.51 GiB 
  ID-1: / size: 36.86 GiB used: 5.30 GiB (14.4%) fs: btrfs dev: /dev/sda7 
  ID-2: /boot size: 282.5 MiB used: 53.2 MiB (18.8%) fs: ext4 dev: /dev/sda6 
  ID-3: /home size: 36.86 GiB used: 5.30 GiB (14.4%) fs: btrfs 
  dev: /dev/sda7 
  ID-4: swap-1 size: 7.91 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda5 
  System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: nvidia temp: 40 C 
  Fan Speeds (RPM): cpu: 0 gpu: nvidia fan: 30% 
  Processes: 239 Uptime: 11m Memory: 7.73 GiB used: 1.42 GiB (18.3%) 
  Init: systemd Compilers: gcc: 8.1.1 Shell: bash v: 4.4.23 inxi: 3.0.12 
[klaus@klaus-pc ~]$ 
[klaus@klaus-pc ~]$ lsmod
Module                  Size  Used by
ccm                    20480  6
fuse                  118784  3
arc4                   16384  2
nls_iso8859_1          16384  1
nls_cp437              20480  1
vfat                   20480  1
fat                    81920  1 vfat
ext4                  716800  1
crc32c_generic         16384  0
crc16                  16384  1 ext4
mbcache                16384  1 ext4
jbd2                  118784  1 ext4
fscrypto               32768  1 ext4
intel_rapl             24576  0
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
rtl8xxxu              135168  0
coretemp               16384  0
eeepc_wmi              16384  0
snd_hda_codec_realtek   110592  1
kvm_intel             225280  0
snd_hda_codec_generic    86016  1 snd_hda_codec_realtek
asus_wmi               32768  1 eeepc_wmi
iTCO_wdt               16384  0
iTCO_vendor_support    16384  1 iTCO_wdt
sparse_keymap          16384  1 asus_wmi
mxm_wmi                16384  0
snd_hda_codec_hdmi     57344  1
kvm                   708608  1 kvm_intel
wmi_bmof               16384  0
mac80211              901120  1 rtl8xxxu
sch_fq_codel           20480  6
irqbypass              16384  1 kvm
crct10dif_pclmul       16384  0
crc32_pclmul           16384  0
snd_hda_intel          45056  4
ghash_clmulni_intel    16384  0
snd_hda_codec         151552  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
nvidia_drm             49152  3
pcbc                   16384  0
nvidia_modeset       1089536  5 nvidia_drm
snd_hda_core           90112  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
cfg80211              733184  1 mac80211
snd_hwdep              16384  1 snd_hda_codec
drm_kms_helper        196608  1 nvidia_drm
evdev                  20480  9
snd_pcm               118784  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
mousedev               24576  0
joydev                 24576  0
input_leds             16384  0
aesni_intel           188416  4
drm                   434176  6 drm_kms_helper,nvidia_drm
snd_timer              36864  1 snd_pcm
led_class              16384  2 input_leds,asus_wmi
aes_x86_64             20480  1 aesni_intel
snd                    90112  16 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
rfkill                 28672  4 asus_wmi,cfg80211
crypto_simd            16384  1 aesni_intel
mac_hid                16384  0
glue_helper            16384  1 aesni_intel
cryptd                 28672  3 crypto_simd,ghash_clmulni_intel,aesni_intel
e1000e                282624  0
soundcore              16384  1 snd
intel_cstate           16384  0
agpgart                49152  1 drm
mei_me                 45056  0
pcspkr                 16384  0
intel_rapl_perf        16384  0
mei                   114688  1 mei_me
syscopyarea            16384  1 drm_kms_helper
i2c_i801               28672  0
lpc_ich                28672  0
ptp                    20480  1 e1000e
sysfillrect            16384  1 drm_kms_helper
pps_core               20480  1 ptp
sysimgblt              16384  1 drm_kms_helper
wmi                    28672  3 asus_wmi,wmi_bmof,mxm_wmi
fb_sys_fops            16384  1 drm_kms_helper
shpchp                 40960  0
thermal                20480  0
fan                    16384  0
intel_smartconnect     16384  0
video                  45056  1 asus_wmi
button                 16384  0
nvidia              14049280  175 nvidia_modeset
ipmi_devintf           20480  0
ipmi_msghandler        53248  2 ipmi_devintf,nvidia
crypto_user            16384  0
ip_tables              28672  0
x_tables               45056  1 ip_tables
btrfs                1327104  1
xor                    24576  1 btrfs
zstd_decompress        81920  1 btrfs
zstd_compress         180224  1 btrfs
xxhash                 16384  2 zstd_compress,zstd_decompress
raid6_pq              122880  1 btrfs
uas                    28672  0
usb_storage            73728  1 uas
hid_logitech_hidpp     40960  0
sr_mod                 28672  0
cdrom                  69632  1 sr_mod
sd_mod                 61440  5
hid_logitech_dj        24576  0
usbhid                 57344  0
hid                   131072  3 usbhid,hid_logitech_dj,hid_logitech_hidpp
ahci                   40960  4
libahci                40960  1 ahci
xhci_pci               16384  0
ehci_pci               16384  0
libata                278528  2 libahci,ahci
xhci_hcd              241664  1 xhci_pci
ehci_hcd               94208  1 ehci_pci
scsi_mod              212992  5 sd_mod,usb_storage,uas,libata,sr_mod
usbcore               286720  8 xhci_hcd,ehci_pci,usbhid,usb_storage,ehci_hcd,xhci_pci,rtl8xxxu,uas
usb_common             16384  1 usbcore
crc32c_intel           24576  2
[klaus@klaus-pc ~]$ 
[klaus@klaus-pc ~]$ lsusb | grep Realtek
[klaus@klaus-pc ~]$ 
[klaus@klaus-pc ~]$ journalctl -b -1 | grep wlan
Jul 22 15:57:56 klaus-pc NetworkManager[448]: <info>  [1532267876.9395] wifi-nl80211: (wlan0): using nl80211 for WiFi device control
Jul 22 15:57:56 klaus-pc NetworkManager[448]: <info>  [1532267876.9402] manager: (wlan0): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/3)
Jul 22 15:57:56 klaus-pc kernel: rtl8xxxu 3-4:1.0 wlp0s20u4: renamed from wlan0
Jul 22 16:03:55 klaus-pc NetworkManager[448]: <info>  [1532268235.2006] wifi-nl80211: (wlan0): using nl80211 for WiFi device control
Jul 22 16:03:55 klaus-pc NetworkManager[448]: <info>  [1532268235.2013] manager: (wlan0): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/4)
Jul 22 16:03:55 klaus-pc kernel: rtl8xxxu 3-4:1.0 wlp0s20u4: renamed from wlan0
[klaus@klaus-pc ~]$ journalctl -u NetworkManager -f
-- Logs begin at Sun 2018-07-22 14:44:11 CEST. --
Jul 22 20:50:05 klaus-pc NetworkManager[443]: <info>  [1532285405.3547] manager: NetworkManager state is now CONNECTED_LOCAL
Jul 22 20:50:05 klaus-pc NetworkManager[443]: <info>  [1532285405.3566] manager: NetworkManager state is now CONNECTED_SITE
Jul 22 20:50:05 klaus-pc NetworkManager[443]: <info>  [1532285405.3567] policy: set 'KV2010' (wlp0s20u4) as default for IPv4 routing and DNS
Jul 22 20:50:05 klaus-pc NetworkManager[443]: <info>  [1532285405.3574] device (wlp0s20u4): Activation: successful, device activated.
Jul 22 20:50:05 klaus-pc NetworkManager[443]: <info>  [1532285405.5190] manager: NetworkManager state is now CONNECTED_GLOBAL
Jul 22 20:50:07 klaus-pc NetworkManager[443]: <info>  [1532285407.1681] dhcp6 (wlp0s20u4): activation: beginning transaction (timeout in 45 seconds)
Jul 22 20:50:07 klaus-pc NetworkManager[443]: <info>  [1532285407.1693] policy: set 'KV2010' (wlp0s20u4) as default for IPv6 routing and DNS
Jul 22 20:50:07 klaus-pc NetworkManager[443]: <info>  [1532285407.1812] dhcp6 (wlp0s20u4):   nameserver 2001:730:3e62::53
Jul 22 20:50:07 klaus-pc NetworkManager[443]: <info>  [1532285407.1813] dhcp6 (wlp0s20u4):   nameserver 2001:730:3e62:1000::53
Jul 22 20:50:07 klaus-pc NetworkManager[443]: <info>  [1532285407.1813] dhcp6 (wlp0s20u4): state changed unknown -> bound
[klaus@klaus-pc ~]$ dmesg | egrep 'rtl8xxxu|[R]ealtek|[F]irm'
[    0.288369] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    6.294158] usb 3-4: Vendor: Realtek
[    6.294209] usb 3-4: rtl8xxxu: Loading firmware rtlwifi/rtl8192eu_nic.bin
[    6.295574] usb 3-4: Firmware revision 19.0 (signature 0x92e1)
[    7.231668] usbcore: registered new interface driver rtl8xxxu
[    7.233385] rtl8xxxu 3-4:1.0 wlp0s20u4: renamed from wlan0
[  126.085001] usb 3-4: Vendor: Realtek
[  126.085099] usb 3-4: rtl8xxxu: Loading firmware rtlwifi/rtl8192eu_nic.bin
[  126.085189] usb 3-4: Firmware revision 19.0 (signature 0x92e1)
[  127.069639] rtl8xxxu 3-4:1.0 wlp0s20u4: renamed from wlan0
[  131.984258] usb 3-4: rtl8xxxu_bss_info_changed: HT supported
[klaus@klaus-pc ~]$ find /etc/modprobe.d -type f -name "*.conf" -print -execdir cat '{}' \; -execdir echo \;
## Generated by mhwd - Manjaro Hardware Detection
blacklist nouveau
blacklist ttm
blacklist drm_kms_helper
blacklist drm

[klaus@klaus-pc ~]$ ^C
[klaus@klaus-pc ~]$ 

Can you see anything in the output?


I tried 4.17.5-1 two days ago but it was the same as with the 4.14 LTS kernel. Therefore I switched back to the LTS.

Have you tried also this?

I changed the file and restarted the PC but it has sadly no effect. :frowning_face:

Disable IPV6 and set the IPV4 to use the router's DHCP server and the connection to automatically, then the auto-negotiation to be checked ...

I hope I understand you right, I disabled IPv6 in the network manager GUI, leaved IPv4 so that it obtained an IP from DHCP server. Same procedure as always, I restarted but it did not connect automatically.

But in General tab is set to connect automatically? Also, the password, is is set to be used for all users?

yes it is. It connects automatically if i reconnect the wifi stick, but not at bootup.Screenshot%20from%202018-07-22%2021-53-42

Oh ... i see ... well, see if you can trace some USB event that shows connect/disconnect
I have one issue that is similar, and i can see the event16 that connects and disconnects this particular device in the same time, so i have to turn it on again ... For me it doesn't happen with the 4.14 kernel but with all above that. I was able to see this only in Xorg log right after boot, and after that, same event works as it should. I'm still looking for more about it, but i couldn't find something coherent so far.

Maybe you can see something in the cli-output I posted above. I think there you can see the connect/disconnect of the stick in the output of the journalctl command.

Otherwise can you tell me where to find such a log or how to log the right events? I will then post it tomorrow.

By the way thank you guys for your fast response and help :slight_smile:

All those lines of output and only one line identified the actual adapter model. As fhdk mentioned earlier the kernel modules are not what you want to be using. I am out at the moment and only have use of my phone. When I get home I will send you instructions on the proper driver to install. Thanks for posting the outputs.

I did some research on the available drivers and found out that the kernel modules have been greatly improved recently. Some posts claim the newer rtl8xxxu kernel modules are working as well (or better) than the proprietary drivers from Realtek. So the first thing to try is getting the native kernel modules to work without having to remove and reinsert the wifi dongle. Start your computer normally with the wifi dongle inserted. After your computer is fully started enter each of these commands one at a time.

sudo systemctl stop NetworkManager

sudo ip link set wlp0s20u4 down

sudo modprobe -r rtl8xxxu

sudo modprobe rtl8xxxu

sudo ip link set wlp0s20u4 up

sudo systemctl start NetworkManager

Please post all input/outputs from the above commands.

If this procedure works properly it can easily be scripted to load automatically at startup so that removing/reinserting your wifi dongle is no longer necessary.

In many cases the reverse engineered Linux drivers may never quite achieve the speeds or stability of the drivers that were written specifically for Windows. Even the best Linux drivers may not perform as well as the Windows driver. Hopefully we can achieve satisfactory performance with the native kernel driver for you with out a ton of extra work.

There are easily 4 different driver versions that may work with this card. Before we change drivers I think we should tinker a bit to see if we can get the native drivers working satisfactorily for you. Try the above procedure and let me know how things work afterwards.

You can tweak the power saving settings to see if that improves performance.

Network Managers default power saving settings can cause problems sometimes. Let's alter the defaults.

Create a new file:

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

in the file create or copy and paste the text below. the default is 3, 2 is less aggressive and more reliable with USB adapters:

wifi.powersave = 2

Reboot and test for improvement.

Could you also please post:

modinfo rtl8xxxu
1 Like

@tbg you are a genius - the commands of you worked perfekt. After this commands the wifi activates and connects automatically. Take a look:

[klaus@klaus-pc ~]$ sudo systemctl stop NetworkManager
[sudo] password for klaus: 
[klaus@klaus-pc ~]$ sudo ip link set wlp0s20u4 down
[klaus@klaus-pc ~]$ sudo modprobe -r rtl8xxxu
[klaus@klaus-pc ~]$ sudo modprobe rtl8xxxu
[klaus@klaus-pc ~]$ sudo ip link set wlp0s20u4 up
[klaus@klaus-pc ~]$ sudo systemctl start NetworkManager

The speedtest shows before the tweak of the power savings this values:

After the reboot this values showed up:

I got similar values before, around 11 download and 0.75 upload. (For comparing under Windows i get ~70 download) So no real improvement based on the power settings. Basically I am already happy if it connects automatically, but a little more speed, without heavy tweaking would be nice.

There you see the last output:

[klaus@klaus-pc ~]$ modinfo rtl8xxxu
filename:       /lib/modules/4.14.54-1-MANJARO/kernel/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko.xz
firmware:       rtlwifi/rtl8723bu_bt.bin
firmware:       rtlwifi/rtl8723bu_nic.bin
firmware:       rtlwifi/rtl8192eu_nic.bin
firmware:       rtlwifi/rtl8192cufw_TMSC.bin
firmware:       rtlwifi/rtl8192cufw_B.bin
firmware:       rtlwifi/rtl8192cufw_A.bin
firmware:       rtlwifi/rtl8723aufw_B_NoBT.bin
firmware:       rtlwifi/rtl8723aufw_B.bin
firmware:       rtlwifi/rtl8723aufw_A.bin
license:        GPL
description:    RTL8XXXu USB mac80211 Wireless LAN Driver
author:         Jes Sorensen <Jes.Sorensen@gmail.com>
srcversion:     8ECBECDF88CCF9717CB1423
alias:          usb:v0BDAp818Cd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2019pAB33d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p0107d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v7392p7822d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v4855p0091d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p0100d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v20F4p624Dd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2019pAB2Bd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p330Ad*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p3309d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p3307d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0E66p0020d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0E66p0019d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp2E2Ed*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0846pF001d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0846p9021d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v07B8p8178d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v07AAp0056d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0789p016Dd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0DF6p0070d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0DF6p0061d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0B05p17ABd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v06F8pE035d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0586p341Fd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v050Dp2103d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v050Dp2102d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v04BBp0950d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2019p1201d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v04F2pAFFCd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v04F2pAFFBd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v04F2pAFF8d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v04F2pAFFAd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v04F2pAFF9d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v04F2pAFF7d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:vCDABp8010d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v4856p0091d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v4855p0090d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2019pED17d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2019pAB2Ed*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2019pAB2Ad*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2019p4902d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p330Bd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v13D3p3357d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v103Cp1629d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0EB0p9071d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0DF6p005Cd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0DF6p0052d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp5088d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp1E1Ed*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0B05p17BAd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0846p9041d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v07B8p8189d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v06F8pE033d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v050Dp1102d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v04BBp094Cd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v1058p0631d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp317Fd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp818Ad*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp817Ed*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp817Dd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp817Bd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp817Ad*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp8177d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp8170d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp8191d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p3308d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v20F4p648Bd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v050Dp1004d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v7392p7811d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp817Fd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp8178d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp8176d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDApB720d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p0109d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2001p3319d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v2357p0108d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp818Bd*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp0724d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp1724d*dc*dsc*dp*icFFiscFFipFFin*
alias:          usb:v0BDAp8724d*dc*dsc*dp*icFFiscFFipFFin*
depends:        mac80211,usbcore
retpoline:      Y
intree:         Y
name:           rtl8xxxu
vermagic:       4.14.54-1-MANJARO SMP preempt mod_unload modversions 
parm:           debug:Set debug mask (int)
parm:           ht40_2g:Enable HT40 support on the 2.4GHz band (bool)
parm:           dma_aggregation:Enable DMA packet aggregation (bool)
parm:           dma_agg_timeout:Set DMA aggregation timeout (range 1-127) (int)
parm:           dma_agg_pages:Set DMA aggregation pages (range 1-127, 0 to disable) (int)
[klaus@klaus-pc ~]$ 

Now i tried to put the commands from you into a sh-file under ~/.config/autostart but that did not work. Maybe because the sudo commands? (The file is marked as executable)

At least a huge thank you guys for your time and help so far, especially to you tbg.

Glad that helped. Read this thread and my posts:

Part 1) WiFi module suspend scripts
Part 2) WiFi module suspend scirpts:

Sorry I forgot those systemd unit files were created for suspend/resume. They would need to be altered for startup/shutdown.

This would be along the lines of what you need as a start unit.

# systemctl cat netmod-resume.service
# /etc/systemd/system/netmod-resume.service

Description=Network module start helper



This should be all you need to run the service at login. You must create the netmod-resume.sh script with your required commands, then activate the service. Full directions on the above linked post. A shutdown systemd unit file should not be required.

I hope that is clear enough, and that it works for you. I am not very experienced at writing systemd unit files, so some tweaking may be required on your part.

Hello tbg,

i tried your instructions but the wifi did not connect automatically:

[klaus@klaus-pc ~]$ sudo xed /usr/bin/netmod-suspend.sh
[sudo] password for klaus: 

** (xed:2340): WARNING **: 08:33:28.740: Set document metadata failed: Setting attribute metadata::xed-encoding not supported

** (xed:2340): WARNING **: 08:33:31.728: Set document metadata failed: Setting attribute metadata::xed-position not supported
[klaus@klaus-pc ~]$ sudo chown root:root /usr/bin/netmod-suspend.sh
[klaus@klaus-pc ~]$ sudo chmod +x /usr/bin/netmod-suspend.sh
[klaus@klaus-pc ~]$ sudo xed /etc/systemd/system/netmod-suspend.service

** (xed:2368): WARNING **: 08:34:59.098: Set document metadata failed: Setting attribute metadata::xed-encoding not supported

** (xed:2368): WARNING **: 08:35:02.009: Set document metadata failed: Setting attribute metadata::xed-position not supported
[klaus@klaus-pc ~]$ sudo chown root:root /etc/systemd/system/netmod-suspend.service
[klaus@klaus-pc ~]$ sudo chmod +x /etc/systemd/system/netmod-suspend.service
[klaus@klaus-pc ~]$ sudo systemctl enable netmod-suspend.service
Created symlink /etc/systemd/system/default.target.wants/netmod-suspend.service → /etc/systemd/system/netmod-suspend.service.
[klaus@klaus-pc ~]$ sudo systemctl start netmod-suspend.service
[klaus@klaus-pc ~]$ sudo xed /usr/bin/netmod-resume.sh

** (xed:2409): WARNING **: 08:37:09.433: Set document metadata failed: Setting attribute metadata::xed-encoding not supported

** (xed:2409): WARNING **: 08:37:22.539: Set document metadata failed: Setting attribute metadata::xed-position not supported
[klaus@klaus-pc ~]$ sudo chown root:root /usr/bin/netmod-resume.sh
[klaus@klaus-pc ~]$ sudo chmod +x /usr/bin/netmod-resume.sh
[klaus@klaus-pc ~]$ sudo xed /etc/systemd/system/netmod-resume.service

** (xed:2424): WARNING **: 08:38:04.768: Set document metadata failed: Setting attribute metadata::xed-encoding not supported

** (xed:2424): WARNING **: 08:38:06.170: Set document metadata failed: Setting attribute metadata::xed-position not supported
[klaus@klaus-pc ~]$ sudo chown root:root /etc/systemd/system/netmod-resume.service
[klaus@klaus-pc ~]$ sudo chmod +x /etc/systemd/system/netmod-resume.service
[klaus@klaus-pc ~]$ sudo systemctl enable netmod-resume.service
Created symlink /etc/systemd/system/suspend.target.wants/netmod-resume.service → /etc/systemd/system/netmod-resume.service.
[klaus@klaus-pc ~]$ sudo systemctl start netmod-resume.service

My two files contains the following:

[klaus@klaus-pc ~]$ cat /usr/bin/netmod-suspend.sh
systemctl stop NetworkManager
ip link set wlp0s20u4 down
modprobe -r rtl8xxxu
[klaus@klaus-pc ~]$ cat /usr/bin/netmod-resume.sh
modprobe rtl8xxxu
ip link set wlp0s20u4 up
systemctl start NetworkManager
[klaus@klaus-pc ~]$ 

Both files are also executeable:

[klaus@klaus-pc ~]$ ls -la /usr/bin/netmod-suspend.sh
-rwxr-xr-x 1 root root 90 26. Jul 08:44 /usr/bin/netmod-suspend.sh
[klaus@klaus-pc ~]$ ls -la /usr/bin/netmod-resume.sh
-rwxr-xr-x 1 root root 86 26. Jul 08:45 /usr/bin/netmod-resume.sh

Did I something wrong or are the scripts running to early in the boot process?

Forum kindly sponsored by