#18 No Wi-Fi device found on minimal install
Closed: Fixed by leifliddy. Opened by davidalger.

Installed the latest (3/30) F38 minimal image on a MBP to facilitate LUKS encrypting a Fedora Workstation install that was installed alongside it on the same machine. Didn't end up needing network to use it for this since everything required for LUKS setup is baked into the minimal install, but attempts to connect to the Wi-Fi network fail:

$ nmcli dev wifi connect NETWORK_SSID password NETWORK_PASSWORD
Error: No Wi-Fi device found.

The only thing that shows up when running ifconfig is the loopback interface. At first glance, doesn't seem to be failed systemd units. Any info I could provide that would be useful here?

Networking works just fine from the Fedora Workstation installation, leading me to believe there is some package missing or mis-configuration on the minimal image build perhaps.


Metadata Update from @ngompa:
- Issue tagged with: Experience, Hardware

Do you see this in your logs?

Mar 13 01:00:00 fedora dracut-pre-udev[330]: :: Asahi: Triggering early load of NVMe modules...
Mar 13 01:00:00 fedora dracut-pre-udev[330]: :: Asahi: Unpacking vendor firmware into initramfs...
Mar 13 01:00:00 fedora dracut-pre-udev[330]: :: Asahi firmware unpacked successfully

Do the firmware files exist on the ESP?

[root@fedora ~]# ll /boot/efi/vendorfw/
total 31688
-rwxr-xr-x. 1 root root 16172696 Apr  1 15:20 firmware.cpio
-rwxr-xr-x. 1 root root 16250880 Apr  1 15:20 firmware.tar
-rwxr-xr-x. 1 root root    18525 Apr  1 15:20 manifest.txt

Also ensure that that asahi firmware exists within the initramfs

[root@fedora ~]# lsinitrd /boot/initramfs-6.2.8-450.asahi.fc37.aarch64.img | grep asahi-firmware
asahi-firmware
-rwxr-xr-x   1 root     root          438 Nov 16 19:00 usr/lib/dracut/hooks/cleanup/99-install-asahi-firmware.sh
-rwxr-xr-x   1 root     root         1281 Nov 16 19:00 usr/lib/dracut/hooks/pre-udev/10-load-asahi-firmware.sh

When you install the dracut-asahi package, it creates the hooks in dracut to unpack the vendor firmware at boot time. This is needed for the wifi interface work.

If you look at this project for example https://github.com/leifliddy/asahi-fedora-usb
It installs Fedora to a usb drive. So the firmware gets located and loaded from the internal ESP (not from the external drive) by the /usr/share/asahi-scripts/functions.sh script --which is provided by the asahi-scripts package.

So as long as you have asahi-scripts and dracut-asahi installed -- it should work.
As long as the firmware resides on the main ESP.

Bellow is a log from my tty session with line-breaks added for readability. Everything seems to check out. This was installed on the internal drive, not running via USB, so should be nothing out of the ordinary here.

