LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-28-2021, 01:54 PM   #1
lightstream
LQ Newbie
 
Registered: Jul 2008
Location: Berlin, DE
Distribution: Arch
Posts: 15

Rep: Reputation: 1
Cannot install dkms driver for TP-Link T9UH v2 (chipset RTL8814AU)


So I have the TP-Link T9UH Archer USB WiFi adapter, which I had previously got running successfully using the aircrack rtl88xxau dkms driver. This driver stopped building successfully at some point last year, but I had a wired connection to the internet so I did not spend a lot of time on it until now.

I'm now trying to install this driver here - https://github.com/aircrack-ng/rtl8814au

I've cloned the repo, manually applied the fix here for kernel 5.11, and run the commands below from the README:

Code:
# make
# make install
# make dkms_install
Installation seems to complete successfully, but when I plug the dongle in, not only does the internet not work with it but commands that relate to it just hang. For instance, lsusb will just hang and not return any information, iwctl will just hang and not open, as will systemctl status iwd.

I also get this output from dkms:

Code:
$ dkms status
8814au, 5.8.5.1, 5.11.1-arch1-1, x86_64: installed (WARNING! Diff between built and installed module!)
What I've found online is that that message happens because I have two different drivers installed for this device, but I'm not sure how I would find the other one - if there is indeed another one.

I would appreciate any help on this, as I feel a bit out of my depth and like I'm flailing blindly around. I'm not new to Linux, but maybe I've just been lucky so far and I don't think I've ever been unable to get new hardware working!

This is the output from modinfo:

