Install Realtek WiFi driver on popos

I just installed Pop on my New Lenovo E16, and me o my the wifi doesn’t work, did some googling and decided I want a dkms package so I can update the machine like normal, but when I use: https://github.com/lwfinger/rtw89 it fails to build at all

root@pop-os:/home/logan/rtw89-dkms-git# git clean -xfd
root@pop-os:/home/logan/rtw89-dkms-git# git deborig HEAD
pwd doesn't look like a Debian source package ..
root@pop-os:/home/logan/rtw89-dkms-git# dpkg-buildpackage -us -uc
dpkg-buildpackage: error: cannot open file debian/changelog: No such file or directory
root@pop-os:/home/logan/rtw89-dkms-git#

This is my first time trying to install a driver to linux as my laptop was always a bit older so I am lost on any of this, any help would be much appreciated

info: secure boot is enabled

root@pop-os:/home/logan/rtw89-dkms-git# lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:02.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 7
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b852
03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Barcelo (rev c4)
04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller
04:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
04:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
04:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
04:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor (rev 01)
04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
root@pop-os:/home/logan/rtw89-dkms-git#
Linux pop-os 6.2.6-76060206-generic #202303130630~1689015125~22.04~ab2190e SMP PREEMPT_DYNAMIC Mon J x86_64 x86_64 x86_64 GNU/Linux
1 Like

First, you’ll need to accurately identify the WiFi chip used.

Most built-in adapters on motherboards generally connect to the PCIe bus on the WiFi side, and to the USB bus on the Bluetooth side. So, you should run lspci -nn and find the line referring to your WiFi adapter: the hex numbers in square brackets like [xxxx:yyyy] can be very useful in identifying the WiFi chip, if the name displayed by the lspci command is not descriptive enough.

The first part if the [xxxx:yyyy] is a vendor ID, and the second is a product ID assigned by that particular vendor. You can use the numbers to look up the device in the PCI ID Repository: this might be helpful if the distribution’s list of PCI IDs and corresponding human-readable names is not up to date enough to fully identify the WiFI adapter chip.

Once you know the name of the WiFi chip vendor, you can go to en:users:drivers [Linux Wireless] and find out about any relevant drivers. By looking at vendor and bus type, you can usually limit it to just a few possible drivers, then it’s time to read the information pages of those drivers and see if your WiFi chip is supported by the driver.

If you find a driver that supports your WiFi chip, the next question is “is that driver module already present on your system?” You can use the lsmod command to list all the currently-loaded kernel modules, and sudo modinfo <name-of-module> to see if a module exists but is not getting automatically loaded for some reason. You can also run sudo dmesg -H to view the kernel message buffer: if something has gone wrong in hardware detection, you might see more information about the problem in there.

The problem might be that your WiFi chip needs firmware, which is not allowed to be redistributed by anyone other than the chip vendor. In that case, the driver information page at wireless.wiki.kernel.org will have information on how to download and extract the necessary firmware from a package downloadable from the vendor’s website, and how to place the extracted firmware file to proper location so that the driver will find it (normally somewhere under /lib/firmware).

1 Like

so nothing comes up for first part, so i took the laptop apart and i have a : Realtek RTL8852BE

and on the second page my wifi card is no where to be found, i hardly see any AX cards listed in there

1 Like

Here’s a Linux driver for the Realtek RTL8852BE listed on GitHub.

Edit - Looks like it links to this page for newer Linux kernels -

1 Like

You linked to the one I said I tried to compile and it failed haha

1 Like

what’s with the deborig?

like, have you tried the boring, straight install using the Ubuntu instructions?

yes, after a hour i broke down and installed that, and of course it works, but every time i update the machine now i have to add it back, least im lead to believe thats how that works

1 Like

fair.

I did a quick quack and it looks like the beborig is to make the package, into more of a native app?
for better update in future?

I could be wrong?

otherwise, will the DPKG fail when changing release / major versions?

I presume, if the simple way works, then perhaps you might be able to do the long way…

Looks like here’s instructions specific to Pop!_OS -