[root@fedora ~]# uname -a
Linux fedora 6.2.8-400.asahi.fc38.aarch64 #1 SMP PREEMPT_DYNAMIC Sat Mar 25 17:49:43 UTC 2023 aarch64 GNU/Linux
[root@fedora ~]# nmcli dev wifi connect Westmore
Error: No Wi-Fi device found.
[root@fedora ~]# journalctl | grep -i dracut-pre-udev | grep -i asahi
Feb 21 19:00:00 fedora dracut-pre-udev[396]: :: Asahi: Triggering early load of NVMe modules...
Feb 21 19:00:00 fedora dracut-pre-udev[398]: :: Asahi: Triggering early load of NVMe modules...
Feb 21 19:00:00 fedora dracut-pre-udev[396]: :: Asahi: Unpacking vendor firmware into initramfs...
Feb 21 19:00:00 fedora dracut-pre-udev[396]: :: Asahi firmware unpacked successfully
Feb 21 19:00:00 fedora dracut-pre-udev[398]: :: Asahi: Unpacking vendor firmware into initramfs...
Feb 21 19:00:00 fedora dracut-pre-udev[398]: :: Asahi firmware unpacked successfully
[root@fedora ~]# ll /boot/efi/vendorfw/
total 31688
-rwxr-xr-x. 1 root root 16172696 Apr  2 17:11 firmware.cpio
-rwxr-xr-x. 1 root root 16250880 Apr  3 10:11 firmware.tar
-rwxr-xr-x. 1 root root    18525 Apr  3 10:11 manifest.txt
[root@fedora ~]# lsinitrd /boot/initramfs-6.2.8-400.asahi.fc38.aarch64.img | grep asahi-firmware
asahi-firmware
-rwxr-xr-x   1 root     root          438 Jan 17 19:00 usr/lib/dracut/hooks/cleanup/99-install-asahi-firmware.sh
-rwxr-xr-x   1 root     root         1281 Jan 17 19:00 usr/lib/dracut/hooks/pre-udev/10-load-asahi-firmware.sh
[root@fedora ~]# dnf list installed | grep asahi
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
alsa-ucm-asahi.noarch                            1-6.fc38                           @fedora                                                          
asahi-fedora-remix-release.noarch                38-0.1                             @copr_copr.fedorainfracloud.org_group_asahi_fedora-remix-branding
asahi-fedora-remix-release-common.noarch         38-0.1                             @copr_copr.fedorainfracloud.org_group_asahi_fedora-remix-branding
asahi-fedora-remix-release-identity-basic.noarch 38-0.1                             @copr_copr.fedorainfracloud.org_group_asahi_fedora-remix-branding
asahi-fwextract.noarch                           20221206-2.fc38                    @fedora                                                          
asahi-repos.noarch                               1-2                                @copr_copr.fedorainfracloud.org_group_asahi_fedora-remix-branding
asahi-repos-common.noarch                        1-2                                @copr_copr.fedorainfracloud.org_group_asahi_fedora-remix-branding
asahi-scripts.noarch                             20221206-2.fc38                    @fedora                                                          
dracut-asahi.noarch                              20221206-2.fc38                    @fedora                                                          
kernel.aarch64                                   6.2.8-400.asahi.fc38               @copr_copr.fedorainfracloud.org_group_asahi_kernel               
kernel-core.aarch64                              6.2.8-400.asahi.fc38               @copr_copr.fedorainfracloud.org_group_asahi_kernel               
kernel-modules.aarch64                           6.2.8-400.asahi.fc38               @copr_copr.fedorainfracloud.org_group_asahi_kernel               
kernel-modules-core.aarch64                      6.2.8-400.asahi.fc38               @copr_copr.fedorainfracloud.org_group_asahi_kernel               
kernel-modules-extra.aarch64                     6.2.8-400.asahi.fc38               @copr_copr.fedorainfracloud.org_group_asahi_kernel               
python3-asahi_firmware.aarch64                   0.5.2-2.fc38                       @fedora                                                          
uboot-images-armv8.noarch                        2023.01-3.fc38                     @copr_copr.fedorainfracloud.org_group_asahi_u-boot               

Interesting. So do you see this directory being mounted?

[root@fedora ~]# mount | grep vendor
vendorfw on /usr/lib/firmware/vendor type tmpfs (rw,relatime,seclabel,inode64)
[root@fedora ~]# ll /usr/lib/firmware/vendor/
total 0
drwxr-xr-x. 2 root root   60 Mar 13 01:00 asmedia
drwxr-xr-x. 2 root root 3180 Mar 13 01:00 brcm

Do you see it trying to load the firmware?

[root@fedora ~]# journalctl -b | grep brcm
Apr 04 13:26:38 fedora kernel: usbcore: registered new interface driver brcmfmac
Apr 04 13:26:38 fedora kernel: brcmfmac 0000:01:00.0: Adding to iommu group 6
Apr 04 13:26:38 fedora kernel: brcmfmac 0000:01:00.0: enabling device (0000 -> 0002)
Apr 04 13:26:38 fedora kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4378b1-pcie for chip BCM4378/3
...

