Score:0

Persist iwlwifi reload between reboots

cn flag

I was issued a dell precision 5570 workstation with Ubuntu 22.04 on it. I have noticed that wifi does not work on it until I unload and load the iwlwifi kernel module. In fact, the device doesn't even list as available under the wifi settings in gnome until I do. Once reloaded, wifi works as expected. However, every time I reboot the workstation, I must redo the iwlwifi reload.

sudo modprobe -r iwlwifi
sudo modproble iwlwifi

My question is how, or more precisely what would be the best way to persist this change? I had a similar situation on a dell latitude with Alma Linux 8 where this same problem happened and regenerating the initramfs via dracut after reloading the iwlwifi kernel module was enough to persist that, but when I try the either of the following commands, that does not seem to work:

sudo update-initramfs -c -k $(uname -r)
sudo update-initramfs -c -k all

For more information, here is what lspci shows:

$USER@$HOST:~$ lspci -knn | grep Net -A3
00:14.3 Network controller [0280]: Intel Corporation Alder Lake-P PCH CNVi WiFi [8086:51f0] (rev 01)
    Subsystem: Intel Corporation Device [8086:4090]
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

lsmod shows the following:

$USER@$HOST:~$ lsmod | grep iwl
iwlmvm                610304  0
mac80211             1314816  1 iwlmvm
iwlwifi               503808  1 iwlmvm
cfg80211             1044480  3 iwlmvm,iwlwifi,mac80211

And don't know if this will be helpful, but rfkill shows the following before I reload:

$USER@$HOST:~$ rfkill 
ID TYPE      DEVICE              SOFT      HARD
 0 bluetooth hci0           unblocked unblocked
 1 wlan      dell-wifi      unblocked unblocked
 2 bluetooth dell-bluetooth unblocked unblocked

But show's this after the reload of the module:

$USER@$HOST:~$ rfkill 
ID TYPE      DEVICE              SOFT      HARD
 0 bluetooth hci0           unblocked unblocked
 1 wlan      dell-wifi      unblocked unblocked
 2 bluetooth dell-bluetooth unblocked unblocked
 3 wlan      phy0           unblocked unblocked

For reference as well, I am running the linux-generic-hwe-22.04 kernel, which puts me at 5.19.0-35-generic.

I've also checked the bios settings to make sure the wlan/wwan device wasn't disabled or that power management wasn't disabling wlan/wwan when it detects a wired connection. I also checked to make sure iwlwifi wasn't a blacklisted module.

Khalid Abu Shawarib avatar
gb flag
What messages does the module produce at boot? `journalctl -b | grep iwl`. If you want to execute a script at startup you can use systemd: https://askubuntu.com/questions/919054/how-do-i-run-a-single-command-at-startup-using-systemd
chili555 avatar
cn flag
Is this a dual boot with Windows? https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi#about_dual-boot_with_windows_and_fast-boot_enabled
beardedeagle avatar
cn flag
@KhalidAbuShawarib here is a gist of the output from that command https://gist.github.com/beardedeagle/210db5ae21e72e4cedda903c687bc360
beardedeagle avatar
cn flag
@chili555 this is not a dual booted system. only has Ubuntu 22.04 on it.
Score:0
cn flag

I notice this line in the log:

PNVM data is missing, please install iwlwifi-so-a0-gf-a0.pnvm

Let's install it and see if the problem is solved. From the terminal:

cd /usr/lib/firmware/
sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/iwlwifi-so-a0-gf-a0.pnvm

Reboot and show us again:

journalctl -b | grep iwl

EDIT 1: Your grub boot parameters now read:

ro, quiet, splash, ipv6.disable=1, fastboot, vt.handoff=7

I suspect that the ‘fastboot’ parameter makes the boot process so quick that the iwlwifi driver and firmware don’t fully initialize. Let’s remove it to see if it helps. In a terminal:

sudo nano /etc/default/grub

Find the line that includes the line above. Delete the single word fastboot.

The line should now only include:

ro, quiet, splash, ipv6.disable=1, vt.handoff=7

Proofread carefully. Save (ctrl+o followed by Enter) and exit (Ctrl+x). Follow with:

sudo update-grub

Reboot and tell us if there is any improvement.

beardedeagle avatar
cn flag
the same thing occurred. wifi did not show up or work until a module reload upon reboot. Here is a gist of journalctl: https://gist.github.com/beardedeagle/a5c1868126c98ac476eef601b52fa191
beardedeagle avatar
cn flag
I noticed the wget'd file was named with a `.1`, so I backed up the file that was already present and redownloaded it. Performed a reboot, and same output for journalctl, however now when I unload and reload the iwlwifi module, it does nothing and wifi keeps not working.
beardedeagle avatar
cn flag
I put everything back, and now I am back to being able to get wifi once I reload the module after boot. So it doesn't appear to like the pnvm file from the git source.
beardedeagle avatar
cn flag
I've also checked the bios settings to make sure the wlan/wwan device wasn't disabled or that power management wasn't disabling wlan/wwan when it detects a wired connection. I also checked to make sure `iwlwifi` wasn't a blacklisted module.
beardedeagle avatar
cn flag
I also see this as a means to run for troubleshooting: https://github.com/UbuntuForums/wireless-info, but unsure if I should run that before or after running the `iwlwifi` reload.
chili555 avatar
cn flag
Please run it and post it after a fresh boot and paste it here: http://paste.ubuntu.com and give us the link.
beardedeagle avatar
cn flag
Here it is: https://pastebin.ubuntu.com/p/fFffFscPPf/
chili555 avatar
cn flag
I see nothing remarkable about the wireless in your paste. Please run: `tail -f /var/log/syslog` Open a new terminal and do: `sudo modprobe -r iwlwifi && sudo modprobe iwlwifi` Capture the syslog output and let us see a paste of the result. Is this a virtual machine? What explains the *gdp0* interface?
beardedeagle avatar
cn flag
Done, here it is: https://gist.github.com/beardedeagle/c51042c1606ff913bcccdf0a89d31877. This is a physical laptop that my company issued me, so I am unsure of why the `gdp0` interface, as provisioning laptops is managed by another team.
beardedeagle avatar
cn flag
Ah, `gpd0` appears to be the global protect vpn client
chili555 avatar
cn flag
Please see my edit above in a few moments.
beardedeagle avatar
cn flag
ah yeah, I stumbled across that a few days ago myself and tried disabling it myself to no avail (also removed the ipv6 bit since ipv6 works fine here, something the provisioning team did that wasn't needed.
beardedeagle avatar
cn flag
interestingly we installed ubuntu 22.04 desktop edition onto a dell precision 5570 and it had working wifi out of the box. The workstation I was issued is ubuntu 22.04 server edition. They issue server currently because it's easier for them to provision, they are still figuring out the preseed method for desktop version.
beardedeagle avatar
cn flag
I notice there are newer ucode/pnvm files at https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/. Would it be worth a try to backup all `iwlwifi-*.{ucode,pnvm}` files in `/usr/lib/firmware/`, download the latest and move them there?
chili555 avatar
cn flag
I highly doubt it but it takes little to try.
beardedeagle avatar
cn flag
It did not fix the issue unfortunately, but unlike before I can still unload and reload `iwlwifi` so at least there is that. It's still complaining about the exact same error, but once again I've confirmed that file is present in the correct location. I'm at a loss at this point.
chili555 avatar
cn flag
I regret that I haven't any further useful suggestions. Sorry.
I sit in a Tesla and translated this thread with Ai:

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.