1 Like

another wrench in the plans, secure boot is enabled on my device, but the github talks about:

Reboot to activate the new installed module. In the MOK managerment screen:
    Select "Enroll key" and enroll the key created by above sign-install step
    When promted, enter the password you entered when create sign key.
    If you enter wrong password, your computer won't not bebootable.

I did the reboot but I got nothing poping up about MOK, my Bluetooth is very laggy the mouse is not happy so maybe its related to that. what is mok and how do i get it to “enroll key” haha

and at this point i guess i can use the normal compile and install way and hope the the kernel gods include the driver at some point in the future

1 Like

When secure boot is enabled it will prevent booting normally when unsigned drivers are loaded ie tainted kernel.

The drivers signature key needs to be enrolled into the Secure Boot key store on your motherboard. This is done via the mok utility.

For drivers manually compiled from source you need to create a key manually and enroll the key.

Or you could just turn secure boot off which is what most people do since it’s far less work.

Dang man, I just picked up a machine with the same card.
DD-ing windows to an image, then I’ll give pop a try tomorrow, see if I can have a go poking at it

(so thanks for timely link)

Right, I had disabled secure boot, as I’ve not binned the built in windows install yet.

I have managed to build the DKMS driver though.
too soon to tell if it persists across kernels.

My laptop is a HP 255 G9.
for the minute, I only installed pop on an external SSD

trooperish@pop-os:~$ cat /etc/os-release
NAME=“Pop!_OS”
VERSION=“22.04 LTS”
trooperish@pop-os:~$ uname -a
Linux pop-os 6.4.6-76060406-generic

pci id 01:00.0 is my wlan card. I used 02:00.0 as a comparison

Before install
root@pop-os:/home/trooperish# lspci -knn -s 02:00.0 ; lspci -knn -s 01:00.0
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
		DeviceName: Hanksville Gbe Lan Connection
		Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [103c:8a1b]
		Kernel driver in use: r8169
		Kernel modules: r8169
01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b852]
		DeviceName: WLAN
		Subsystem: Hewlett-Packard Company Device [103c:88e3]
Steps for me
sudo apt-get update
sudo apt-get install make gcc linux-headers-$(uname -r) build-essential git
git clone https://github.com/lwfinger/rtw89.git
cd rtw89
#####scrolled down to dkms section
sudo apt install dh-sequence-dkms debhelper build-essential devscripts
git clean -xfd
git deborig HEAD
### no error reported like logan71f100 experienced....
dpkg-buildpackage -us -uc
### output a load of script to screen. looks like it completed as expected
sudo apt install ../rtw89-dkms_1.0.2-3_all.deb
###did receive the error: "N: Download is performed unsandboxed as root, as file 
###    '/home/trooperish/wifi-git/rtw89-dkms_1.0.2-3_all.deb' couldn't be accessed by user 
###    '_apt'. - pkgAcquire::Run (13: Permission denied)"
###
### chmod file to 0777 and tried again, received the info that the app was already installed
### didn't worry about it any further; 
### rebooted and used the wifi
PCI after
trooperish@pop-os:~/newifi$ lspci -knn -s 02:00.0 ; lspci -knn -s 01:00.0
 02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
 		DeviceName: Hanksville Gbe Lan Connection
 		Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [103c:8a1b]
 		Kernel driver in use: r8169
 		Kernel modules: r8169
 01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b852]
 		DeviceName: WLAN
 		Subsystem: Hewlett-Packard Company Device [103c:88e3]
 		Kernel modules: rtw_8852be

It might be that the file created in the install, and the directory I created it in (home folder) are not accessible to Apt, and when I update, it might all go… away…

Again, I did not install the secure boot bit. That’ll prolly mess me up too, later

Iv been running the normal non dkms install and its been fine even with secure boot on, nothing popped up asking me about keys its just been fine, but I am sure if I ran a apt upgrade and grabbed new kernel I would be installing the wifi driver again

1 Like

its been working with secure boot on for several days now… guess it shouldn’t but it does, will see about next kernel update tho

1 Like