Firmware appears to be mounted, loaded; looks very similar to the log output of the functional workstation instance:

[root@fedora ~]# mount | grep vendor
vendorfw on /usr/lib/firmware/vendor type tmpfs (rw,relatime,seclabel,inode64)
[root@fedora ~]# ll /usr/lib/firmware/vendor/
total 0
drwxr-xr-x. 2 root root   60 Feb 21 19:00 asmedia
drwxr-xr-x. 2 root root 3180 Feb 21 19:00 brcm
[root@fedora ~]# journalctl -b | grep brcm
Feb 22 00:00:03 fedora kernel: usbcore: registered new interface driver brcmfmac
Feb 22 00:00:03 fedora kernel: brcmfmac 0000:01:00.0: Adding to iommu group 8
Feb 22 00:00:03 fedora kernel: brcmfmac 0000:01:00.0: enabling device (0000 -> 0002)
Feb 22 00:00:03 fedora kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4387c2-pcie for chip BCM4387/7
Feb 22 00:00:03 fedora kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,madagascar-TPHN-u-4.7-X0.bin failed with error -2
Feb 22 00:00:03 fedora kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,madagascar-TPHN-u-4.7.bin failed with error -2
Feb 22 00:00:03 fedora kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,madagascar-TPHN-u.bin failed with error -2
Feb 22 00:00:03 fedora kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,madagascar-TPHN.bin failed with error -2
Feb 22 00:00:03 fedora kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4387c2-pcie.apple,madagascar-X0.bin failed with error -2
Apr 05 14:03:52 fedora kernel: brcmfmac_wcc: brcmf_wcc_attach: executing
Apr 05 14:03:52 fedora kernel: brcmfmac: brcmf_c_process_txcap_blob: TxCap blob found, loading
Apr 05 14:03:52 fedora kernel: brcmfmac: brcmf_c_process_cal_blob: Calibration blob provided by platform, loading
Apr 05 14:03:52 fedora kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4387/7 wl0: Feb  8 2022 01:51:44 version 20.90.39.0.8.7.114 FWID 01-510a2aee
Apr 05 14:03:52 fedora NetworkManager[938]: <info>  [1680717832.7465] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/platform/soc/590000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ieee80211/phy0/rfkill1) (driver brcmfmac)
Apr 05 14:03:52 fedora kernel: brcmfmac 0000:01:00.0 wlp1s0f0: renamed from wlan0

I think I may have found the culprit when looking at NetworkManager log, the following bit is in the working install, but notably missing from the logs on the broken minimal install:

Apr 05 13:07:44 fedora NetworkManager[1382]: <info>  [1680718064.2112] Loaded device plugin: NMAtmManager (/usr/lib64/NetworkManager/1.42.0-1.fc38/libnm-device-plugin-adsl.so)
Apr 05 13:07:44 fedora NetworkManager[1382]: <info>  [1680718064.2134] Loaded device plugin: NMBluezManager (/usr/lib64/NetworkManager/1.42.0-1.fc38/libnm-device-plugin-bluetooth.so)
Apr 05 13:07:44 fedora NetworkManager[1382]: <info>  [1680718064.2149] Loaded device plugin: NMTeamFactory (/usr/lib64/NetworkManager/1.42.0-1.fc38/libnm-device-plugin-team.so)
Apr 05 13:07:44 fedora NetworkManager[1382]: <info>  [1680718064.2156] Loaded device plugin: NMWifiFactory (/usr/lib64/NetworkManager/1.42.0-1.fc38/libnm-device-plugin-wifi.so)
Apr 05 13:07:44 fedora NetworkManager[1382]: <info>  [1680718064.2159] Loaded device plugin: NMWwanFactory (/usr/lib64/NetworkManager/1.42.0-1.fc38/libnm-device-plugin-wwan.so)

logs on the broken minimal install instead have this:

