1

I started building LFS to learn more about linux internals. I struggel to configure WLAN and can't even narrow down the problem. On my laptop I have a dual boot (ubuntu 22 and LFS 11.3) and on ubuntu my WLAN works fine so there is no hardware issue here.

On Ubuntu:

$ sudo lspci -v | grep -i "Network controller" -A 11
00:14.3 Network controller: Intel Corporation Comet Lake PCH-LP CNVi WiFi
    Subsystem: Intel Corporation Wi-Fi 6 AX201 160MHz
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at d1418000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: [c8] Power Management version 3
    Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [40] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [80] MSI-X: Enable+ Count=16 Masked-
    Capabilities: [100] Latency Tolerance Reporting
    Capabilities: [164] Vendor Specific Information: ID=0010 Rev=0 Len=014 <?>
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

There is obviously an wlan-interface

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:2b:67:21:eb:fe brd ff:ff:ff:ff:ff:ff
3: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 40:ec:99:1f:d7:f4 brd ff:ff:ff:ff:ff:ff

and I can see it in /proc/net/wireless

$ sudo cat /proc/net/wireless 
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
wlp0s20f3: 0000   67.  -43.  -256        0      0      0      0    198    

On LFS 11.3 I cant find this Interface

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:2b:67:21:eb:fe brd ff:ff:ff:ff:ff:ff
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0

/proc/net/wireless doesn't show any device

$ cat /proc/net/wireless
Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22

If I compare the output of lsmod there might be a hint that cfg80211 is missing

On ubuntu:

$ lsmod | grep iwlwifi
iwlwifi               503808  1 iwlmvm
cfg80211             1052672  3 iwlmvm,iwlwifi,mac80211

On LFS 11.3:

$ lsmod
Module                  Size  Used by
x86_pkg_temp_thermal    20480  0
iwlwifi               454656  0

However, I don't understand why its missing because I had to recompile the kernel with these options

[*] Networking support  --->                              [CONFIG_NET]
  [*] Wireless  --->                                      [CONFIG_WIRELESS]
    <*/M> cfg80211 - wireless configuration API           [CONFIG_CFG80211]
    [*]     cfg80211 wireless extensions compatibility    [CONFIG_CFG80211_WEXT]
    <*/M> Generic IEEE 802.11 Networking Stack (mac80211) [CONFIG_MAC80211]
Device Drivers  --->
  [*] Network device support  --->                        [CONFIG_NETDEVICES]
    [*] Wireless LAN  --->                                [CONFIG_WLAN]

to install wpa_supplicant-2.10

Thanks in advance

2
  • "I had to recompile the kernel with these options ..." -- How did you enable those options?
    – sawdust
    Commented May 27, 2023 at 0:09
  • I enabled them as built-in with [*]. Therefore lsmod didn't output anything. After I recomiled with these options as module, lsmod output showed cfg80211. This didn't help either.
    – Amit
    Commented May 29, 2023 at 20:26

1 Answer 1

0

When comparing the output of dmesg of ubuntu and lfs I realized that the dmesg of lfs contains errors which are really precise:

[    3.796496] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-72.ucode failed with error -2
[    3.797314] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-71.ucode failed with error -2
[    3.797326] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-70.ucode failed with error -2
[    3.797335] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-69.ucode failed with error -2

...
...
...

[    3.797584] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-40.ucode failed with error -2
[    3.797599] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-39.ucode failed with error -2
[    3.797600] iwlwifi 0000:00:14.3: no suitable firmware found!

I didn't find a suitable firmware on Intel's webpage, but copying the firmware from ubuntu's /lib/firmware to lfs' /lib/firmware did help.

However, I still do not understand how ubuntu determines what firmware they need.

1
  • 1
    "how ubuntu determines what firmware they need" -- The device driver makes a request for the firmware, and a userspace program has to find that file, and retrieve it for the kernel. It's a rather round-about method of ensuring that the kernel (and its drivers) does not directly access files for itself.
    – sawdust
    Commented May 30, 2023 at 8:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .