Score:0

Wifi missing from Ubuntu 22 - Realtek Semiconductor Co., Ltd - b852

cy flag

I use dual boot (Windows / Ubuntu 22) on my laptop and I have no Wifi options showing up in Ubuntu (in Windows everything is working as expected)

Here is the relevant part from "sudo lshw -C network"

  *-network UNCLAIMED
   description: Network controller
   product: Realtek Semiconductor Co., Ltd.
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:2c:00.0
   version: 00
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress cap_list
   configuration: latency=0
   resources: ioport:3000(size=256) memory:5e400000-5e4fffff

and here from "lspci -nnk | grep -iA2 net"

2c:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b852]
Subsystem: Lenovo Device [17aa:4853]

I found this answer: Network Driver for Realtek 10ec:b852

but when running "make" i get the following errors:

   #rm -f .symvers.8852be
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.19.0-46-generic/build M=/home/jakob/Programs/rtl8852be  modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-46-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.1) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  CC [M]  /home/jakob/Programs/rtl8852be/platform/platform_linux_pc_pci.o
/home/jakob/Programs/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_wback’:
/home/jakob/Programs/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/jakob/Programs/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_cache_inv’:
/home/jakob/Programs/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/jakob/Programs/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_get_bus_addr’:
/home/jakob/Programs/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/jakob/Programs/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_unmap_bus_addr’:
/home/jakob/Programs/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/jakob/Programs/rtl8852be/platform/platform_linux_pc_pci.c: In function ‘pci_free_noncache_mem’:
/home/jakob/Programs/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/jakob/Programs/rtl8852be/platform/platform_linux_pc_pci.o] Error 1
make[1]: *** [Makefile:1857: /home/jakob/Programs/rtl8852be] Error 2

please help me. I am completely lost on how to solve this.

Score:0
my flag

Realtek drivers are known for having issues especially the RTL88xxxx series. I have had countless problems with it in the past.

Looking at the logs I can see that your exact model is RTL8852BE. Good news is that Linux kernel versions 6.2+ come with the driver therefore Ubuntu 23.04 natively ships the driver, so you can just upgrade to version 23.04.

Alternative to this (if you don't want to do distro upgrade) is compiling and installing the drivers from this repository: https://github.com/HRex39/rtl8852be

Be careful of your kernel revision, this only works on kernel versions <= 6.0.0 More info can be found in the repository itself. These have been put together by another individual so you may find some problems here and there but they are relatively stable.

Please keep in mind that these drivers won't survive a kernel update, so after every kernel update you'll have to reinstall these. Also if you are dual booting make sure that secure boot is disabled.

I sit in a Tesla and translated this thread with Ai:

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.