Score:1

Installed Ubuntu 20.04 alongside Windows 11 (SecureBoot disabled), installed r8168 driver from Realtek site, but still no WiFi

in flag

I got a new laptop yesterday with Windows 10 pre-installed, which I then upgraded to Windows 11. I installed Ubuntu 20.04 via USB (I was prompted to enter a MOK key. Upon rebooting after the Ubuntu installation, I was taken to the blue MOK screen, but the laptop froze, and I had to force-shutdown. Thereafter, I was not prompted to enter my MOK key again.)

I was able to connect to the internet via a wired connection, but not via WiFi. I have read multiple posts on similar issues with the WiFi adapter not being detected, and ended up implementing the solution in this post. I had to disable the Windows SecureBoot via BIOS in order to do so. I get the following output after installing the GBE Ethernet LINUX driver r8168 for kernel up to 5.6 driver:

niran90@Niran-Legion-5:~$ lsmod | grep r8168
r8168                 540672  0
niran90@Niran-Legion-5:~$ ifconfig -a
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.168  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 2c0f:f4c0:230c:70c:f135:e1ed:b192:3d38  prefixlen 64  scopeid 0x0<global>
        inet6 2c0f:f4c0:230c:70c:81f8:7e5e:3447:c391  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::9489:28e3:3526:a5ad  prefixlen 64  scopeid 0x20<link>
        ether 38:f3:ab:fc:7e:79  txqueuelen 1000  (Ethernet)
        RX packets 60923  bytes 69487638 (69.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 29425  bytes 3926470 (3.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 34  base 0x9000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2208  bytes 214071 (214.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2208  bytes 214071 (214.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
niran90@Niran-Legion-5:~$ sudo lshw -C network
[sudo] password for niran90: 
  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: eno1
       version: 15
       serial: 38:f3:ab:fc:7e:79
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.049.02-NAPI duplex=full ip=192.168.0.168 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:34 ioport:3000(size=256) memory:d1704000-d1704fff memory:d1700000-d1703fff
  *-network UNCLAIMED
       description: Network controller
       product: Realtek Semiconductor Co., Ltd.
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress cap_list
       configuration: latency=0
       resources: ioport:2000(size=256) memory:d1600000-d16fffff
niran90@Niran-Legion-5:~$ sudo ethtool -i eno1
driver: r8168
version: 8.049.02-NAPI
firmware-version: 
expansion-rom-version: 
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

After rebooting, I am still unable to connect to WiFi as the WiFi adapter is not found: enter image description here

Any advice/help here would be much appreciated!

EDITS:

As requested by user 'Jeremy31', please see output below:

niran90@Niran-Legion-5:~$ lspci -nnk |grep -iA3 net
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
    DeviceName: Realtek RTL8111E Ethernet LOM
    Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [17aa:3900]
    Kernel driver in use: r8168
    Kernel modules: r8168
04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8852]
    Subsystem: Lenovo Device [17aa:4852]
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1638] (rev c5)
    Subsystem: Lenovo Device [17aa:3a88]
Jeremy31 avatar
ke flag
Please post results for `lspci -nnk |grep -iA3 net`
niran90 avatar
in flag
@Jeremy31 Thanks, I have updated my post with the output I got.
Score:1
gb flag

I have also faced the same problem on my PC which is a dual boot system. If I start windows first and then restart (not shutdown) the system and go to ubuntu, the wifi gets detected and connected. On the other hand if I shutdown the system from windows and then start it to go to ubuntu, no wifi gets detected. See if this trick works for you. I have not been able to resolve this issue but using this route for the time being. I have secure boot on.

niran90 avatar
in flag
Try Akshaj Singla's solution above. It worked for me :)
Score:1
my flag

To get the Realtek PCI adapter working with Ubuntu, follow these steps:

  1. Update the software cache (repository list) and install the required dependencies:

    sudo apt-get update
    sudo apt-get install linux-headers-generic build-essential git
    
  2. Download and install the correct drivers:

    git clone https://github.com/lwfinger/rtw89.git -b v5
    cd rtw89 && make && sudo make install
    
  3. Reboot to confirm the installation:

    sudo reboot
    
  4. Load the module:

    sudo modprobe rtw89pci
    

Sometimes the installation is not successful. In that case, refer to this: https://github.com/lwfinger/rtw89#installation-instruction

If there were errors while loading the module, most probably it is due to corrupted/unsuccessful installation. Try reinstalling the drivers and rebooting.

niran90 avatar
in flag
This is the first solution that has actually worked for me. Thanks for your help :)
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.