brektrou / rtl8821CU

Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
GNU General Public License v2.0
1.59k stars 460 forks source link

version magic problem #39

Closed zjiekai closed 4 years ago

zjiekai commented 4 years ago
$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.3.0-28-generic/build M=/home/zjk/github/rtl8821CU  modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-28-generic'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-28-generic'

$ sudo modprobe 8821cu
modprobe: ERROR: could not insert '8821cu': Unknown symbol in module, or unknown parameter (see dmesg)
$ dmesg
[55260.676417] usbcore: registered new interface driver rtl88xxau
[55276.054904] usb 1-5.3: new high-speed USB device number 8 using xhci_hcd
[55276.155247] usb 1-5.3: New USB device found, idVendor=0bda, idProduct=c811, bcdDevice= 2.00
[55276.155252] usb 1-5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[55276.155255] usb 1-5.3: Product: 802.11ac NIC
[55276.155258] usb 1-5.3: Manufacturer: Realtek
[55276.155261] usb 1-5.3: SerialNumber: 123456
[55276.201639] 8821cu: version magic '5.0.0-37-generic SMP mod_unload ' should be '5.3.0-28-generic SMP mod_unload '
[55713.343830] usbcore: deregistering interface driver rtl88xxau
[56170.871989] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[56170.872123] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[56170.873184] 8821cu: version magic '5.0.0-37-generic SMP mod_unload ' should be '5.3.0-28-generic SMP mod_unload '
zjiekai commented 4 years ago

Seems I'm having a path problem?

SatanicRaw commented 4 years ago

You may need to rebuild the kernel with the compiler installed on the system. And this line is suspicious "8821cu: version magic '5.0.0-37-generic SMP mod_unload ' should be '5.3.0-28-generic"

zjiekai commented 4 years ago

modprobe probably is using the wrong file. sudo insmod ./8821cu.ko works fine.

zjiekai commented 4 years ago
[23618.074174] 8821cu: Unknown symbol __cfg80211_alloc_event_skb (err -2)
[23618.074211] 8821cu: Unknown symbol wiphy_register (err -2)
[23618.074250] 8821cu: Unknown symbol cfg80211_remain_on_channel_expired (err -2)
[23618.074300] 8821cu: Unknown symbol cfg80211_vendor_cmd_reply (err -2)
[23618.074338] 8821cu: Unknown symbol cfg80211_del_sta_sinfo (err -2)
[23618.074374] 8821cu: Unknown symbol wiphy_unregister (err -2)
[23618.074434] 8821cu: Unknown symbol cfg80211_ch_switch_notify (err -2)
[23618.074479] 8821cu: Unknown symbol cfg80211_ready_on_channel (err -2)
[23618.074534] 8821cu: Unknown symbol wiphy_free (err -2)
[23618.074567] 8821cu: Unknown symbol wiphy_new_nm (err -2)
[23618.074602] 8821cu: Unknown symbol cfg80211_get_bss (err -2)
[23618.074645] 8821cu: Unknown symbol __cfg80211_send_event_skb (err -2)
[23618.074688] 8821cu: Unknown symbol cfg80211_disconnected (err -2)
[23618.074724] 8821cu: Unknown symbol cfg80211_michael_mic_failure (err -2)
[23618.074763] 8821cu: Unknown symbol cfg80211_ibss_joined (err -2)
[23618.074823] 8821cu: Unknown symbol cfg80211_scan_done (err -2)
[23618.074862] 8821cu: Unknown symbol cfg80211_roamed (err -2)
[23618.074895] 8821cu: Unknown symbol cfg80211_put_bss (err -2)
[23618.074937] 8821cu: Unknown symbol cfg80211_connect_done (err -2)
[23618.074985] 8821cu: Unknown symbol cfg80211_unlink_bss (err -2)
[23618.075029] 8821cu: Unknown symbol ieee80211_get_channel (err -2)
[23618.075062] 8821cu: Unknown symbol cfg80211_inform_bss_frame_data (err -2)
[23618.075101] 8821cu: Unknown symbol cfg80211_new_sta (err -2)
[23618.075151] 8821cu: Unknown symbol __cfg80211_alloc_reply_skb (err -2)
[23618.075214] 8821cu: Unknown symbol cfg80211_rx_mgmt (err -2)
[23618.075250] 8821cu: Unknown symbol ieee80211_frequency_to_channel (err -2)
[23618.075307] 8821cu: Unknown symbol wiphy_apply_custom_regulatory (err -2)
[23618.075337] 8821cu: Unknown symbol cfg80211_mgmt_tx_status (err -2)

Somehow insmod stopped working. Reopening the issue

SatanicRaw commented 4 years ago

Most likely, everything works fine, you just use insmod 8821cu instead of modprobe 8821cu. Insmod does not load the modules that 8821cu depends on. As far as I understand, in this case it is enough to execute modprobe cfg80211.