Rtl8821ce: Bad return status for module build on kernel: 5.8.3-2

Still have problems changing to Kernel 5.8.3-2 due to failures regarding modules returning error while dkms-build:

Install-log:

The following packages will be installed:

linux58

linux58-headers

Starting

resolving dependencies...

looking for conflicting packages...

Packages (2) linux58-5.8.3-2 linux58-headers-5.8.3-2

Total Download Size: 95.41 MiB

Total Installed Size: 197.22 MiB

:: Proceed with installation? [Y/n]

:: Retrieving packages...

downloading linux58-5.8.3-2-x86_64.pkg.tar.zst...

downloading linux58-headers-5.8.3-2-x86_64.pkg.tar.zst...

checking keyring...

checking package integrity...

loading package files...

checking for file conflicts...

checking available disk space...

:: Processing package changes...

installing linux58...

Optional dependencies for linux58

crda: to set the correct wireless channels of your country [installed]

installing linux58-headers...

:: Running post-transaction hooks...

(1/5) Arming ConditionNeedsUpdate...

(2/5) Updating module dependencies...

(3/5) Install DKMS modules

==> dkms install --no-depmod -m rtl8821ce -v v5.5.2_34066.20200325 -k 5.8.3-2-MANJARO

Error! Bad return status for module build on kernel: 5.8.3-2-MANJARO (x86_64)

Consult /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/make.log for more information.

==> Warning, `dkms install --no-depmod -m rtl8821ce -v v5.5.2_34066.20200325 -k 5.8.3-2-MANJARO' returned 10

==> dkms install --no-depmod -m rtl8821ce -v 1.0.5.r95.g69765eb -k 5.8.3-2-MANJARO

Error! Bad return status for module build on kernel: 5.8.3-2-MANJARO (x86_64)

Consult /var/lib/dkms/rtl8821ce/1.0.5.r95.g69765eb/build/make.log for more information.

==> Warning, `dkms install --no-depmod -m rtl8821ce -v 1.0.5.r95.g69765eb -k 5.8.3-2-MANJARO' returned 10

==> dkms install --no-depmod -m smartcam -v 1.4.0 -k 5.8.3-2-MANJARO

Error! Bad return status for module build on kernel: 5.8.3-2-MANJARO (x86_64)

Consult /var/lib/dkms/smartcam/1.4.0/build/make.log for more information.

