Score:0

RTL8852BE, ubuntu 22.04: realtek manual driver installation throws error after system update

cx flag

I've been following this gh-repo to manually install Realtek drivers on Ubuntu (22.04).

My understanding so far is that this specific card is not being properly "recognized" by Linux, so manual driver installation is a workaround. Over the past months, after each kernel update the issue would re-emerge and on dir rtl8852be I would re-run the following commands:

make clean
make
sudo make install

Ubuntu would recognize the Network Card again and everything would work just fine. Today, after Ubuntu update, on system reboot I got the expected problem. Followed the usual steps, but on

make

got the following unexpected error:

#rm -f .symvers.8852be
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.19.0-32-generic/build M=/home/user/rtl8852be  modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-32-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /home/user/rtl8852be/platform/platform_linux_pc_pci.o
/home/user/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_wback’:
/home/user/rtl8852be/platform/platform_linux_pc_pci.c:21:17: error: implicit declaration of function ‘pci_dma_sync_single_for_device’; did you mean ‘dma_sync_single_for_device’? [-Werror=implicit-function-declaration]
   21 |                 pci_dma_sync_single_for_device(hwdev, *bus_addr, size,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_device
/home/user/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_inv’:
/home/user/rtl8852be/platform/platform_linux_pc_pci.c:30:17: error: implicit declaration of function ‘pci_dma_sync_single_for_cpu’; did you mean ‘dma_sync_single_for_cpu’? [-Werror=implicit-function-declaration]
   30 |                 pci_dma_sync_single_for_cpu(hwdev, *bus_addr, size, direction);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_cpu
/home/user/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_get_bus_addr’:
/home/user/rtl8852be/platform/platform_linux_pc_pci.c:39:29: error: implicit declaration of function ‘pci_map_single’; did you mean ‘dma_map_single’? [-Werror=implicit-function-declaration]
   39 |                 *bus_addr = pci_map_single(hwdev, vir_addr, size, direction);
      |                             ^~~~~~~~~~~~~~
      |                             dma_map_single
/home/user/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_unmap_bus_addr’:
/home/user/rtl8852be/platform/platform_linux_pc_pci.c:50:17: error: implicit declaration of function ‘pci_unmap_single’; did you mean ‘dma_unmap_single’? [-Werror=implicit-function-declaration]
   50 |                 pci_unmap_single(hwdev, *bus_addr, size, direction);
      |                 ^~~~~~~~~~~~~~~~
      |                 dma_unmap_single
/home/user/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_free_noncache_mem’:
/home/user/rtl8852be/platform/platform_linux_pc_pci.c:97:17: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
   97 |                 pci_free_consistent(pdev, size, vir_addr, *bus_addr);
      |                 ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:257: /home/user/rtl8852be/platform/platform_linux_pc_pci.o] Error 1
make[1]: *** [Makefile:1850: /home/user/rtl8852be] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-32-generic'
make: *** [Makefile:637: modules] Error 2

I'm very little knowledgeable in Linux and C, so I thank you in advance for your patience. At the moment I can't connect using the WI-FI. Any help will be highly appreciated.

Pilot6 avatar
cn flag
That driver doesn't build with the new 5.19 kernel. You need to find something else.
Pilot6 avatar
cn flag
You can boot with a previous kernel and Wi-Fi should work.
Score:1
cn flag

As @Pilot6 says, that driver doesn't build with the new 5.19 kernel. I suggest that you delete the rtl8852be directory from your system. Next, with a temporary ethernet connection, tethering or whatever means possible, do:

git clone https://github.com/lwfinger/rtw89.git
cd rtw89
make
sudo make install

Reboot. You should be all set.

Pilot6 avatar
cn flag
This will be set till the next kernel upgrade ;-)
cauliflower251 avatar
cx flag
It worked, thank you so much for your invaluable support! On a side note: @Pilot6, what previous version of the kernel would you recommend me to boot? Or is _any_ previous version just fine? Just making sure I don't mess up my linux partition :-)
chili555 avatar
cn flag
If my answer has been helpful, please accept it: https://askubuntu.com/tour The searchers will appreciate it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.