FS#64393 - [mkinitcpio-netconf] breaks iwlwifi module
Attached to Project:
Arch Linux
Opened by Alexander E. Patrakov (patrakov) - Tuesday, 05 November 2019, 04:01 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:16 GMT
Opened by Alexander E. Patrakov (patrakov) - Tuesday, 05 November 2019, 04:01 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:16 GMT
|
Details
Description: if I include netconf in HOOKS in
/etc/mkinitcpio.conf, then WiFi adapter is no longer found
in the main system.
Additional info: * package version(s): community/mkinitcpio-netconf 0.0.5-1 * config and/or log files etc.: see below Steps to reproduce: 1. Configure the PC with an Intel WiFi card to connect to a wired LAN and act as a WiFi access point (OK, if you are lazy, skip the access point, it is sufficient to test that wlp4s0 exists). 2. Add netconf in HOOKS in /etc/mkinitcpio.conf (was an attempt to add remote LUKS unlock via community/mkinitcpio-dropbear). 3. Observe that the main system no longer has wlp4s0 interface. # lspci -nn 00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06) 00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06) 00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06) 00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 04) 00:16.0 Communication controller [0780]: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 [8086:8c3a] (rev 04) 00:1a.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 [8086:8c2d] (rev 04) 00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04) 00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 [8086:8c10] (rev d4) 00:1c.2 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 [8086:8c14] (rev d4) 00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 [8086:8c16] (rev d4) 00:1c.4 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 [8086:8c18] (rev d4) 00:1d.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 [8086:8c26] (rev 04) 00:1f.0 ISA bridge [0601]: Intel Corporation Z87 Express LPC Controller [8086:8c44] (rev 04) 00:1f.2 SATA controller [0106]: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] [8086:8c02] (rev 04) 00:1f.3 SMBus [0c05]: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller [8086:8c22] (rev 04) 02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c) 03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c) 04:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6235 [8086:088e] (rev 24) The WiFi controller is normally handled by the iwlwifi module, and the netconf hook includes it in the initramfs, for no good reason. The problem is that iwlwifi does not work by itself, it relies on support from helper modules, iwldvm (for my hardware) and iwlmvm (for others) or possibly some other iwl stuff. These helper modules are not included in the initramfs, and therefore are not loaded when the PC boots, thus the WiFi adapter no longer works. Logs: [ 2.353387] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002) [ 2.353513] iwlwifi 0000:04:00.0: can't disable ASPM; OS doesn't have ASPM control [ 2.353975] iwlwifi 0000:04:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm If I load iwldvm manually, the following lines appear, and the adapter works, but I should not have to do it manually: [ 5960.550178] iwlwifi 0000:04:00.0: CONFIG_IWLWIFI_DEBUG enabled [ 5960.550180] iwlwifi 0000:04:00.0: CONFIG_IWLWIFI_DEBUGFS enabled [ 5960.550181] iwlwifi 0000:04:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled [ 5960.550182] iwlwifi 0000:04:00.0: Detected Intel(R) Centrino(R) Advanced-N 6235 AGN, REV=0xB0 [ 5960.583410] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs' [ 5960.588337] iwlwifi 0000:04:00.0 wlp4s0: renamed from wlan0 [ 5960.620909] iwlwifi 0000:04:00.0: Radio type=0x2-0x1-0x0 [ 5960.927057] iwlwifi 0000:04:00.0: Radio type=0x2-0x1-0x0 [ 5961.035779] iwlwifi 0000:04:00.0: Radio type=0x2-0x1-0x0 [ 5961.334847] iwlwifi 0000:04:00.0: Radio type=0x2-0x1-0x0 |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:16 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/mkinitcpio-netconf/iss ues/1
Saturday, 25 November 2023, 20:16 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/mkinitcpio-netconf/iss ues/1
add_checked_modules "/drivers/net/"
If I don't enable the netconf hook, then WiFi works. If I rebuild the initramfs with the netconf hook, then on the next reboot WiFi becomes broken, because now the initramfs (and not the main system) loads iwlwifi, and at that time the iwldvm module is not available, and is never retried.
no netconf: I get wlp4s0
netconf + autodetect: I get nothing
netconf + autodetect + manual modprobe of iwldvm: I get wlp4s0
It would be helpful to try to reproduce this with other wireless cards. Here on my system I'm also using iwlwifi with iwldvm, and I can replicate this issue.
lsinitcpio /boot/initramfs-linux.img | grep iwl
[ 5960.588337] iwlwifi 0000:04:00.0 wlp4s0: renamed from wlan0
The autodetect hook doesn't even care about network modules. netconf uses add_checked_modules because it's the proper way to filter the modules that were detected by autodetect already.
> netconf uses add_checked_modules because it's the proper way to filter the modules that were detected by autodetect already.
This "proper way" is buggy, because it separates iwlwifi from its required helpers, iwldvm and iwlmvm. I guess we just need to fix add_module() in /usr/lib/initcpio/functions, i.e. add one more special case, just like the vfat case which is already there.
I have done a few more tests here. To make sure iwd and any other network managing software had anything to do with it, I have disabled them all on boot.
So, to summarize:
When using netconf:
I don't get neither a wlp2s0 nor wlan0 device. My system boots only with the iwlwifi module loaded.
If I manually load the iwlmvm/iwldvm modules, I *still* get a wlan0 device. It doesn't get renamed as in your case.
When not using netconf:
I get a wlan0 device.
So, it seems to be two separate issues.
Edited to add: my suggestion to you, for now, is to add the modules to the MODULES=() array in mkinitcpio.conf.
Nothing has changed. The iwlwifi module's operation still depends on the iwlmvm or iwldvm (depending on the hardware), but it loads these helpers dynamically at runtime. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/intel/iwlwifi/iwl-drv.c?h=v5.8#n1603
There is no "softdep" in "modinfo iwlwifi" for the mkinitcpio scripts to catch upon and detect this de-facto dependency, so the workaround still stays here.
I have grepped the whole drivers/net tree for request_module, and found the following cases that might be exposing the same issue:
mlx4_core might request mlx4_en or mlx4_ib
mlx5_core might request mlx5_ib
iwlwifi could request iwlvdm or iwlmvm, as already reported
hostap, ipw2100 and ipw2200 might request lib80211_crypt_wep or lib80211_crypt_tkip or lib80211_crypt_ccmp (but not sure if this could happen during early boot)
Please (as already suggested) handle these cases just like you do the fat -> nls_cp437 hidden dependency, or document (by closing this bug) that autodetection isn't supposed to work on hardware with drivers that load helper modules at runtime, and the user really has to put the required helper modules into MODULES=(...).
If I later manually unload the module and reload it, it works fine.
Are there any way yet to exclude the iwlwifi module from the mkinitcpio when netconf is included?
Otherwise, even if I would avoid this, are there any way to include the firmware in the mkinitcpio as well?
Logs:
[ 1.127784] Intel(R) Wireless WiFi driver for Linux
[ 1.127872] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
[ 1.133770] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
[ 1.148356] iwlwifi 0000:00:14.3: Detected crf-id 0x3617, cnv-id 0x20000302 wfpm id 0x80000000
[ 1.148375] iwlwifi 0000:00:14.3: PCI dev 06f0/4070, rev=0x351, rfid=0x10a100
[ 1.148441] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-78.ucode failed with error -2
[ 1.148468] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-77.ucode failed with error -2
[ 1.148493] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-76.ucode failed with error -2
[ 1.148518] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-75.ucode failed with error -2
[ 1.148543] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-74.ucode failed with error -2
[ 1.148568] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-73.ucode failed with error -2
[ 1.148593] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-72.ucode failed with error -2
[ 1.148618] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-71.ucode failed with error -2
[ 1.148642] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-70.ucode failed with error -2
[ 1.148667] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-69.ucode failed with error -2
[ 1.148693] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-68.ucode failed with error -2
[ 1.148718] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-67.ucode failed with error -2
[ 1.148743] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-66.ucode failed with error -2
[ 1.148767] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-65.ucode failed with error -2
[ 1.148793] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-64.ucode failed with error -2
[ 1.148818] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-63.ucode failed with error -2
[ 1.148843] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-62.ucode failed with error -2
[ 1.148867] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-61.ucode failed with error -2
[ 1.148892] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-60.ucode failed with error -2
[ 1.148917] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-59.ucode failed with error -2
[ 1.148943] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-58.ucode failed with error -2
[ 1.148967] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-57.ucode failed with error -2
[ 1.148993] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-56.ucode failed with error -2
[ 1.149017] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-55.ucode failed with error -2
[ 1.149042] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-54.ucode failed with error -2
[ 1.149067] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-53.ucode failed with error -2
[ 1.149092] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-52.ucode failed with error -2
[ 1.149121] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-51.ucode failed with error -2
[ 1.149146] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-50.ucode failed with error -2
[ 1.149170] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-49.ucode failed with error -2
[ 1.149195] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-48.ucode failed with error -2
[ 1.149220] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-47.ucode failed with error -2
[ 1.149246] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-46.ucode failed with error -2
[ 1.149271] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-45.ucode failed with error -2
[ 1.149299] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-44.ucode failed with error -2
[ 1.149323] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-43.ucode failed with error -2
[ 1.149348] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-42.ucode failed with error -2
[ 1.149373] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-41.ucode failed with error -2
[ 1.149399] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-40.ucode failed with error -2
[ 1.149424] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-39.ucode failed with error -2
[ 1.149426] iwlwifi 0000:00:14.3: no suitable firmware found!
[ 1.149427] iwlwifi 0000:00:14.3: minimum version required: iwlwifi-QuZ-a0-hr-b0-39
[ 1.149429] iwlwifi 0000:00:14.3: maximum version supported: iwlwifi-QuZ-a0-hr-b0-78
[ 1.149430] iwlwifi 0000:00:14.3: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git