==> Warning, `dkms install --no-depmod -m smartcam -v 1.4.0 -k 5.8.3-2-MANJARO' returned 10

==> depmod 5.8.3-2-MANJARO

(4/5) Updating linux initcpios...

==> Building image from preset: /etc/mkinitcpio.d/linux58.preset: 'default'

-> -k /boot/vmlinuz-5.8-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.8-x86_64.img

==> Starting build: 5.8.3-2-MANJARO

-> Running build hook: [base]

-> Running build hook: [udev]

-> Running build hook: [autodetect]

-> Running build hook: [modconf]

-> Running build hook: [block]

==> WARNING: Possibly missing firmware for module: xhci_pci

-> Running build hook: [keyboard]

-> Running build hook: [keymap]

-> Running build hook: [filesystems]

-> Running build hook: [resume]

==> Generating module dependencies

==> Creating gzip-compressed initcpio image: /boot/initramfs-5.8-x86_64.img

==> Image generation successful

==> Building image from preset: /etc/mkinitcpio.d/linux58.preset: 'fallback'

-> -k /boot/vmlinuz-5.8-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.8-x86_64-fallback.img -S autodetect

==> Starting build: 5.8.3-2-MANJARO

-> Running build hook: [base]

-> Running build hook: [udev]

-> Running build hook: [modconf]

-> Running build hook: [block]

==> WARNING: Possibly missing firmware for module: xhci_pci

-> Running build hook: [keyboard]

-> Running build hook: [keymap]

-> Running build hook: [filesystems]

-> Running build hook: [resume]

==> Generating module dependencies

==> Creating gzip-compressed initcpio image: /boot/initramfs-5.8-x86_64-fallback.img

==> Image generation successful

(5/5) Updating Grub-Bootmenu

Generating grub configuration file ...

Found theme: /usr/share/grub/themes/manjaro/theme.txt

Found linux image: /boot/vmlinuz-5.8-x86_64

Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.8-x86_64.img

Found initrd fallback image: /boot/initramfs-5.8-x86_64-fallback.img

Found linux image: /boot/vmlinuz-5.7-x86_64

Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.7-x86_64.img

Found initrd fallback image: /boot/initramfs-5.7-x86_64-fallback.img

Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi

Adding boot menu entry for UEFI Firmware Settings ...

Found memtest86+ image: /boot/memtest86+/memtest.bin

/usr/bin/grub-probe: warning: unknown device type nvme0n1.

done

Fertig ...

/var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/make.log :

DKMS make.log for rtl8821ce-v5.5.2_34066.20200325 for kernel 5.8.3-2-MANJARO (x86_64)
Fri Aug 28 11:58:05 CEST 2020
make: uname: No such file or directory
make: pwd: No such file or directory
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.8.3-2-MANJARO/build M=  modules
make: pwd: No such file or directory
make: make: No such file or directory
make: *** [Makefile:2244: modules] Error 127

/var/lib/dkms/rtl8821ce/1.0.5.r95.g69765eb/build/make.log:

DKMS make.log for rtl8821ce-1.0.5.r95.g69765eb for kernel 5.8.3-2-MANJARO (x86_64)
Fri Aug 28 11:58:06 CEST 2020
make: uname: No such file or directory
make: pwd: No such file or directory
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.8.3-2-MANJARO/build M=  modules
make: pwd: No such file or directory
make: make: No such file or directory
make: *** [Makefile:2244: modules] Error 127

/var/lib/dkms/smartcam/1.4.0/build/make.log:

DKMS make.log for smartcam-1.4.0 for kernel 5.8.3-2-MANJARO (x86_64)
Fri Aug 28 11:58:06 CEST 2020
make: Entering directory '/usr/lib/modules/5.8.3-2-MANJARO/build'
make: uname: No such file or directory
make: gcc: No such file or directory
make: make: No such file or directory
make: *** [Makefile:1756: /var/lib/dkms/smartcam/1.4.0/build] Error 127
make: Leaving directory '/usr/lib/modules/5.8.3-2-MANJARO/build'

And so on…

When I boot Kernel 5.8.3-2
and run ‘sudo dkms autobuild’, I get this log for module rtl8821ce:

DKMS make.log for rtl8821ce-v5.5.2_34066.20200325 for kernel 5.8.3-2-MANJARO (x86_64)
Fr 28. Aug 12:31:53 CEST 2020
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.8.3-2-MANJARO/build M=/var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build  modules
make[1]: Verzeichnis „/usr/lib/modules/5.8.3-2-MANJARO/build“ wird betreten
  CC [M]  /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_ieee80211.o
  CC [M]  /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_io.o
  CC [M]  /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_mlme.o
  CC [M]  /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_ioctl_query.o
  CC [M]  /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_ioctl_set.o
In Datei, eingebunden von /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/include/drv_types.h:79,
                 von /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_ioctl_query.c:17:
/var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/include/rtw_security.h:252:8: Fehler: Redefinition von »struct sha256_state«
  252 | struct sha256_state {
      |        ^~~~~~~~~~~~
In Datei, eingebunden von /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/include/drv_types.h:79,
                 von /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_io.c:47:
/var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/include/rtw_security.h:252:8: Fehler: Redefinition von »struct sha256_state«
  252 | struct sha256_state {
      |        ^~~~~~~~~~~~
In Datei, eingebunden von /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/include/drv_types.h:79,
                 von /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_security.c:17:
/var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/include/rtw_security.h:252:8: Fehler: Redefinition von »struct sha256_state«
  252 | struct sha256_state {
      |        ^~~~~~~~~~~~
In Datei, eingebunden von /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/include/drv_types.h:79,
                 von /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/core/rtw_debug.c:17:
/var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/include/rtw_security.h:252:8: Fehler: Redefinition von »struct sha256_state«
  252 | struct sha256_state {
      |        ^~~~~~~~~~~~

Can someone please fix this?
I never experienced this in the past for kernel < 5.8 …
Or is there a simple workaround meanwhile?

Update: Could solve the issue with a rebuild of the 8821ce module from tomaspino
With that, WLAN and bluetooth was working again.
BUT, network speed in/out is with 5.8.3-2 not visible anymore in Ksysguard.
But, internal Vega 8 gpu is not recognized as opencl device anymore.
Had to switch back to 5.7.

Kind regards,

Jörn-Ingo Weigert

Update:

KSysGuard don’t show at all at least the WLAN network speed after the last update.
So this seems not related to my problems with building Kernel modules for 5.8 / 5.9

Hi!
Did you try with rtl8821-dkms from AUR?
It work just fine for me

I do use the rtl8821ce-dkms-git (which is based on the tomaspino repository.
That worked after an rebuild (& refetch) with kernel 5.8. U don’t know if your package do use the same code.

But due to a non working opencl support for my internal Vega 8 you in my ryzen CPU I had to change back to kernel 5.7.17(!?).

So far, I must say I haven’t experienced any problems that much than with the 5.8 kernel in it’s recent incarnations.