Score:1

Neither Ethernet nor WiFi adapter working on Lenovo Thinkpad P14s under Ubuntu 2x.04

cn flag

I have recently received my new computer, a Lenovo Thinkpad P14s notebook. According to the datasheet, it comes with a Realtek RTL8852AE (WiFi-6, 802.11ax, 2x2 Dual Band) WiFi adapter and a standard RJ45 ethernet port.

After installing Ubuntu 20.04 LTS, however, no WiFi was available at all. I did some research in the web and found suggestions to install Ubuntu 21.04 instead. However, this did not work either. Now, I got myself a LAN cable and tried to connect via Ethernet, but found this not to work either, although one of the ethernet adapters the system shows was said to be connecting (but never finished to connect).

A few outputs:

nmcli device
DEVICE    TYPE     STATE       CONNECTION
enp2s0f0  ethernet unavailable --
enp5s0    ethernet unavailable --
lo        loopback unmanaed    --

sudo lshw -class network
*-network
    description: Ethernet interface
    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
    ...
    logical name: enp2s0f0
    ...
*-network UNCLAIMED
    description: Network controller
    product: Realtec Semiconductor Co., Ltd. 
    ...
*-network 
    description: Ethernet interface
    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
    logical name: enp5s0 

What else - besides going back to Windows - could I do to make that system work? I am not a Linux pro, so I am looking for the simplest solution possible.

EDIT 1: Additional output

nmcli device show

GENERAL.DEVICE:          enp2s0f0
GENERAL.TYPE:            ethernet
GENERAL.HWADDR:          38:F3:AB:F4:42:13
GENERAL.MTU:             1500
GENERAL.STATE:           20 (unavailable)
GENERAL.CONNECTION:      --
GENERAL.CON-PATH:        --
WIRED-PROPERTIES.CARRIER:off

GENERAL.DEVICE:          enp5s0
GENERAL.TYPE:            ethernet
GENERAL.HWADDR:          38:F3:AB:F4:42:12
GENERAL.MTU:             1500
GENERAL.STATE:           20 (unavailable)
GENERAL.CONNECTION:      --
GENERAL.CON-PATH:        --
WIRED-PROPERTIES.CARRIER:off

GENERAL.DEVICE:          lo
GENERAL.TYPE:            loopback
GENERAL.HWADDR:          00:00:00:00:00:00
GENERAL.MTU:             65536
GENERAL.STATE:           10 (unmanaged)
lines 1-23...skipping...
GENERAL.DEVICE:          enp2s0f0
GENERAL.TYPE:            ethernet
GENERAL.HWADDR:          38:F3:AB:F4:42:13
GENERAL.MTU:             1500
GENERAL.STATE:           20 (unavailable)
GENERAL.CONNECTION:      --
GENERAL.CON-PATH:        --
WIRED-PROPERTIES.CARRIER:off

GENERAL.DEVICE:          enp5s0
GENERAL.TYPE:            ethernet
GENERAL.HWADDR:          38:F3:AB:F4:42:12
GENERAL.MTU:             1500
GENERAL.STATE:           20 (unavailable)
GENERAL.CONNECTION:      --
GENERAL.CON-PATH:        --
WIRED-PROPERTIES.CARRIER:off

GENERAL.DEVICE:          lo
GENERAL.TYPE:            loopback
GENERAL.HWADDR:          00:00:00:00:00:00
GENERAL.MTU:             65536
GENERAL.STATE:           10 (unmanaged)
GENERAL.CONNECTION:      --
GENERAL.CON-PATH:        --
IP4.ADDRESS[1]:          127.0.0.1/8
IP4.GATEWAY:             --
IP6.ADDRESS[1]:          ::1/128
IP6.GATEWAY:             --
IP6.ROUTE[1]:            dst = ::1/128, nh = ::, mt = 256        

EDIT 2: Additional Output