Code:
$ modinfo 8814au
filename:       /lib/modules/5.11.1-arch1-1/kernel/drivers/net/wireless/8814au.ko
version:        5.8.5.1
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     C3662DF31C1392E15910973
alias:          usb:v0846p9054d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v20F4p809Bd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v20F4p809Ad*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2357p0106d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0E66p0026d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp8813d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v7392pA833d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v7392pA834d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v056Ep400Dd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v056Ep400Bd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0B05p1853d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0B05p1852d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0B05p1817d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p331Ad*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp8813d*dc*dsc*dp*ic*isc*ip*in*
depends:        cfg80211
retpoline:      Y
name:           8814au
vermagic:       5.11.1-arch1-1 SMP preempt mod_unload 
parm:           rtw_wireless_mode:int
parm:           rtw_monitor_overwrite_seqnum:Overwrite the sequence number of injected frames (int)
parm:           rtw_monitor_retransmit:Retransmit injected frames (int)
parm:           rtw_ips_mode:The default IPS mode (int)
parm:           rtw_lps_level:The default LPS level (int)
parm:           rtw_lps_chk_by_tp:int
parm:           rtw_max_bss_cnt:int
parm:           rtw_usb_rxagg_mode:int
parm:           rtw_dynamic_agg_enable:int
parm:           rtw_tx_aclt_flags:device TX AC queue packet lifetime control flags (uint)
parm:           rtw_tx_aclt_conf_default:device TX AC queue lifetime config for default status (array of uint)
parm:           rtw_tx_aclt_conf_ap_m2u:device TX AC queue lifetime config for AP mode M2U status (array of uint)
parm:           rtw_tx_bw_mode:The max tx bw for 2.4G and 5G. format is the same as rtw_bw_mode (uint)
parm:           rtw_rx_ampdu_sz_limit_1ss:RX AMPDU size limit for 1SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_rx_ampdu_sz_limit_2ss:RX AMPDU size limit for 2SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_rx_ampdu_sz_limit_3ss:RX AMPDU size limit for 3SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_rx_ampdu_sz_limit_4ss:RX AMPDU size limit for 4SS link of each BW, 0xFF: no limitation (array of uint)
parm:           rtw_vht_enable:int
parm:           rtw_vht_rx_mcs_map:VHT RX MCS map (uint)
parm:           rtw_rf_path:int
parm:           rtw_tx_nss:int
parm:           rtw_rx_nss:int
parm:           rtw_country_code:The default country code (in alpha2) (charp)
parm:           rtw_channel_plan:The default chplan ID when rtw_alpha2 is not specified or valid (int)
parm:           rtw_excl_chs:exclusive channel array (array of uint)
parm:           rtw_pci_dynamic_aspm_linkctrl:int
parm:           rtw_qos_opt_enable: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_wowlan_sta_mix_mode:int
parm:           rtw_pwrtrim_enable:int
parm:           rtw_initmac:charp
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_bw_mode:int
parm:           rtw_ampdu_enable:int
parm:           rtw_rx_stbc:int
parm:           rtw_rx_ampdu_amsdu:int
parm:           rtw_tx_ampdu_amsdu:int
parm:           rtw_beamform_cap:int
parm:           rtw_lowrate_two_xmit:int
parm:           rtw_power_mgnt:int
parm:           rtw_smart_ps:int
parm:           rtw_low_power:int
parm:           rtw_wifi_spec:int
parm:           rtw_full_ch_in_p2p_handshake:int
parm:           rtw_antdiv_cfg:int
parm:           rtw_antdiv_type:int
parm:           rtw_drv_ant_band_switch:int
parm:           rtw_single_ant_path:int
parm:           rtw_switch_usb_mode:int
parm:           rtw_enusbss:int
parm:           rtw_hwpdn_mode:int
parm:           rtw_hwpwrp_detect:int
parm:           rtw_hw_wps_pbc:int
parm:           rtw_check_hw_status:int
parm:           rtw_max_roaming_times:The max roaming times to try (uint)
parm:           rtw_mc2u_disable:int
parm:           rtw_notch_filter:0:Disable, 1:Enable, 2:Enable only for P2P (uint)
parm:           rtw_hiq_filter:0:allow all, 1:allow special, 2:deny all (uint)
parm:           rtw_adaptivity_en:0:disable, 1:enable (uint)
parm:           rtw_adaptivity_mode:0:normal, 1:carrier sense (uint)
parm:           rtw_adaptivity_th_l2h_ini:th_l2h_ini for Adaptivity (int)
parm:           rtw_adaptivity_th_edcca_hl_diff:th_edcca_hl_diff for Adaptivity (int)
parm:           rtw_amplifier_type_2g:BIT3:2G ext-PA, BIT4:2G ext-LNA (uint)
parm:           rtw_amplifier_type_5g:BIT6:5G ext-PA, BIT7:5G ext-LNA (uint)
parm:           rtw_RFE_type:default init value:64 (uint)
parm:           rtw_powertracking_type:default init value:64 (uint)
parm:           rtw_GLNA_type:default init value:0 (uint)
parm:           rtw_TxBBSwing_2G:default init value:0xFF (uint)
parm:           rtw_TxBBSwing_5G:default init value:0xFF (uint)
parm:           rtw_OffEfuseMask:default open Efuse Mask value:0 (uint)
parm:           rtw_FileMaskEfuse:default drv Mask Efuse value:0 (uint)
parm:           rtw_rxgain_offset_2g:default RF Gain 2G Offset value:0 (uint)
parm:           rtw_rxgain_offset_5gl:default RF Gain 5GL Offset value:0 (uint)
parm:           rtw_rxgain_offset_5gh:uint
parm:           rtw_rxgain_offset_5gm:default RF Gain 5GM Offset value:0 (uint)
parm:           rtw_pll_ref_clk_sel:force pll_ref_clk_sel, 0xF:use autoload value (uint)
parm:           rtw_tx_pwr_by_rate:0:Disable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_tx_pwr_lmt_enable:0:Disable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_target_tx_pwr_2g_a:2.4G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_2g_b:2.4G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_2g_c:2.4G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_2g_d:2.4G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_a:5G target tx power (unit:dBm) of RF path A for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_b:5G target tx power (unit:dBm) of RF path B for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_c:5G target tx power (unit:dBm) of RF path C for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_target_tx_pwr_5g_d:5G target tx power (unit:dBm) of RF path D for each rate section, should match the real calibrate power, -1: undefined (array of int)
parm:           rtw_tsf_update_pause_factor:num of bcn intervals to stay TSF update pause status (int)
parm:           rtw_tsf_update_restore_factor:num of bcn intervals to stay TSF update restore status (int)
parm:           rtw_phy_file_path:The path of phy parameter (charp)
parm:           rtw_load_phy_file:PHY File Bit Map (int)
parm:           rtw_decrypt_phy_file:Enable Decrypt PHY File (int)
parm:           rtw_phydm_ability:uint
parm:           rtw_halrf_ability:uint
parm:           rtw_en_napi:int
parm:           rtw_en_gro:int
parm:           rtw_iqk_fw_offload:int
parm:           rtw_ch_switch_offload:int
 
