[GH-ISSUE #69] [Bug]: #58

Open
opened 2026-10-13 19:33:44 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @arnieSkyNet on GitHub (Aug 7, 2026).
Original GitHub issue: https://github.com/morrownr/8812au-20210820/issues/69

Checklist

  • I am not using this driver from inside a Virtual Machine.
  • I performed all of the installation steps as written.
  • I have read the FAQ and my question is not answered there.

Is Secure Boot enabled?

No response

uname

Linux flo64 6.12.101+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.101-1 (2026-08-05) x86_64 GNU/Linux

lsusb

sudo lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 08bb:2902 Texas Instruments PCM2902 Audio Codec Bus 001 Device 003: ID 10d7:b012 Actions general adapter Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 001 Device 005: ID 047d:1020 Kensington Expert Mouse Trackball Bus 001 Device 006: ID 046d:0994 Logitech, Inc. QuickCam Orbit/Sphere AF Bus 001 Device 007: ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20 Bus 001 Device 008: ID 2357:0101 TP-Link RTL8812AU Archer T4U 802.11ac

rfkill

0: hci0: Bluetooth Soft blocked: no Hard blocked: no 1: phy0: Wireless LAN Soft blocked: no Hard blocked: no

dkms

rtl8812au/5.13.6-23, 6.12.101+deb13-amd64, x86_64: installed
mark@flo64:/tmp/8812au-20210820$

iw

sudo iw dev
phy#0
	Interface wlxe8de279f6f2a
		ifindex 4
		wdev 0x1
		addr e8:de:27:9f:6f:2a
		ssid LoveURtilts
		type managed
		channel 40 (5200 MHz), width: 80 MHz, center1: 5210 MHz
		txpower 16.00 dBm

git status

git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
mark@flo64:/tmp/8812au-20210820$

install-driver.sh

sudo ./install-driver.sh
: ---------------------------
: install-driver.sh v20241003
: x86_64 (kernel architecture)
: x86_64 (architecture to send to gcc)
: 8/8 (in-use/total processing units)
: 16316464 (total system memory)
: 6.12.101+deb13-amd64 (kernel version)
: gcc-14 (version of gcc used to compile the kernel)
: gcc (Debian 14.2.0-19) 14.2.0
: dkms-3.2.2
: SecureBoot disabled
: ---------------------------

Checking for previously installed drivers...
Removing a driver that was installed by dkms.
Module rtl8812au/5.13.6-23 for kernel 6.12.101+deb13-amd64 (x86_64):
Before uninstall, this module version was ACTIVE on this kernel.
Deleting /lib/modules/6.12.101+deb13-amd64/updates/dkms/8812au.ko.xz
Running depmod.... done.

Deleting module rtl8812au/5.13.6-23 completely from the DKMS tree.
Removing 8812au.conf from /etc/modprobe.d
Removing source files from /usr/src/rtl8812au-5.13.6-23
Finished checking for and uninstalling previously installed drivers.
: ---------------------------

Starting installation.
Copying 8812au.conf to /etc/modprobe.d
The dkms installation routines are in use.
Copying source files to /usr/src/rtl8812au-5.13.6-23
Creating symlink /var/lib/dkms/rtl8812au/5.13.6-23/source -> /usr/src/rtl8812au-5.13.6-23
The driver was added to dkms successfully.
: ---------------------------

Sign command: /lib/modules/6.12.101+deb13-amd64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module(s)......(bad exit status: 2)
Failed command:
kernelver=6.12.101+deb13-amd64 ./dkms-make.sh

Error! Bad return status for module build on kernel: 6.12.101+deb13-amd64 (x86_64)
Consult /var/lib/dkms/rtl8812au/5.13.6-23/build/make.log for more information.
An error occurred. dkms build error:  10
Please report this error.
Please copy all screen output and paste it into the problem report.
Run the following before reattempting installation.
$ sudo ./remove-driver.sh
mark@flo64:/tmp/8812au-20210820$

What happened?

Title:
Build failure on Linux 6.12.101 (Debian 13) fixed by changing cfg80211 kernel version check

System:

  • Debian GNU/Linux 13 (trixie)
  • Kernel: 6.12.101+deb13-amd64
  • Architecture: x86_64
  • GCC: 14.2.0
  • Adapter: TP-Link Archer T4U RTL8812AU
  • USB ID: 2357:0101

Problem:
DKMS build fails with:

error: initialization of ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_chan_def )’
from incompatible pointer type
‘int (
)(struct wiphy *, struct cfg80211_chan_def *)’

Cause:
In os_dep/linux/ioctl_cfg80211.c the code uses:

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))

but Linux 6.12 requires the newer cfg80211 set_monitor_channel signature.

Fix:
Changed it to:

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0))

After this change:
dkms build succeeded
dkms install succeeded
Wi-Fi interface loaded successfully:
wlxe8de279f6f2a

