Why is my wifi not working on Debian?

2

I recently purchased a Lenovo Flex 14 (this one) and installed Debian 9.2.0 on it. Unfortunately, upon booting into the new system, I discovered that the wifi was not working. lspci -nn shows that there is a wifi card being detected:

01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b822]

I looked up that particular device and found that it is a Realtek RTL8822BE chip. This chip has a Linux driver which looks to be provided by this package. Unfortunately, even after installing it and rebooting, my wifi still was not working. I thought that perhaps 9.2.0 was simply too old, so I retried the above after reinstalling with the most recent (9.6.0) DVD image. Unfortunately, my problem persisted.

Why is the firmware I have installed not being loaded, and what can I do to fix it?

dmesg output
lspci output

sanine

Posted 2018-12-06T00:52:14.423

Reputation: 121

Probably you need firmware package, it's on non-free repository – Sakura Kinomoto – 2018-12-06T02:04:49.033

this isn't an issue of no free driver existing; there is one, and it has been added to the linux kernel. I can see the firmware file at /lib/firmware/rtlwifi/rtl8822befw.bin -- it just isn't being loaded for some reason.

– sanine – 2018-12-06T02:55:34.057

Does lsmod or modprobe help any, maybe it's blacklisted, or something else should be? – Xen2050 – 2018-12-06T13:19:40.673

Answers

2

From your link:

For those with a system containing the new Realtek RTL8822BE wireless chipset, initial support for it will be found with the upcoming Linux 4.14 LTS kernel.

If it has been added only starting from the 4.14 kernel (and not backported), then Debian 9's 4.9 kernel is not good enough (indeed there's no CONFIG_R8822BE option enabled in Debian 4.9.0-8-amd64 kernel when looking in the config file).

You already got the package having the firmware from stretch-backports, but that's not enough: you must also add the stretch-backports repository and get the newer kernel from it, which will make use of the firmware.

In an non chicken-and-eggs problem that would be, once set up after following previously linked instructions:

apt-get -t stretch-backports install linux-image-amd64

For your convenience (if you can't manage to do this directly because of connectivity), here's today's output of all URIs (along with checksum, but you shouldn't trust a stranger) that might be needed to install this (running from a container which doesn't have a kernel package nor its dependencies installed, allowing to retrieve all URIs). This will change and become invalid over time. Possibly only the two having "bpo" in version will be needed, maybe more. Also a warning, while 4.18 is higher than 4.9, the precise version packaged, based on 4.18.6 is somewhat outdated, so you won't get the latest security fixes. You should consider compiling a kernel yourself.

root@stretch-amd64:~# apt-get --no-install-recommends -t stretch-backports --print-uris install linux-image-amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  initramfs-tools initramfs-tools-core klibc-utils libklibc linux-base linux-image-4.18.0-0.bpo.1-amd64
Suggested packages:
  linux-doc-4.18 debian-kernel-handbook grub-pc | grub-efi-amd64 | extlinux
Recommended packages:
  busybox | busybox-static firmware-linux-free irqbalance apparmor
The following NEW packages will be installed:
  initramfs-tools initramfs-tools-core klibc-utils libklibc linux-base linux-image-4.18.0-0.bpo.1-amd64 linux-image-amd64
0 upgraded, 7 newly installed, 0 to remove and 82 not upgraded.
Need to get 45.8 MB of archives.
After this operation, 258 MB of additional disk space will be used.
'http://deb.debian.org/debian/pool/main/k/klibc/libklibc_2.0.4-9_amd64.deb' libklibc_2.0.4-9_amd64.deb 52556 MD5Sum:cc58644bf747b94c45a4f4e6d5440cfb
'http://deb.debian.org/debian/pool/main/k/klibc/klibc-utils_2.0.4-9_amd64.deb' klibc-utils_2.0.4-9_amd64.deb 108026 MD5Sum:69036678454864a49bffb07f3a21c705
'http://deb.debian.org/debian/pool/main/i/initramfs-tools/initramfs-tools-core_0.130_all.deb' initramfs-tools-core_0.130_all.deb 96964 MD5Sum:913c8d77ff9ef5119e977a64e7cf6400
'http://deb.debian.org/debian/pool/main/l/linux-base/linux-base_4.5_all.deb' linux-base_4.5_all.deb 19130 MD5Sum:696b126edc7f388d2fd8a21ff0b14cb0
'http://deb.debian.org/debian/pool/main/i/initramfs-tools/initramfs-tools_0.130_all.deb' initramfs-tools_0.130_all.deb 65976 MD5Sum:19760d5fe943a82127871846bf188e76
'http://deb.debian.org/debian/pool/main/l/linux/linux-image-4.18.0-0.bpo.1-amd64_4.18.6-1~bpo9+1_amd64.deb' linux-image-4.18.0-0.bpo.1-amd64_4.18.6-1~bpo9+1_amd64.deb 45402920 MD5Sum:ecb628d9ba7ce164dacf68edfc885e95
'http://deb.debian.org/debian/pool/main/l/linux-latest/linux-image-amd64_4.18+98~bpo9+1_amd64.deb' linux-image-amd64_4.18+98~bpo9+1_amd64.deb 8106 MD5Sum:2cdd5e38fe1d4d82898a24ecba6233f9

A.B

Posted 2018-12-06T00:52:14.423

Reputation: 2 008