Old 02-28-2021, 05:42 PM   #2
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
If you did not uninstall the previous aircrack driver it is possible they are both loaded to the kernel and interfere. You can check which modules are loaded with commands below, it should also show all associated modules tied to them for each.
Code:
lsmod | grep rtl88xxau
lsmod | grep 8814au
Command ---> sudo dkms status should give a little more information regarding the Warning, this likely happened because the module already exists (by exact same name), came with the kernel and by rights dkms won't overwrite the original kernel module.
You can fix it by incrementing the module version in the source code or using --force option.
DKMS usually installs to a specific path: /lib/modules/5.10.4-mykernel/updates/dkms/
The tar installer don't install there and I notice you run make install, then make dkms_install. But I would think dkms takes care of that.

Last edited by Brains; 02-28-2021 at 05:55 PM.
 
Old 03-01-2021, 06:47 AM   #3
lightstream
LQ Newbie
 
Registered: Jul 2008
Location: Berlin, DE
Distribution: Arch
Posts: 15

Original Poster
Rep: Reputation: 1
I believe I did uninstall all previous dkms drivers - dkms status wasn't returning anything. It does appear that there is some driver installed though. What I did today was remove the dkms driver like so:

Code:
# make dkms_remove
dkms remove 8814au/5.8.5.1 --all

-------- Uninstall Beginning --------
Module:  8814au
Version: 5.8.5.1
Kernel:  5.11.1-arch1-1 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

8814au.ko.xz:
 - Uninstallation
   - Deleting from: /usr/lib/modules/5.11.1-arch1-1/
rmdir: failed to remove '': No such file or directory
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod.....

DKMS: uninstall completed.

------------------------------
Deleting module version: 5.8.5.1
completely from the DKMS tree.
------------------------------
Done.
rm -rf /usr/src/8814au-5.8.5.1
I then rebooted, and plugged in the dongle. This is what I got from lsmod:

Code:
$ lsmod | grep 8814
8814au               2412544  0
cfg80211             1036288  2 8814au,mac80211
When the dongle is plugged in, lots of things start hanging indefinitely e.g. lsusb, iwctl device list. When I shut down, various stop jobs timeout - the ones I remember were related to the user session manager, and wireless networking. I let all the timeouts happen, but the PC could not shutdown when it reached that point in the process - I think it said the root filesystem was busy. So I had to physically cut the power to get it to restart.

So I'm not sure what those modules are that are found by lsmod when there is no dkms driver installed, but it seems like they must be causing the hangs.
 
Old 03-01-2021, 02:39 PM   #4
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
$ modinfo 8814au
filename: /lib/modules/5.11.1-arch1-1/kernel/drivers/net/wireless/8814au.
That should be the location of the kernel supplied module.
Quote:
8814au.ko.xz:
- Uninstallation
- Deleting from: /usr/lib/modules/5.11.1-arch1-1/
The above show where the dkms version would go
 
