Heya, just bought a Cudy AC1300 wifi usb adapter.
I’m trying to build following the instructions here: Guide
but It seems to need 5.4 or 5.8 kernel and I’m using 5.14. I get errors while running make:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.14.10-1-MANJARO/build M=/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141 modules
make[1]: Entering directory '/usr/lib/modules/5.14.10-1-MANJARO/build'
CC [M] /home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.o
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c: In function 'isFileReadable':
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2223:25: error: implicit declaration of function 'get_fs'; did you mean 'get_sa'? [-Werror=implicit-function-declaration]
2223 | oldfs = get_fs();
| ^~~~~~
| get_sa
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2223:25: error: incompatible types when assigning to type 'mm_segment_t' from type 'int'
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2225:17: error: implicit declaration of function 'set_fs'; did you mean 'sget_fc'? [-Werror=implicit-function-declaration]
2225 | set_fs(KERNEL_DS);
| ^~~~~~
| sget_fc
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2225:24: error: 'KERNEL_DS' undeclared (first use in this function); did you mean 'KERNFS_NS'?
2225 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2225:24: note: each undeclared identifier is reported only once for each function it appears in
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c: In function 'retriveFromFile':
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2265:33: error: incompatible types when assigning to type 'mm_segment_t' from type 'int'
2265 | oldfs = get_fs();
| ^~~~~~
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2267:32: error: 'KERNEL_DS' undeclared (first use in this function); did you mean 'KERNFS_NS'?
2267 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c: In function 'storeToFile':
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2304:33: error: incompatible types when assigning to type 'mm_segment_t' from type 'int'
2304 | oldfs = get_fs();
| ^~~~~~
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2306:32: error: 'KERNEL_DS' undeclared (first use in this function); did you mean 'KERNFS_NS'?
2306 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:271: /home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.o] Error 1
make[1]: *** [Makefile:1858: /home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.14.10-1-MANJARO/build'
make: *** [Makefile:2327: modules] Error 2
~/w/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141 sudo make > output_make.txt
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c: In function 'isFileReadable':
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2223:25: error: implicit declaration of function 'get_fs'; did you mean 'get_sa'? [-Werror=implicit-function-declaration]
2223 | oldfs = get_fs();
| ^~~~~~
| get_sa
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2223:25: error: incompatible types when assigning to type 'mm_segment_t' from type 'int'
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2225:17: error: implicit declaration of function 'set_fs'; did you mean 'sget_fc'? [-Werror=implicit-function-declaration]
2225 | set_fs(KERNEL_DS);
| ^~~~~~
| sget_fc
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2225:24: error: 'KERNEL_DS' undeclared (first use in this function); did you mean 'KERNFS_NS'?
2225 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2225:24: note: each undeclared identifier is reported only once for each function it appears in
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c: In function 'retriveFromFile':
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2265:33: error: incompatible types when assigning to type 'mm_segment_t' from type 'int'
2265 | oldfs = get_fs();
| ^~~~~~
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2267:32: error: 'KERNEL_DS' undeclared (first use in this function); did you mean 'KERNFS_NS'?
2267 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c: In function 'storeToFile':
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2304:33: error: incompatible types when assigning to type 'mm_segment_t' from type 'int'
2304 | oldfs = get_fs();
| ^~~~~~
/home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.c:2306:32: error: 'KERNEL_DS' undeclared (first use in this function); did you mean 'KERNFS_NS'?
2306 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:271: /home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141/os_dep/osdep_service.o] Error 1
make[1]: *** [Makefile:1858: /home/padlock/wu300-driver_linux/rtl8821CU_rtl8731AU_WiFi_linux_v5.8.1.7_37266.20200929_COEX20200616-4141] Error 2
make: *** [Makefile:2327: modules] Error 2
They are targeting EOL versions of ubuntu and kernel?
Seems odd.
I guess you can try kernel 5.4 as thats LTS (so it still exists … unlike 5.8) and manjaro allows easy switching.
Really though, it seems to be a branded rtl8821cu, so your AUR package seems like the best bet.
If you ‘tried’ it … what happened?
pamac build rtl8821cu-dkms-git ✔
Preparing...
Cloning rtl8821cu-dkms-git build files...
Checking rtl8821cu-dkms-git dependencies...
bsdtar: Failed to set default locale
Warning: downgrading package rtl8821cu-dkms-git (5.4.11229828dcb-1 => 5.4.1118f1bc7e8-1)
Resolving dependencies...
Checking inter-conflicts...
To build (1):
rtl8821cu-dkms-git 5.4.1118f1bc7e8-1 (5.4.11229828dcb-1) AUR
Edit build files : [e]
Apply transaction ? [e/y/N] y
Building rtl8821cu-dkms-git...
==> Making package: rtl8821cu-dkms-git 5.4.11229828dcb-1 (Wed Oct 13 12:57:42 2021)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating rtl8821CU git repo...
Fetching origin
-> Found dkms.conf
==> Validating source files with sha256sums...
rtl8821CU ... Skipped
dkms.conf ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Creating working copy of rtl8821CU git repo...
Cloning into 'rtl8821CU'...
done.
==> Starting prepare()...
==> Starting pkgver()...
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
-> Removing libtool files...
-> Purging unwanted files...
-> Removing static library files...
-> Stripping unneeded symbols from binaries and libraries...
-> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "rtl8821cu-dkms-git"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: rtl8821cu-dkms-git 5.4.11229828dcb-1 (Wed Oct 13 12:57:46 2021)
==> Cleaning up...
Checking keyring... [1/1]
Checking integrity... [1/1]
Loading packages files... [1/1]
Checking file conflicts... [1/1]
Checking available disk space... [1/1]
Running pre-transaction hooks...
Creating Timeshift snapshot before upgrade... [1/2]
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
Remove upgraded DKMS modules [2/2]
==> Unable to remove module rtl8821cu/5.4.11229828dcb for kernel 5.13.19-2-MANJARO: Not found in dkms status output.
==> Unable to remove module rtl8821cu/5.4.11229828dcb for kernel 5.14.10-1-MANJARO: Not found in dkms status output.
==> Unable to remove module rtl8821cu/5.4.11229828dcb for kernel 5.4.150-1-MANJARO: Not found in dkms status output.
Reinstalling rtl8821cu-dkms-git (5.4.11229828dcb-1)... [1/1]
Running post-transaction hooks...
Arming ConditionNeedsUpdate... [1/3]
Install DKMS modules [2/3]
==> dkms install --no-depmod -m rtl8821cu -v 5.4.11229828dcb -k 5.13.19-2-MANJARO
==> dkms install --no-depmod -m rtl8821cu -v 5.4.11229828dcb -k 5.14.10-1-MANJARO
Error! Bad return status for module build on kernel: 5.14.10-1-MANJARO (x86_64)
Consult /var/lib/dkms/rtl8821cu/5.4.11229828dcb/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m rtl8821cu -v 5.4.11229828dcb -k 5.14.10-1-MANJARO' returned 10
==> depmod 5.14.10-1-MANJARO
==> depmod 5.13.19-2-MANJARO
==> Unable to install module rtl8821cu/5.4.11229828dcb for kernel 5.4.150-1-MANJARO: Missing kernel modules tree.
Refreshing PackageKit... [3/3]
Transaction successfully finished.
Dunno if that means it’s installed…
I do have linux54-headers installed for what it’s worth.
Do I need to revert to an older kernel ? Or is it possible to install it with 5.14 ?
It looks to me like your kernels are mixed up.
Please make sure you have whatever kernel you want to use installed, and make sure you are updated.
Though we dont know you need 5.4 for the AUR package … thats just from that weird documentation.
So … please make sure you are up to date
pamac update
-reboot-
-select kernel (5.14?)
And please try again.
Yes. Well, more specific than that.
It may be installed on 5.14 already, but I would guess if you remove 5.13 and/or clean DKMS you would remove the error. Not sure what its exact root is.
Beyond that … after its installed, getting it working may be another step.