tomaspinho / rtl8821ce

Other
1.6k stars 409 forks source link

Doesn't get recognised in 5.15+ Ubuntu / PoP_OS! kernels #251

Open crazyaccess opened 2 years ago

crazyaccess commented 2 years ago

So I downloaded the recent LTS editions of Ubuntu and PoP_OS! for testing and daily driving on a machine. But the tomaspinho/rtl8821ce does build for this kernel but doesn't get recognized. Nor does the rtl8821ce-dkms package is able to build for the 5.15+ kernels from the ubuntu repo.

It works on the arch kernels for 5.15+ tho.

RIght now I am running a mainline kernel downgrade on that machine to the last LTS release of Linux Kernel. IDK what the problem is with the tomaspinho/rtl8821ce, but the Ubuntu version gives this :

DKMS make.log for rtl8821ce-5.5.2.1 for kernel 5.15.5-76051505-generic (x86_64)
Wed 22 Dec 2021 08:43:12 PM IST
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.15.5-76051505-generic/build M=/var/lib/dkms/rtl8821ce/5.5.2.1/build  modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.5-76051505-generic'
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_io.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_ioctl_query.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_ioctl_set.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_ieee80211.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_mlme.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_mlme_ext.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_mi.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_wlan_util.o
/var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_mlme_ext.c: In function ‘rtw_txpwr_init_regd’:
/var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_mlme_ext.c:259:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
  259 |   if (rfctl->regd_name)
      |      ^
/var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_mlme_ext.c:261:2: note: here
  261 |  default:
      |  ^~~~~~~
/var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_mlme_ext.c: In function ‘mgt_dispatcher’:
/var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_mlme_ext.c:1329:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1329 |    ptable->func = &OnAuthClient;
      |    ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_mlme_ext.c:1331:2: note: here
 1331 |  case WIFI_ASSOCREQ:
      |  ^~~~
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_vht.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_pwrctrl.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_rf.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_chplan.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_recv.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_sta_mgt.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_ap.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/mesh/rtw_mesh.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_xmit.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_p2p.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_rson.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_tdls.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_br_ext.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_iol.o
  CC [M]  /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_sreset.o
/var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_br_ext.c:20:11: fatal error: net/ipx.h: No such file or directory
   20 |  #include <net/ipx.h>
      |           ^~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/rtl8821ce/5.5.2.1/build/core/rtw_br_ext.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1874: /var/lib/dkms/rtl8821ce/5.5.2.1/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.5-76051505-generic'
make: *** [Makefile:2262: modules] Error 2
crazyaccess commented 2 years ago

I am sorry but I am not from a "C" background so I can't understand this quite well.

crazyaccess commented 2 years ago

Also sorry if the log is not related to the project, but the actual tomaspinho's repo driver doesn't work even when I blacklisted rtw88_8821ce.

Please guide me for the meanwhile.

rfm83 commented 2 years ago

Same issue for me on Fedora 35 after upgrading to kernel 5.15.11. My make.log file shows the exact same error as yours. It works fine on kernel 5.14.17 though.

crazyaccess commented 2 years ago

Yep i agree

vyrgozunqk commented 2 years ago

Any development here guys, have you been able to make it work on the latest kernels ?

DavidRockin commented 2 years ago

Same here. My build fails with the same net/ipx.h: No such file or directory.

On Manjaro 5.15.25

Doing some quick digging, it looks like these files were deleted in Linux Kernel 5.15 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/net?id=6c9b40844751ea30c72f7a2f92f4d704bc6b2927

Relevant thread https://github.com/aircrack-ng/rtl8188eus/issues/150

DavidRockin commented 2 years ago

Ah, surprise! It looks like tomaspinho has already resolved this issue in mid November! :) 2357b5443e4d35af34868cd213856a6db072e159

I've had to reset my build files and manually rebuild the Aur package, since the Aur package just clones the repo and builds from there, so no "new version" was found.

For @vyrgozunqk @rfm83 @crazyaccess and anyone else, depending on how you installed this driver, you'll need to update the sources and rebuild it. On the readme, there's instructions on how to update:

https://github.com/tomaspinho/rtl8821ce#upgrading-driver

i30817 commented 2 years ago

The error still exists on kernel upgrades recompilation, even after i did the ritual of uninstalling and reinstalling.

On the other hand, i'm actually posting here, so that reinstallation actually works to get wifi functional so i don't even know what's happening. I'll try to upgrade ubuntu to 22.04.1

dubhater commented 2 years ago

lsmod | grep 8821 will tell you what's happening. It will probably show that rtw88_8821ce is loaded. That's the rtw88 driver built into the kernel.

i30817 commented 2 years ago

Wrong, i have it blacklisted:

cat /etc/modprobe.d/blacklist.conf
# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.

#i3: using the driver in Documents/Projects/rtl8821ce instead
blacklist rtw88_8821ce

anyway, meanwhil(e in these few hours, i updated ubuntu to the new LTS 22.04.1 and it's complaining that the driver is already loaded when it tried to built. Seems like ubuntu pulled this code in? Not sure how to solve it except uninstalling this one.

i3@sleipnir:~$ dkms status
nvidia/470.141.03, 5.15.0-43-generic, x86_64: installed
nvidia/470.141.03, 5.15.0-46-generic, x86_64: installed
rtl8821ce/5.5.2.1, 5.15.0-43-generic, x86_64: installed
rtl8821ce/5.5.2.1, 5.15.0-46-generic, x86_64: built
rtl8821ce/v5.5.2_34066.20200325, 5.15.0-43-generic, x86_64: built
rtl8821ce/v5.5.2_34066.20200325, 5.15.0-46-generic, x86_64: installed
vhba/20211218, 5.15.0-43-generic, x86_64: installed
vhba/20211218, 5.15.0-46-generic, x86_64: installed

Ah, i guess it's no trouble uninstalling, because this thing comes with a usb connector to pretend it's 'ethernet' if i manage to fuck up the wifi.