1 members found this post helpful.
Old 03-01-2021, 02:42 PM   #5
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Although I don't build drivers and thus don't use dkms manually, apparently when building your dkms module you can use a force option to delete the kernel module. I would keep a copy of it before doing that just in case but if it don't work it's no good anyway, and you can just reinstall the kernel to get things back to original.
 
Old 03-01-2021, 05:56 PM   #6
lightstream
LQ Newbie
 
Registered: Jul 2008
Location: Berlin, DE
Distribution: Arch
Posts: 15

Original Poster
Rep: Reputation: 1
So you think there is a kernel-supplied module for this chipset? That is, one is now part of the mainline kernel? If so, maybe I can find out why that one is not working, as I'm still not getting anywhere with the aircrack one.

I tried installing the aircrack driver/module using the --force option in the Makefile. Interestingly, it does keep a copy of the previous module automatically.

Code:
# make dkms_install 
mkdir -p /usr/src/8814au-5.8.5.1
cp -r * /usr/src/8814au-5.8.5.1
dkms add -m 8814au -v 5.8.5.1

Creating symlink /var/lib/dkms/8814au/5.8.5.1/source ->
                 /usr/src/8814au-5.8.5.1

DKMS: add completed.
dkms build -m 8814au -v 5.8.5.1

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' -j4 KVER=5.11.1-arch1-1 KSRC=/lib/modules/5.11.1-arch1-1/build............
cleaning build area...
Kernel cleanup unnecessary for this kernel.  Skipping...

DKMS: build completed.
dkms install --force -m 8814au -v 5.8.5.1

8814au.ko.xz:
Running module version sanity check.
 - Original module
   - Found /usr/lib/modules/5.11.1-arch1-1/kernel/drivers/net/wireless/8814au.ko
   - Storing in /var/lib/dkms/8814au/original_module/5.11.1-arch1-1/x86_64/
   - Archiving for uninstallation purposes
 - Installation
   - Installing to /usr/lib/modules/5.11.1-arch1-1/updates/

depmod.....

DKMS: install completed.
dkms status
8814au, 5.8.5.1, 5.11.1-arch1-1, x86_64: installed (original_module exists)
The last line there is the dkms status output, which no longer complains about "Diff between built and installed module".

However I still get the weird problems with various commands just hanging once the dongle is plugged in, and needless to say, the dongle is not usable.
 
Old 03-01-2021, 08:19 PM   #7
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
So you think there is a kernel-supplied module for this chipset? That is, one is now part of the mainline kernel?
Yes, of the two paths I quoted, the one with 'kernel' in the path is likely a kernel module, I'll have a look in my kernel configuration.

Quote:
However I still get the weird problems with various commands just hanging once the dongle is plugged in, and needless to say, the dongle is not usable.
Have you tried leaving it plugged in and starting the machine with it plugged in?
If you also have another wireless adapter, like built in wireless, certain modules will be auto loaded at boot for that device. And possibly also for the dongle if it's plugged in. There are a few other modules that get loaded for wireless adapters and it's possible there is some selfishness and they aren't able to share properly.
In the distant past, some wireless devices required certain modules be loaded before others and people would find themselves unloading all modules related to their wireless module and reloading in a certain order to get things working properly.
 
Old 03-01-2021, 08:52 PM   #8
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Nope, not part of the 5.11.2 kernel. That other module must be from previous attempts with other driver packages, or ?.
EDIT:Perhaps without DKMS?
Quote:
# make
# make install
# make dkms_install

Last edited by Brains; 03-01-2021 at 08:57 PM.
 
Old 03-02-2021, 09:16 AM   #9
lightstream
LQ Newbie
 
Registered: Jul 2008
Location: Berlin, DE
Distribution: Arch
Posts: 15

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Brains View Post
Nope, not part of the 5.11.2 kernel. That other module must be from previous attempts with other driver packages, or ?.
EDIT:Perhaps without DKMS?
I did previously have rtl88xxau installed, which I installed via this Arch User Repository package. Trawling through logs, I can see I first installed it in May last year, and it stopped building in September, failing with Bad return status for module build on kernel: 5.8.7-arch1-1.

