Can not Install rtl8852au driver on kernel 6.13.8

Hello,
I recently moved from Linux Mint to EndeavourOS, so I’m quite new to this. I have Wifi USB adapter Asus AX56. I tried installing rtl8852au driver, but all I get is this error. I tried to apply a patch that I found on the Github of this driver under issues, but I couldn’t figure out how to apply it. All help is much appreciated.

make[4]: *** [/usr/lib/modules/6.13.8-arch1-1/build/scripts/Makefile.build:196: os_dep/osdep_service_linux.o] Error 1
make[3]: *** [/usr/lib/modules/6.13.8-arch1-1/build/Makefile:1989: .] Error 2
make[2]: *** [/usr/lib/modules/6.13.8-arch1-1/build/Makefile:251: __sub-make] Error 2
make[2]: Leaving directory '/home/antonio/rtl8852au'
make[1]: *** [Makefile:251: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.13.8-arch1-1/build'
make: *** [Makefile:639: modules] Error 2
[sudo] password for antonio: 
install -p -m 644 8852au.ko  /lib/modules/6.13.8-arch1-1/kernel/drivers/net/wireless/realtek/rtw89/
install: cannot stat '8852au.ko': No such file or directory
make: *** [Makefile:649: install] Error 1

System:
  Kernel: 6.13.8-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc
  Desktop: KDE Plasma v: 6.3.3 tk: Qt v: N/A wm: kwin_wayland vt: 1 dm: SDDM
    Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: A520 AORUS ELITE v: -CF
    serial: <superuser required>
  Mobo: Gigabyte model: A520 AORUS ELITE v: x.x serial: <superuser required>
    uuid: <superuser required> UEFI: American Megatrends LLC. v: F17
    date: 06/08/2023
CPU:
  Info: 6-core model: AMD Ryzen 5 5600X bits: 64 type: MT MCP smt: enabled
    arch: Zen 3+ rev: 2 cache: L1: 384 KiB L2: 3 MiB L3: 32 MiB
  Speed (MHz): avg: 1734 min/max: 550/4651 boost: enabled cores: 1: 1734
    2: 1734 3: 1734 4: 1734 5: 1734 6: 1734 7: 1734 8: 1734 9: 1734 10: 1734
    11: 1734 12: 1734 bogomips: 88635
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 23 [Radeon RX 6600/6600
    XT/6600M] vendor: XFX driver: amdgpu v: kernel arch: RDNA-2 pcie:
    speed: 16 GT/s lanes: 16 ports: active: HDMI-A-1 empty: DP-1, DP-2, DP-3,
    Writeback-1 bus-ID: 07:00.0 chip-ID: 1002:73ff class-ID: 0300
  Display: wayland server: X.org v: 1.21.1.16 with: Xwayland v: 24.1.6
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu display-ID: 0
  Monitor-1: HDMI-A-1 model: Philips FTV serial: <filter> res:
    mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 76 size: 640x360mm (25.2x14.17")
    diag: 734mm (28.9") modes: max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast gbm: drv: kms_swrast surfaceless: drv: radeonsi
    wayland: drv: radeonsi x11: drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 25.0.2-arch1.2
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 6600 (radeonsi navi23
    LLVM 19.1.7 DRM 3.61 6.13.8-arch1-1) device-ID: 1002:73ff display-ID: :1.0
  API: Vulkan Message: No Vulkan data available.
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info
    x11: xdpyinfo, xprop, xrandr
Audio:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 21/23 HDMI/DP Audio
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 07:00.1 chip-ID: 1002:ab28 class-ID: 0403
  Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio
    vendor: Gigabyte driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s
    lanes: 16 bus-ID: 09:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: C-Media CM108 Audio Controller
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 bus-ID: 1-3.4:7 chip-ID: 0d8c:013c class-ID: 0300
  API: ALSA v: k6.13.8-arch1-1 status: kernel-api
  Server-1: PipeWire v: 1.4.1 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: f000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp4s0 state: down mac: <filter>
  Device-2: ASUSTek 802.11ac WLAN Adapter driver: N/A type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-3:2 chip-ID: 0b05:1997 class-ID: 0000
    serial: <filter>
  IF-ID-1: enp2s0f0u8 state: unknown speed: -1 duplex: half mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.1
    speed: 12 Mb/s lanes: 1 bus-ID: 1-3.1:4 chip-ID: 0bda:8771 class-ID: e001
    serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: disabled
    rfk-block: hardware: no software: no address: N/A
  Device-2: Samsung Galaxy series misc. (tethering mode) driver: rndis_host
    v: kernel type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-8:9
    chip-ID: 04e8:6863 class-ID: 0a00 serial: <filter>
Drives:
  Local Storage: total: 1.82 TiB used: 10.23 GiB (0.5%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 980 1TB size: 931.51 GiB
    speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: 3B4QFXO7
    temp: 31.9 C scheme: GPT
  ID-2: /dev/sda vendor: Toshiba model: HDWD110 size: 931.51 GiB
    speed: 6.0 Gb/s tech: HDD rpm: 7200 serial: <filter> fw-rev: A8J0
Partition:
  ID-1: / size: 913.85 GiB used: 10.15 GiB (1.1%) fs: ext4 dev: /dev/nvme0n1p2
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 43.5 C mobo: 28.0 C gpu: amdgpu temp: 35.0 C
    mem: 36.0 C
  Fan Speeds (rpm): N/A gpu: amdgpu fan: 0
Info:
  Memory: total: 16 GiB available: 15.54 GiB used: 3.4 GiB (21.9%)
  Processes: 306 Power: uptime: 27m states: freeze,mem,disk suspend: deep
    wakeups: 0 hibernate: platform Init: systemd v: 257 default: graphical
  Packages: pm: pacman pkgs: 1001 Compilers: gcc: 14.2.1 Shell: Bash
    v: 5.2.37 running-in: konsole inxi: 3.3.37

[edit/]

I missed that about the patch. So never mind what I wrote below.
You could post the link to the patch?

[/edit]

How are you building and installing it?

There is

I did:

mkdir ~/Downloads/tmp
cd ~/Downloads/tmp
git clone https://aur.archlinux.org/rtw89-dkms-git.git
cd rtw89-dkms-git 
makepkg -sr

It builds the packages fine.

see here
$ makepkg -sr
==> Making package: rtw89-dkms-git r1094.67a66dd-1 (Sat 29 Mar 2025 04:44:35 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning rtw89 git repo...
Cloning into bare repository '/home/cactux/Downloads/tmp/rtw89-dkms-git/rtw89'...
remote: Enumerating objects: 5857, done.
remote: Counting objects: 100% (5857/5857), done.
remote: Compressing objects: 100% (1244/1244), done.
remote: Total 5857 (delta 4640), reused 5824 (delta 4609), pack-reused 0 (from 0)
Receiving objects: 100% (5857/5857), 9.77 MiB | 2.18 MiB/s, done.
Resolving deltas: 100% (4640/4640), done.
==> Validating source files with sha256sums...
    rtw89 ... Skipped
==> Extracting sources...
  -> Creating working copy of rtw89 git repo...
Cloning into 'rtw89'...
done.
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: rtw89-dkms-git r1151.e9b4224-1
==> 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 "rtw89-dkms-git"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: rtw89-dkms-git r1151.e9b4224-1 (Sat 29 Mar 2025 04:44:46 PM CET)