Bug 28404 - Wrong driver selected for D-Link N300 Nano USB adapter
Summary: Wrong driver selected for D-Link N300 Nano USB adapter
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Kernel and Drivers maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-22 10:55 CET by Herman Viaene
Modified: 2021-09-16 21:39 CEST (History)
4 users (show)

See Also:
Source RPM: kernel-5.10.16-1.mga8.src.rpm
CVE:
Status comment: Workaround blacklist in /etc/modprobe.conf the rtl8xxxu driver


Attachments
kernel log (4.38 KB, text/plain)
2021-03-21 19:27 CET, Pascal Terjan
Details

Description Herman Viaene 2021-02-22 10:55:58 CET
Description of problem:
The adapter is recognized, but although the right driver is available in M8 (the rtl8192eu), the older rtl8xxxu is selected

Version-Release number of selected component (if applicable):
Manufacturer id 0x2001, device id 0x3319

How reproducible:
Always

Available workaround: blacklist in /etc/modprobe.conf the rtl8xxxu driver
Comment 1 Aurelien Oudelet 2021-02-22 11:12:09 CET
Hi, thanks for reporting this.
Assigned to the package maintainer.

(Please set the status to 'assigned' if you are working on it)

CC: (none) => ouaurelien
Assignee: bugsquad => kernel
Status comment: (none) => Workaround blacklist in /etc/modprobe.conf the rtl8xxxu driver
Severity: normal => major
Source RPM: (none) => kernel-5.10.16-1.mga8.src.rpm

Comment 2 Thomas Backlund 2021-02-22 12:50:47 CET
not a bug as such.

rtl8xxxu is the in-kernel maintained driver.

the rtl8192eu driver is provided by dkms-rtl8192eu that is based on a realtek codedrop.

for some the in-kernel driver works as it should... 
for others they need the dkms provided one...

and what happends if you use the in-kernel driver ?
Comment 3 Herman Viaene 2021-02-22 13:27:55 CET
With the rtl8xxxu driver, the device does not detect any wifi possible connections. Defining a connection mannually does not result in a working connection.
Comment 4 Thomas Backlund 2021-02-22 14:09:03 CET
any output in dmesg or journal when you try the rtl8xxxu ?
Comment 5 Herman Viaene 2021-02-22 15:06:15 CET
Nope
Comment 6 Pascal Terjan 2021-02-22 15:08:32 CET
This is one of the bunch of < $10 realtek devices I bought for this kind of problems but unfortunately my local machine is dead. I can try to investigate this more after I get it replaced.
Comment 7 Thomas Andrews 2021-03-20 01:11:47 CET
I finally got around to trying my rtl8192eu device with Mageia 8, and it does not work with the rtl8xxxu driver. My device will detect the available SSIDs, and will configure for my network, but will not connect. Blacklisting rtlxxxu allows it to work.

This is the same behavior it has with Mageia 7. See Bug 27940. Unless the rtl8xxxu driver is blacklisted, the rtl8192eu driver will not be used.

CC: (none) => andrewsfarm

Comment 8 Pascal Terjan 2021-03-21 19:27:56 CET
Created attachment 12490 [details]
kernel log

It indeed doesn't work. 

While running drakconnect I noticed this error which may be related:
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlp1s0u1 ; Invalid argument.

CC: (none) => pterjan

Comment 9 Pascal Terjan 2021-03-21 19:32:07 CET
The error seems unrelated, it seems drakconnect insists to want it to be ascii but fixing it does not help.
Comment 10 Pascal Terjan 2021-03-22 20:14:05 CET
Note that here using rtl-8192eu doesn't work either...

[  235.707615] ------------[ cut here ]------------
[  235.707663] WARNING: CPU: 13 PID: 182 at net/wireless/sme.c:757 __cfg80211_connect_result+0x3db/0x420 [cfg80211]
[  235.707665] Modules linked in: xt_comment ip6t_REJECT nf_reject_ipv6 ip6table_nat ip6table_mangle ip6table_raw nf_log_ipv6 rfcomm ip6table_filter ip6_tables xt_recent nf_tables ipt_REJECT nf_reject_ipv4 xt_addrtype bridge stp llc iptable_nat xt_mark iptable_mangle xt_hashlimit xt_tcpudp xt_CT iptable_raw xt_multiport xt_conntrack nfnetlink_log xt_NFLOG nf_log_ipv4 nf_log_common xt_LOG nf_nat_tftp nf_nat_snmp_basic nf_conntrack_snmp nf_nat_sip nf_nat_pptp nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp nf_conntrack_amanda nf_nat nf_conntrack_sane nf_conntrack_tftp nf_conntrack_sip nf_conntrack_pptp nf_conntrack_netlink nfnetlink nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_filter af_packet cmac algif_hash algif_skcipher af_alg bnep nls_utf8 nls_cp437 vfat fat dm_mirror dm_region_hash dm_log dm_mod rtsx_usb_ms rtsx_usb_sdmmc memstick joydev input_leds btusb btbcm btrtl btintel
[  235.707724]  bluetooth ecdh_generic ecc usbhid iwlmvm snd_hda_codec_realtek 8192eu(O) snd_hda_codec_generic mac80211 ledtrig_audio snd_hda_codec_hdmi kvm_amd snd_hda_intel snd_intel_dspcfg libarc4 soundwire_intel kvm soundwire_generic_allocation snd_soc_core snd_compress snd_pcm_dmaengine soundwire_cadence irqbypass ite_cir snd_hda_codec iwlwifi rapl rc_core snd_hda_core ucsi_acpi eeepc_wmi ac97_bus cm32181 asus_wmi snd_hwdep typec_ucsi acpi_cpufreq battery cfg80211 typec sparse_keymap wmi_bmof button snd_pcm sp5100_tco k10temp i2c_piix4 snd_timer r8169 snd snd_rn_pci_acp3x snd_pci_acp3x realtek soundcore mdio_devres ipmi_devintf libphy ipmi_msghandler rfkill hid_sensor_gyro_3d hid_sensor_accel_3d hid_sensor_als hid_sensor_magn_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio sch_fq_codel evdev mmc_block binfmt_misc mmc_core msr rtsx_usb fuse configfs efivarfs ip_tables x_tables ipv6 crc_ccitt autofs4 hid_sensor_hub hid_generic xhci_pci
[  235.707790]  xhci_pci_renesas xhci_hcd ehci_pci crc32_pclmul crc32c_intel ehci_hcd ghash_clmulni_intel aesni_intel usbcore crypto_simd cryptd ccp amd_sfh sha1_generic usb_common amdgpu iommu_v2 gpu_sched ttm i2c_algo_bit drm_kms_helper wmi cec i2c_hid video hid drm
[  235.707817] CPU: 13 PID: 182 Comm: kworker/u32:2 Tainted: G           O      5.10.25-desktop-1.mga8 #1
[  235.707819] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 0611 12/17/2020
[  235.707848] Workqueue: cfg80211 cfg80211_event_work [cfg80211]
[  235.707881] RIP: 0010:__cfg80211_connect_result+0x3db/0x420 [cfg80211]
[  235.707884] Code: fd ff ff 0f 0b 48 8b 44 24 18 65 48 2b 04 25 28 00 00 00 75 4b 48 8b 76 10 48 83 c4 20 5b 5d 41 5c 41 5d e9 27 30 fd ff 0f 0b <0f> 0b e9 0b fe ff ff e8 99 58 37 df e9 01 fe ff ff 0f 0b e9 30 fd
[  235.707885] RSP: 0018:ffffb166806e3df0 EFLAGS: 00010246
[  235.707888] RAX: 0000000000000000 RBX: ffff9f4d023e6000 RCX: 0000000000000003
[  235.707889] RDX: 0000000000000002 RSI: 00000000fffffe01 RDI: ffffffffc0d5aa4b
[  235.707890] RBP: ffff9f4d05501c18 R08: ffff9f4d047740c0 R09: ffffffff0001704e
[  235.707892] R10: ffff9f4d05501c88 R11: ffff9f4d023e6070 R12: ffff9f4d04772000
[  235.707893] R13: ffffb166806e3df0 R14: dead000000000122 R15: dead000000000100
[  235.707895] FS:  0000000000000000(0000) GS:ffff9f53ef940000(0000) knlGS:0000000000000000
[  235.707897] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  235.707898] CR2: 00007f283805c7d8 CR3: 000000053660a000 CR4: 0000000000350ee0
[  235.707900] Call Trace:
[  235.707935]  cfg80211_process_wdev_events+0x139/0x1a0 [cfg80211]
[  235.707965]  cfg80211_process_rdev_events+0x32/0x70 [cfg80211]
[  235.707994]  cfg80211_event_work+0x1a/0x20 [cfg80211]
[  235.708000]  process_one_work+0x1da/0x370
[  235.708003]  worker_thread+0x4d/0x3e0
[  235.708006]  ? rescuer_thread+0x3b0/0x3b0
[  235.708037]  kthread+0x11b/0x140
[  235.708045]  ? __kthread_bind_mask+0x60/0x60
[  235.708053]  ret_from_fork+0x22/0x30
[  235.708059] ---[ end trace c0689c3a7c68b020 ]---
Comment 11 Pascal Terjan 2021-03-22 20:40:19 CET
Kernel bug https://bugzilla.kernel.org/show_bug.cgi?id=196769
Comment 12 Thomas Andrews 2021-03-22 21:13:02 CET
According to https://github.com/clnhub/rtl8192eu-linux there is a new version of the rtl8192eu driver that, among other things, adds support for the upcoming 5.11 and 5.12 kernels. Perhaps we should update to that.

Note also, in the readme section of that same page, the installation instructions make a point that the rtl8xxxu driver needs to be blacklisted for this driver to work.
Comment 13 Thomas Andrews 2021-03-23 00:38:06 CET
I have ventured out of my comfort zone, and am lost. Someone with some developer know-how should be looking into this, not me.

The driver from https://github.com/clnhub/rtl8192eu-linux is calling itself the "Official" Linux driver, and is based on the "latest" Realtek driver. The site indicates there has been much recent activity.

Another driver, from https://github.com/Mange/rtl8192eu-linux-driver were created from drivers downloaded from TP-Link, which the page says are based on an earlier Realtek driver. This too shows recent activity, but not as much of it.
Comment 14 Pascal Terjan 2021-03-24 14:32:57 CET
Realtek manufactures the chip inside those dongles, and distributes the driver to companies manufacturing them (DLink, TP-Link, ...) which redistribute it.

Mange used to be the most up to date one (with 4.3.* and then 4.4.* drivers) but yes it seems a v5.2.19.1 of realtek driver appeared in 2018 which is the one available in lnhub.


The most up to date one I could find is on Dlink website, from 2019: http://files.dlink.com.au/products/DWA-131/REV_E/Drivers/DWA-131_E1_Linux_v5.6.3.1/DWA-131_Linux_v5.6.3.1.zip
Comment 15 Thomas Andrews 2021-03-24 17:28:55 CET
Which driver we offer boils down to which one we could have permission to distribute, and that isn't always the latest one...
Comment 16 Guillaume Royer 2021-09-16 21:39:49 CEST
I tested a dongle WiFi D-Link DWA-131 Rev E1.

At plug in dongle was automatically recognize but couldn't connect it on my WiFi. In MCC the driver dongle was rtlxxxu.

I installed non free driver dkms-rtl8192eu-4.4.1-1.20201219.1.mga8 but even this driver connection didn't made.

After modify /etc/modules with 8192eu to load module into kernel, connection was effective. 
But if i want to connect it manually by press connect button in Drakconnect it doesn't work. Dongle connect wifi automatically...

CC: (none) => guillaume.royer


Note You need to log in before you can comment on or make changes to this bug.