Anyway, this rtl88xxau from the AUR seems to install itself in the location normally used by pre-existing kernel modules - it has this in its Makefile: MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/

So it seems that this old AUR package had not been fully removed - even though dkms status was showing nothing. Maybe dkms status didn't show anything because it wasn't installed in the normal place for dkms modules?

Quote:
Originally Posted by Brains View Post
Have you tried leaving it plugged in and starting the machine with it plugged in? If you also have another wireless adapter, like built in wireless, certain modules will be auto loaded at boot for that device. And possibly also for the dongle if it's plugged in.
I just tried this, booting up with the problematic dongle plugged in and no other WiFi dongle. XFCE hung for quite a while (I'd say at least 30 seconds with black screen and movable mouse cursor) before it started.

When XFCE starts up, it seems to behave normally, but I have no internet. lsusb does not hang and shows TP-Link Archer T9UH v1 [Realtek RTL8814AU]

This differs to what the back of the dongle says - there it is labeled as an Archer T9UH(EU) ver:2.0 but I found a post from TP-Link saying the chipset is the same in the v1 and the v2 so maybe nothing to worry about. systemctl status iwd also does not hang, and shows iwd working normally.

iwctl device list does hang, seemingly forever (I've only left it for a couple of minutes though).

Quote:
# make
# make install
# make dkms_install
This I wasn't sure about - the instructions in the README don't seem to be clear on whether both make install and make dkms_install are required, or if not, when to use one and not the other.
 
Old 03-02-2021, 07:46 PM   #10
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
# make
# make install
# make dkms_install
Just looking at those commands pretty much says it all, it was installed by the source makefile and DKMS.
Did you run into this post, seems to be very informative. It was back in the 4.9 kernel era but at least there's success. Came in post #16 but would be good to check Vendor/Product ID as mentioned in one of the posts.
 
Old 03-03-2021, 07:00 AM   #11
lightstream
LQ Newbie
 
Registered: Jul 2008
Location: Berlin, DE
Distribution: Arch
Posts: 15

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Brains View Post
Did you run into this post, seems to be very informative. It was back in the 4.9 kernel era but at least there's success. Came in post #16 but would be good to check Vendor/Product ID as mentioned in one of the posts.
Yes I have read that thread already. TBH there's a surprising lack of posts about this dongle, given that it used to work pretty well (with DKMS) and then stopped working fairly recently. I'll go through that thread and have a closer look at lsusb output and so on. If I can determine for definite what chipset my dongle has, then I can hopefully find a DKMS driver for it.

Thanks a lot for all your help! Especially as it's not a particular area of expertise of yours
 
Old 03-03-2021, 03:31 PM   #12
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
I have a USB dongle I haven't used in a couple years. It has mt7610u chip. There were tons of driver packages with many modifications, I finally found one that only required editing one configuration file and changed a "6" to a "7". But somewhere around kernel 4.5 something changed and was never able to get any of them to work.
 
  


Reply

Tags
dkms, rtl8814au, wifi



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] wireless woes with rtl8814AU Honest Abe SUSE / openSUSE 9 12-03-2020 04:22 AM
[SOLVED] How to compile device drivers for usb wireless internet adaptor TP-LINK ARCHER T9UH Faultygaia Slackware 31 09-24-2019 10:39 AM
Installing drivers for TP_LINK Archer T9UH ob Ubuntu 18.04.2 LTS Irbis Linux - Hardware 1 06-13-2019 05:16 PM
dkms kernel panic error - D-Link DWA-160B2 driver stormyk88 Linux - Kernel 1 11-09-2013 03:59 PM
dkms-nvidia-current dkms install fails X86_64 Blackhawkckc Mandriva 5 03-21-2009 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration