WiFi driver compilation error RTL 8814au

msokol

Dabbler
Joined
Jan 5, 2023
Messages
10
Hello everyone,

I have a USB WiFi adapter based on the RTL 8814au chip. A GitHub community maintains its unofficial driver. Compiling it under the previous version of TrueNas Scale 22.12.xx.xx was absolutely no problem. And WiFi card had been working pretty well until I updated to the newest version TrueNas Cobia (23.10.xx.xx) with kernel 6.1.63. I had to recompile the driver, I pulled the newest one with the support of the latest kernel. However, during compilation, I got an error. Unfortunately, the main maintainer of the code is not familiar with TrueNas he suggested posting a question to this forum.

Below is the error I got:

Code:
root@truenas-bk[~/8814au]# cat /var/lib/dkms/rtl8814au/5.8.5.1/build/make.log
DKMS make.log for rtl8814au-5.8.5.1 for kernel 6.1.63-production+truenas (x86_64)
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.1.63-production+truenas/build M=/var/lib/dkms/rtl8814au/5.8.5.1/build  modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.63-production+truenas'
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_io.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_ioctl_query.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_ioctl_set.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_ieee80211.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_mlme.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_mlme_ext.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_mi.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_wlan_util.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_vht.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_pwrctrl.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_rf.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_chplan.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_recv.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_sta_mgt.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_ap.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/mesh/rtw_mesh.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_xmit.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_p2p.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_rson.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_tdls.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_br_ext.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_iol.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_sreset.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_btcoex_wifionly.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_btcoex.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_beamforming.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_odm.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_rm.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_rm_fsm.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/rtw_rm_util.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/core/efuse/rtw_efuse.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/osdep_service.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/linux/os_intfs.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/linux/usb_intf.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/linux/usb_ops_linux.o
  CC [M]  /var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/linux/ioctl_linux.o
/var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/linux/os_intfs.c: In function 'rtw_ndev_destructor':
/var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/linux/os_intfs.c:4208:19: error: 'struct net_device' has no member named 'ieee80211_ptr'; did you mean 'ieee802154_ptr'?
 4208 |         if (ndev->ieee80211_ptr)
      |                   ^~~~~~~~~~~~~
      |                   ieee802154_ptr
In file included from /var/lib/dkms/rtl8814au/5.8.5.1/build/include/drv_types.h:27,
                 from /var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/linux/os_intfs.c:17:
/var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/linux/os_intfs.c:4209:39: error: 'struct net_device' has no member named 'ieee80211_ptr'; did you mean 'ieee802154_ptr'?
 4209 |                 rtw_mfree((u8 *)ndev->ieee80211_ptr, sizeof(struct wireless_dev));
      |                                       ^~~~~~~~~~~~~
/var/lib/dkms/rtl8814au/5.8.5.1/build/include/osdep_service.h:276:53: note: in definition of macro 'rtw_mfree'
  276 | #define rtw_mfree(pbuf, sz)             _rtw_mfree((pbuf), (sz))
      |                                                     ^~~~
At top level:
cc1: note: unrecognized command-line option '-Wno-enum-int-mismatch' may have been intended to silence earlier diagnostics
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/rtl8814au/5.8.5.1/build/os_dep/linux/os_intfs.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:2015: /var/lib/dkms/rtl8814au/5.8.5.1/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.63-production+truenas'
make: *** [Makefile:2404: modules] Error 2


I know that it is not recommended to install apps in this way. But it is not for a production server, it is just my home backup server and I was absolutely happy with its network performance being connected to the Internet via wifi.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
TrueNAS SCALE is not a Linux distro, and adding drivers is not supported;
While you might get it to work, it will disappear with each update.

That said, I do believe that this is a developer mode for SCALE. I don't know much, and it is likely still evolving. That might be what you want. Search the forums.
 

msokol

Dabbler
Joined
Jan 5, 2023
Messages
10
TrueNAS SCALE is not a Linux distro, and adding drivers is not supported;
While you might get it to work, it will disappear with each update.

That said, I do believe that this is a developer mode for SCALE. I don't know much, and it is likely still evolving. That might be what you want. Search the forums.
Yes, to install any kind of software, not from the Truenas app store, I had to enable a developer mode. I did it partially by enabling apt and dpkg packages. Yesterday I found out how to enable this mode completely with full access to the system files and configs using official instructions. However, it did not help in solving the issue.

Still, I found on my system general headers for a not-present kernel version 6.1.0-9-amd64. If I select it instead of the latest stable production kernel version 6.1.63-production+truenas in the installation script, everything runs smoothly and the driver is being compiled successfully. Unfortunately, I can't use it since I don't have the corresponding kernel. So I believe the problem is on the kernel or headers level. Moreover, on Debian 12 the driver compiles also quite well according to the driver maintainer.

Maybe someone encountered something similar, maybe for different drivers?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Now if there are missing headers for the active kernel, (and useless headers for non-existent kernel), I would open a Bug on the issue. Top of the forum is a link to "Report a Bug".

You may be one of the few people currently using TrueNAS SCALE's developer mode. Thus, you may find problems like this.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I can't imagine iX adding in stuff to support WiFi... And it looks like the missing header is specifically for WiFi (802.11).

If you really need WiFi, use an external bridge.
 

msokol

Dabbler
Joined
Jan 5, 2023
Messages
10
If you really need WiFi, use an external bridge.
As I said I was happy with the WiFi performance and did not need to change anything. Since WiFi is not officially supported by the dev team, I decided to run a cable from the router to my backup server (both of them are offsite at my parent's apartment). I could have tried other USB dongles but don't want to waste time digging into something that has no official support.

But anyway thank you @Ericloewe for the option I never heard of. Unfortunately, I couldn't find a cheap WiFi bridge with a gigabit ethernet. All reasonably priced models are equipped with a 100Mbit/s ethernet port which is below the possibilities of my WiFi 5 card.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Most consumer router/access points support this functionality these days, so the sky is the limit, to some extent. Pricing, mostly.
 
Top