Originally created by @arnieSkyNet on GitHub (Aug 7, 2026). Original GitHub issue: https://github.com/morrownr/8812au-20210820/issues/69 ### Checklist - [x] I am not using this driver from inside a Virtual Machine. - [x] I performed all of the [installation steps](/README.md#installation-steps) as written. - [x] I have read the [FAQ](/FAQ.md) and my question is not answered there. ### Is Secure Boot enabled? _No response_ ### uname Linux flo64 6.12.101+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.101-1 (2026-08-05) x86_64 GNU/Linux ### lsusb sudo lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 08bb:2902 Texas Instruments PCM2902 Audio Codec Bus 001 Device 003: ID 10d7:b012 Actions general adapter Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 001 Device 005: ID 047d:1020 Kensington Expert Mouse Trackball Bus 001 Device 006: ID 046d:0994 Logitech, Inc. QuickCam Orbit/Sphere AF Bus 001 Device 007: ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20 Bus 001 Device 008: ID 2357:0101 TP-Link RTL8812AU Archer T4U 802.11ac ### rfkill 0: hci0: Bluetooth Soft blocked: no Hard blocked: no 1: phy0: Wireless LAN Soft blocked: no Hard blocked: no ### dkms ```text rtl8812au/5.13.6-23, 6.12.101+deb13-amd64, x86_64: installed mark@flo64:/tmp/8812au-20210820$ ``` ### iw ```text sudo iw dev phy#0 Interface wlxe8de279f6f2a ifindex 4 wdev 0x1 addr e8:de:27:9f:6f:2a ssid LoveURtilts type managed channel 40 (5200 MHz), width: 80 MHz, center1: 5210 MHz txpower 16.00 dBm ``` ### git status ```text git status On branch main Your branch is up to date with 'origin/main'. nothing to commit, working tree clean mark@flo64:/tmp/8812au-20210820$ ``` ### install-driver.sh ```text sudo ./install-driver.sh : --------------------------- : install-driver.sh v20241003 : x86_64 (kernel architecture) : x86_64 (architecture to send to gcc) : 8/8 (in-use/total processing units) : 16316464 (total system memory) : 6.12.101+deb13-amd64 (kernel version) : gcc-14 (version of gcc used to compile the kernel) : gcc (Debian 14.2.0-19) 14.2.0 : dkms-3.2.2 : SecureBoot disabled : --------------------------- Checking for previously installed drivers... Removing a driver that was installed by dkms. Module rtl8812au/5.13.6-23 for kernel 6.12.101+deb13-amd64 (x86_64): Before uninstall, this module version was ACTIVE on this kernel. Deleting /lib/modules/6.12.101+deb13-amd64/updates/dkms/8812au.ko.xz Running depmod.... done. Deleting module rtl8812au/5.13.6-23 completely from the DKMS tree. Removing 8812au.conf from /etc/modprobe.d Removing source files from /usr/src/rtl8812au-5.13.6-23 Finished checking for and uninstalling previously installed drivers. : --------------------------- Starting installation. Copying 8812au.conf to /etc/modprobe.d The dkms installation routines are in use. Copying source files to /usr/src/rtl8812au-5.13.6-23 Creating symlink /var/lib/dkms/rtl8812au/5.13.6-23/source -> /usr/src/rtl8812au-5.13.6-23 The driver was added to dkms successfully. : --------------------------- Sign command: /lib/modules/6.12.101+deb13-amd64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Building module(s)......(bad exit status: 2) Failed command: kernelver=6.12.101+deb13-amd64 ./dkms-make.sh Error! Bad return status for module build on kernel: 6.12.101+deb13-amd64 (x86_64) Consult /var/lib/dkms/rtl8812au/5.13.6-23/build/make.log for more information. An error occurred. dkms build error: 10 Please report this error. Please copy all screen output and paste it into the problem report. Run the following before reattempting installation. $ sudo ./remove-driver.sh mark@flo64:/tmp/8812au-20210820$ ``` ### What happened? Title: Build failure on Linux 6.12.101 (Debian 13) fixed by changing cfg80211 kernel version check System: - Debian GNU/Linux 13 (trixie) - Kernel: 6.12.101+deb13-amd64 - Architecture: x86_64 - GCC: 14.2.0 - Adapter: TP-Link Archer T4U RTL8812AU - USB ID: 2357:0101 Problem: DKMS build fails with: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_chan_def *)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct cfg80211_chan_def *)’ Cause: In os_dep/linux/ioctl_cfg80211.c the code uses: #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0)) but Linux 6.12 requires the newer cfg80211 set_monitor_channel signature. Fix: Changed it to: #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)) After this change: dkms build succeeded dkms install succeeded Wi-Fi interface loaded successfully: wlxe8de279f6f2a
Author
Owner

@timkb4cq commented on GitHub (Aug 8, 2026):

Thank you.
I maintain the MX Linux packages of these rtl drivers and you saved me a lot of time getting those patched when Debian released 6.12.101
Though I used
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 101))
so the packages would still build if users hadn't upgraded from prior 6.12 kernels.

<!-- gh-comment-id:5228874389 --> @timkb4cq commented on GitHub (Aug 8, 2026): Thank you. I maintain the MX Linux packages of these rtl drivers and you saved me a lot of time getting those patched when Debian released 6.12.101 Though I used #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 101)) so the packages would still build if users hadn't upgraded from prior 6.12 kernels.
Author
Owner

@cybersnow02 commented on GitHub (Aug 11, 2026):

I also noticed that when kernel 6.12.101 got published. I updated the code like you did in my repo : https://github.com/cybersnow02/8812au-20210820

Kernel 6.12.101 started using net_device suddenly
All kernels are supported up to 7.1

@morrownr should update this too.

<!-- gh-comment-id:5248495012 --> @cybersnow02 commented on GitHub (Aug 11, 2026): I also noticed that when kernel 6.12.101 got published. I updated the code like you did in my repo : https://github.com/cybersnow02/8812au-20210820 Kernel 6.12.101 started using net_device suddenly All kernels are supported up to 7.1 @morrownr should update this too.
Sign in to join this conversation.
No labels
bug
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morrownr/8812au-20210820#58
No description provided.