lsmod
Module                  Size  Used by
rfcomm                 81920  4
cmac                   16384  3
algif_hash             16384  1
algif_skcipher         16384  1
af_alg                 28672  6 algif_hash,algif_skcipher
bnep                   28672  2
intel_rapl_msr         20480  0
intel_rapl_common      24576  1 intel_rapl_msr
snd_soc_dmic           16384  1
snd_acp3x_rn           16384  2
snd_acp3x_pdm_dma      16384  1
edac_mce_amd           32768  0
nls_iso8859_1          16384  1
amdgpu               6385664  2
snd_soc_core          290816  3 snd_acp3x_rn,snd_soc_dmic,snd_acp3x_pdm_dma
snd_compress           28672  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_ctl_led            24576  0
kvm_amd               126976  0
snd_hda_codec_realtek   147456  1
snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
kvm                   872448  1 kvm_amd
crct10dif_pclmul       16384  1
ghash_clmulni_intel    16384  0
uvcvideo              106496  0
videobuf2_vmalloc      20480  1 uvcvideo
btusb                  61440  0
snd_hda_codec_hdmi     61440  1
btrtl                  24576  1 btusb
aesni_intel           376832  4
iommu_v2               24576  1 amdgpu
btbcm                  16384  1 btusb
videobuf2_memops       20480  1 videobuf2_vmalloc
gpu_sched              36864  1 amdgpu
btintel                32768  1 btusb
crypto_simd            16384  1 aesni_intel
videobuf2_v4l2         32768  1 uvcvideo
drm_ttm_helper         16384  1 amdgpu
cryptd                 24576  3 crypto_simd,ghash_clmulni_intel
bluetooth             663552  33 btrtl,btintel,btbcm,bnep,btusb,rfcomm
ttm                    69632  2 amdgpu,drm_ttm_helper
videobuf2_common       61440  4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
snd_hda_intel          53248  9
joydev                 28672  0
input_leds             16384  0
snd_intel_dspcfg       28672  1 snd_hda_intel
rapl                   20480  0
videodev              249856  3 videobuf2_v4l2,uvcvideo,videobuf2_common
serio_raw              20480  0
ecdh_generic           16384  2 bluetooth
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
ecc                    36864  1 ecdh_generic
efi_pstore             16384  0
thinkpad_acpi         114688  0
drm_kms_helper        262144  1 amdgpu
mc                     57344  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
snd_hda_codec         147456  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_seq_midi           20480  0
nvram                  16384  1 thinkpad_acpi
wmi_bmof               16384  0
snd_seq_midi_event     16384  1 snd_seq_midi
platform_profile       16384  1 thinkpad_acpi
cec                    53248  1 drm_kms_helper
ledtrig_audio          16384  3 snd_ctl_led,snd_hda_codec_generic,thinkpad_acpi
snd_hda_core           94208  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
rc_core                57344  1 cec
snd_rawmidi            36864  1 snd_seq_midi
ccp                   102400  1 kvm_amd
i2c_algo_bit           16384  1 amdgpu
fb_sys_fops            16384  1 drm_kms_helper
snd_hwdep              16384  1 snd_hda_codec
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
snd_pcm               118784  8 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_compress,snd_soc_core,snd_hda_core,snd_acp3x_pdm_dma,snd_pcm_dmaengine
snd_seq                73728  2 snd_seq_midi,snd_seq_midi_event
snd_rn_pci_acp3x       20480  0
snd_pci_acp3x          20480  0
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              40960  2 snd_seq,snd_pcm
ucsi_acpi              16384  0
typec_ucsi             45056  1 ucsi_acpi
typec                  57344  1 typec_ucsi
snd                    94208  37 snd_ctl_led,snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,thinkpad_acpi,snd_soc_core,snd_pcm,snd_rawmidi
soundcore              16384  2 snd_ctl_led,snd
nxp_nci_i2c            20480  0
nxp_nci                16384  1 nxp_nci_i2c
nci                    73728  2 nxp_nci,nxp_nci_i2c
nfc                   118784  2 nci,nxp_nci
amd_pmc                20480  0
mac_hid                16384  0
sch_fq_codel           20480  3
msr                    16384  0
parport_pc             45056  0
ppdev                  24576  0
lp                     20480  0
parport                65536  3 parport_pc,lp,ppdev
drm                   561152  7 gpu_sched,drm_kms_helper,amdgpu,drm_ttm_helper,ttm
ip_tables              32768  0
x_tables               49152  1 ip_tables
autofs4                45056  2
crc32_pclmul           16384  0
sdhci_pci              65536  0
r8169                  94208  0
nvme                   45056  2
cqhci                  32768  1 sdhci_pci
xhci_pci               20480  0
psmouse               159744  0
i2c_piix4              28672  0
xhci_pci_renesas       20480  1 xhci_pci
nvme_core             126976  3 nvme
sdhci                  69632  1 sdhci_pci
realtek                32768  2
wmi                    32768  1 wmi_bmof
video                  53248  1 thinkpad_acpi
i2c_scmi               20480  0
za flag
Please post the result of command; nmcli device show. Also, you may need to install additional drivers. See this link for explanation: https://itsfoss.com/fix-no-wireless-network-ubuntu/
cn flag
Added via EDIT.
za flag
The ethernet device is recognised, but not connected to your router. 1/ Is router working properly? 2/ Check to see if you need additional drivers. Click show applications, select 'software updater', from menu select 'additional drivers'. Wait for response. If no wifi or ethernet driver show, follow the link posted earlier. Note: I had a similar situation with Lubuntu - Lubuntu did not install the driver, and the driver had to be installed manually. Lenovo machines are pretty good for compatibility, so I am somewhat surprised to read of difficulties with ethernet/wifi.
za flag
Also, have you installed correctly? https://download.lenovo.com/pccbbs/mobiles_pdf/tp_p14s_amd_ubuntu_20.04_lts_installation_v1.0.pdf
za flag
Also, excuse, I forgot to ask for the output of command: lsmod.
cn flag
Regarding the installation manual: I do not have many of the categories in the Config submenu. For example: Storage is missing completely! I could thus only change the Secure Boot setting as described.
cn flag
Regarding Additional Drivers: None of them are offered to me in said menu.
cn flag
Regarding lsmod: added via EDIT.
za flag
I see no driver loaded. Ubuntu should have installed the latest driver: 'r8169', and this should work out-of-the-box for the device. To check the driver, do command: lsmod | grep r8169 . This should return r8169. If not, then something in the Lenovo machine is preventing the load.
za flag
After searching for lenovo wifi problems, I found many posts. The concensus appears to be to use the older driver r8168. Note: your device label is '8168', so the driver should work. You can find a deb for this driver at this link: https://mirrors.edge.kernel.org/ubuntu/pool/universe/r/r8168/ After download, the deb should auto-install by clicking on it. If all fails, you should contact Lenovo.
cn flag
Sorry that I am such a n00b. Which of the drivers at the link you've provided is the correct one? I have downloaded r8168-dkms_8.049.02-1_all.deb, as this was the most recent file, but installation via dpkg -i did not work, telling me that there were dependency problems preventing the configuration: r8168-dkms depends on dkms (>=2.1.1.0=; however Package dkms is not installed.
za flag
command: sudo apt install dkms ...Then retry the deb
cn flag
Installed both DKMS and this driver - did not work. :(
za flag
You need to contact Lenovo and have them explain why the standard Linux driver will not work for the wifi hardware. Have you tried your machine using Windows? Do you know for certain the wifi hardware is working properly?
Score:1
cn flag

After days of research on the web and trying different potential solutions, I have finally found the solution. It's plain and simple:

sudo apt install linux-oem-20.04d

As an issue in a github repository working on drivers indicates (https://github.com/lwfinger/rtw89/issues/75), the OEM variant of Ubuntu 20.04 does contain the drivers already. I tried it, and it worked like a charm.

Note: Before doing so, I phoned Lenovo Premier Support, who told me that the issue is exactly with GEN 2 variants of the Lenovo Thinkpad P14s, as this notebook is not officially supporting Ubuntu, whereas for the Gen 1 variant the Ubuntu community had already included approved drivers.

za flag
Very happy to read your solution. As I suspected, Lenovo was your best source for debugging this. The enitre Linux community will benefit from learning gen2 Lenovo is not compatible with Linux out-of-the-box. Have you requested Lenovo post this issue on their website in their support pages? Final question: which driver is working, r8169 or r8168 ?
cn flag
lpsci -nnk | grep net -A2 tells me: Kernel driver in use: r8169
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.