Apr 05 14:03:52 fedora NetworkManager[938]: <info>  [1680717832.7997] manager: (wlan0): 'wifi' plugin not available; creating generic device
Apr 05 14:03:52 fedora NetworkManager[938]: <info>  [1680717832.8000] manager: (wlan0): new Generic device (/org/freedesktop/NetworkManager/Devices/2)
Apr 05 14:03:52 fedora NetworkManager[938]: <info>  [1680717832.8804] device (wlan0): interface index 2 renamed iface from 'wlan0' to 'wlp1s0f0'

Workstation includes these packages:

$ dnf list installed | grep -i networkmanager
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
NetworkManager.aarch64                               1:1.42.0-1.fc38                     @fedora                                                          
NetworkManager-adsl.aarch64                          1:1.42.0-1.fc38                     @fedora                                                          
NetworkManager-bluetooth.aarch64                     1:1.42.0-1.fc38                     @fedora                                                          
NetworkManager-config-connectivity-fedora.noarch     1:1.42.0-1.fc38                     @fedora                                                          
NetworkManager-libnm.aarch64                         1:1.42.0-1.fc38                     @fedora                                                          
NetworkManager-openconnect.aarch64                   1.2.8-4.fc38                        @fedora                                                          
NetworkManager-openconnect-gnome.aarch64             1.2.8-4.fc38                        @fedora                                                          
NetworkManager-openvpn.aarch64                       1:1.10.2-2.fc38                     @fedora                                                          
NetworkManager-openvpn-gnome.aarch64                 1:1.10.2-2.fc38                     @fedora                                                          
NetworkManager-ppp.aarch64                           1:1.42.0-1.fc38                     @fedora                                                          
NetworkManager-pptp.aarch64                          1:1.2.10-3.fc38                     @fedora                                                          
NetworkManager-pptp-gnome.aarch64                    1:1.2.10-3.fc38                     @fedora                                                          
NetworkManager-ssh.aarch64                           1.2.12-5.fc38                       @fedora                                                          
NetworkManager-ssh-gnome.aarch64                     1.2.12-5.fc38                       @fedora                                                          
NetworkManager-team.aarch64                          1:1.42.0-1.fc38                     @fedora                                                          
NetworkManager-vpnc.aarch64                          1:1.2.8-3.fc38                      @fedora                                                          
NetworkManager-vpnc-gnome.aarch64                    1:1.2.8-3.fc38                      @fedora                                                          
NetworkManager-wifi.aarch64                          1:1.42.0-1.fc38                     @fedora                                                          
NetworkManager-wwan.aarch64                          1:1.42.0-1.fc38                     @fedora  

The minimal image only includes these:

[root@MacBook-Pro /]# dnf list installed | grep -i networkmanager
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
NetworkManager.aarch64                           1:1.42.0-1.fc38                    @fedora                                                          
NetworkManager-libnm.aarch64                     1:1.42.0-1.fc38                    @fedora                                                          
NetworkManager-team.aarch64                      1:1.42.0-1.fc38                    @fedora      

I'm going to install NetworkManager-wifi into the minimal install via a chroot here in a minute, and will report back if this resolves once I can reboot and attempt to bring up the network.

That's interesting, I'll look at the package listing for the Minimal profile.
What's the output of ifconfig -a?

Seems installing NetworkManager-wifi is the solution here. Rebooted into the minimal install and ifconfig now shows the device, and I'm able to connect to Wi-Fi and run dnf update just fine now.

[root@fedora ~]# ifconfig 
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 2  bytes 140 (140.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 140 (140.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
wlp1s0f0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 22:0a:fd:ac:97:6f  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
[root@fedora ~]# nmcli dev wifi connect Westmore password REDACTED
Device 'wlp1s0f0' successfully activated with 'REDACTED'.

Ok, I'll sort that out. Lol....you should have used ifconfig -a at the beginning -- it would have shown the downed interface.

Haha, yeah...I realized that when I saw it show up in the output of nmcli dev status just before looking at the NetworkManager logs. 🤦

PR submitted https://pagure.io/fedora-asahi/kiwi-descriptions/pull-request/14

NetworkManager-wifi package was added to base.xml so it gets included in the minimal profile.

Metadata Update from @leifliddy:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Metadata