Realtek RTL8192FU support

gerladeno

New Member
Credits
32
Hello, everyone!

I'm really glad, I finally join you. I've used Linux (ubuntu/rhel/arch) for several years now, but I've never been somewhat active on any forum or.
It's my first post here, please, don't judge me hard. Enough about me)

The issue, I'm experiencing.
Few days back I've bought a wireless usb adapter ASUS USB-N13 C1. The driver was provided only on a CD (and I don't have a CD-ROM), so I downloaded it from the official site of Asus corp.
If you would rather google it yourself, don't mix it up with an older version USB-N13 B1 which uses RTL8192CU.

My current system is Ubuntu 20.04 LTS, kernel 5.4.0-40-generic.

The first problem I encountered was, I couldn't make the project due to errors. I'm not a C/C++ developer (except for some unserious university experience), so I've only managed to make it compile by comparing with similar driver repositories: they had commits like "Fix for kernel API changes through v5.6".

According to what I got from different sources, this driver should work on a kernel < 5.1.0. However I might be wrong.

The changes I've made for driver to compile:
1. added to osdep_service.c
C:
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
#define get_ds() KERNEL_DS
#endif
2. added to Makefile
Makefile:
EXTRA_CFLAGS += -Wno-implicit-function-declaration
EXTRA_CFLAGS += -Wno-implicit-fallthrough
EXTRA_CFLAGS += -Wno-error=incompatible-pointer-types
Mentioned changes allowed me to accomplish make and make install.

However, unfortunately, that didn't change the fact that the device still doesn't work (I've checked on a Windows 10 laptop, the device works).

Now, if I plug the adapter in, I get the following message in dmesg output:
[10951.768807] WARNING: CPU: 6 PID: 28582 at /opt/drv/ASUS_USB-N13_C1_20191031/Linux/RTL8192FU_RTL8725AU_linux_v5.8.6_33905.20190604_COEX20190509-0d01/driver/rtl8192FU_rtl8725AU_WiFi_linux_v5.8.6_33905.20190604_COEX20190509-0d01/os_dep/linux/os_intfs.c:3410 rtw_os_ndevs_register+0xbf/0x106 [8192fu]
[10951.768808] Modules linked in: xt_tcpudp xt_state xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo xt_addrtype iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c br_netfilter bridge stp llc vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) ip6table_filter ip6_tables iptable_filter bpfilter aufs overlay nvidia_uvm(OE) snd_hda_codec_hdmi edac_mce_amd kvm_amd kvm nvidia_drm(POE) nvidia_modeset(POE) nls_iso8859_1 nvidia(POE) snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_usb_audio snd_hda_codec snd_usbmidi_lib snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi crct10dif_pclmul gspca_zc3xx ghash_clmulni_intel snd_seq gspca_main snd_seq_device snd_timer uvcvideo 8192fu(OE) drm_kms_helper videobuf2_vmalloc videobuf2_memops snd videobuf2_v4l2 ipmi_devintf videobuf2_common ipmi_msghandler eeepc_wmi aesni_intel asus_wmi input_leds joydev videodev cfg80211 fb_sys_fops crypto_simd
[10951.768827] sparse_keymap mc syscopyarea cryptd sysfillrect glue_helper video wmi_bmof k10temp sysimgblt soundcore ccp mac_hid sch_fq_codel cuse parport_pc ppdev lp parport drm ip_tables x_tables autofs4 hid_generic usbhid hid crc32_pclmul nvme r8169 i2c_piix4 nvme_core ahci realtek libahci wmi gpio_amdpt gpio_generic
[10951.768839] CPU: 6 PID: 28582 Comm: kworker/6:3 Tainted: P W OE 5.4.0-40-generic #44-Ubuntu
[10951.768840] Hardware name: System manufacturer System Product Name/TUF X470-PLUS GAMING, BIOS 4026 08/24/2018
[10951.768842] Workqueue: usb_hub_wq hub_event
[10951.768882] RIP: 0010:rtw_os_ndevs_register+0xbf/0x106 [8192fu]
[10951.768884] Code: 87 9c 4f 00 00 49 8d b6 e6 33 00 00 84 c0 74 0d 49 8d b6 f6 33 00 00 3c 01 49 0f 45 f7 e8 1b f0 ff ff 41 89 c5 83 f8 01 74 b0 <0f> 0b 85 db 75 15 48 63 db 49 8b bc dc 70 01 00 00 48 85 ff 74 05
[10951.768885] RSP: 0018:ffffaa8b4c9ef790 EFLAGS: 00010297
[10951.768886] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff921df4f22060
[10951.768887] RDX: ffff921df4f22060 RSI: 0000000000000006 RDI: ffffaa8b40482558
[10951.768887] RBP: ffffaa8b4c9ef7c0 R08: 0000000000000000 R09: 0000000000000003
[10951.768888] R10: 000000000000000e R11: ffff921dfeda99e0 R12: ffff921df4f27000
[10951.768889] R13: 0000000000000000 R14: ffffaa8b4047f000 R15: ffffffffc0de61c3
[10951.768890] FS: 0000000000000000(0000) GS:ffff921dfed80000(0000) knlGS:0000000000000000
[10951.768891] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[10951.768891] CR2: 00000ccdb75e5000 CR3: 00000005cc4e4000 CR4: 00000000003406e0
[10951.768892] Call Trace:
[10951.768931] rtw_os_ndevs_init+0x29/0x3d [8192fu]
[10951.768968] rtw_drv_init+0x4c7/0x5e9 [8192fu]
[10951.768971] usb_probe_interface+0xed/0x290
[10951.768973] really_probe+0x2b3/0x3e0
[10951.768974] driver_probe_device+0xbc/0x100
[10951.768976] __device_attach_driver+0x71/0xd0
[10951.768977] ? driver_allows_async_probing+0x50/0x50
[10951.768979] bus_for_each_drv+0x84/0xd0
[10951.768980] __device_attach+0xe1/0x160
[10951.768982] device_initial_probe+0x13/0x20
[10951.768984] bus_probe_device+0x8f/0xa0
[10951.768985] device_add+0x3c7/0x6b0
[10951.768987] ? _cond_resched+0x19/0x30
[10951.768988] usb_set_configuration+0x433/0x7d0
[10951.768991] ? kernfs_activate+0x77/0x80
[10951.768993] generic_probe+0x43/0x60
[10951.768994] usb_probe_device+0x31/0x70
[10951.768995] really_probe+0x2b3/0x3e0
[10951.768997] driver_probe_device+0xbc/0x100
[10951.768998] __device_attach_driver+0x71/0xd0
[10951.768999] ? driver_allows_async_probing+0x50/0x50
[10951.769001] bus_for_each_drv+0x84/0xd0
[10951.769002] __device_attach+0xe1/0x160
[10951.769004] device_initial_probe+0x13/0x20
[10951.769006] bus_probe_device+0x8f/0xa0
[10951.769007] device_add+0x3c7/0x6b0
[10951.769009] ? add_device_randomness+0xa0/0x1c0
[10951.769011] usb_new_device.cold+0x12d/0x304
[10951.769013] hub_port_connect+0x500/0x850
[10951.769015] port_event+0x502/0x780
[10951.769016] ? __switch_to_asm+0x34/0x70
[10951.769018] hub_event+0x152/0x390
[10951.769021] process_one_work+0x1eb/0x3b0
[10951.769023] worker_thread+0x4d/0x400
[10951.769024] kthread+0x104/0x140
[10951.769026] ? process_one_work+0x3b0/0x3b0
[10951.769027] ? kthread_park+0x90/0x90
[10951.769029] ret_from_fork+0x22/0x40
[10951.769031] ---[ end trace 702a52dc3f8fa8b7 ]---
[10951.769032] RTW: rtw_wdev_free(wdev=00000000a74f1118)
[10951.769033] RTW: rtw_wiphy_free(phy1)
[10951.769039] RTW: rtw_usb_primary_adapter_deinit((null))
[10951.769040] RTW: rtw_dev_unload: bup==_FALSE
[10951.769043] RTW: +r871xu_dev_remove, hw_init_completed=0
[10951.769103] RTW: WARN free_recv_skb_queue not empty, 8

usb-devices | grep "Vendor=0b05 ProdID=18f1" -B2 -A5
still gives me the following:
T: Bus=01 Lev=01 Prnt=01 Port=11 Cnt=03 Dev#= 5 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0b05 ProdID=18f1 Rev=02.00
S: Manufacturer=Realtek
S: Product=802.11n WLAN Adapter
S: SerialNumber=00e04c000001
C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#=0x0 Alt= 0 #EPs= 8 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

I don't really have high hopes, that someone qualified enough to solve the problem (that's definitely not me) would bother to spend his or her time on this issue and, for example, post the fixed code on github. But if someone's willing to give it a try, I would be happy to provide any information necessary including testing of new builds.
 
Last edited:


jglen490

Well-Known Member
Credits
1,981
One thing to check is if Ubuntu can find the correct driver for you. I found the right for my ac wifi antenna a few months back. In a terminal enter:
Code:
ubuntu-drivers devices
It may return a driver package name. If it does, just use apt to install the package. When I installed mine, it used dkms to build and install what I needed. Hope it works for you.
 

gerladeno

New Member
Credits
32
$ ubuntu-drivers devices
wouldn't even list the adapter:
== /sys/devices/pci0000:00/0000:00:03.1/0000:09:00.0 ==
modalias : pci:v000010DEd00001B81sv00001458sd00003772bc03sc00i00
vendor : NVIDIA Corporation
model : GP104 [GeForce GTX 1070]
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-435 - distro non-free
driver : nvidia-driver-440 - distro non-free recommended
driver : xserver-xorg-video-nouveau - distro free builtin

However it is definetly plugged in.
lsusb -d 0b05:
gives the following:
Bus 001 Device 008: ID 0b05:18f1 ASUSTek Computer, Inc. 802.11n WLAN Adapter
 

jglen490

Well-Known Member
Credits
1,981
I'm pretty sure there is a solution, but if the driver is written to a specific kernel, is not written with some kernel levels in mind, it will be difficult. The stuff I've seen using Google is either old or is very specific when it comes to building the RTL8192FU driver.

In my opinion, there are better 802.11n wifi antennas available, and wifi has pretty much passed that standard by ,except as a backward compatible feature in many of the current 802.11ac wifi chips. If you really need 802.11n because of your router, then you may want something different.

I bought this one for my Raspberry Pi, because it uses USB2.0, but it connects with my home router about as well as the Bros Trend 1200 works on my desktop Kubuntu PC; except for the speed, of course ;)
 


Members online

No members online now.

Top