I've a problem with kernel versions starting from version 6.16. it was working in kernel 6.15.
In kernel 6.15, when I put my laptop to sleep and resume from it, the Wi-Fi does not resume. So I am no longer able to connect to Internet.
I solved the problem by issuing the following commands:
echo 1 | sudo tee /sys/bus/pci/devices/0000:03:00.0/remove
sleep 1
echo 1 | sudo tee /sys/bus/pci/rescan
But when I try the same approach in kernel 6.16 or later, a kernel panic happens.
In fact, it is enough to run:
echo 1 | sudo tee /sys/bus/pci/devices/0000:03:00.0/remove
This is clearly a problem with the Wi-Fi module or the PCI bus. As if I do
sudo modprobe -r iwldvm
The same kernel panic happens.
Note that this only happens after suspend.
Any help is welcome.
EDIT 1:
In fact it is not required to suspend/resume. Just by removing the iwldvm module the system hangs.
EDIT 2:
Return of sudo journalctl -b -1 -e:
Oct 15 16:35:11 Lisa kernel: ieee80211 phy1: Selected rate control algorithm 'iwl-agn-rs'
Oct 15 16:35:11 Lisa NetworkManager[768]: <info> [1760542511.3329] device (wlan0): driver supports Access Point (AP) mode
Oct 15 16:35:11 Lisa NetworkManager[768]: <info> [1760542511.3336] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/6)
Oct 15 16:35:11 Lisa NetworkManager[768]: <info> [1760542511.3397] rfkill4: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/ieee80211>
Oct 15 16:35:11 Lisa NetworkManager[768]: <info> [1760542511.3413] device (wlan0): interface index 5 renamed iface from 'wlan0' to 'wlp3s0'
Oct 15 16:35:11 Lisa kernel: iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0
Oct 15 16:35:11 Lisa ModemManager[804]: <wrn> [plugin-manager] task 5: port context already scheduled
Oct 15 16:35:11 Lisa systemd[1]: session-2.scope: Unit now thawed.
Oct 15 16:35:11 Lisa systemd[1]: [email protected]: Unit now thawed.
Oct 15 16:35:11 Lisa systemd[1]: user-1000.slice: Unit now thawed.
Oct 15 16:35:11 Lisa systemd[1]: user.slice: Unit now thawed.
Oct 15 16:35:11 Lisa systemd-sleep[2815]: Successfully thawed unit 'user.slice'.
Oct 15 16:35:11 Lisa systemd[1]: systemd-suspend.service: Deactivated successfully.
Oct 15 16:35:11 Lisa systemd[1]: Finished systemd-suspend.service - System Suspend.
Oct 15 16:35:11 Lisa systemd[1]: Stopped target sleep.target - Sleep.
Oct 15 16:35:11 Lisa systemd[1]: Reached target suspend.target - Suspend.
Oct 15 16:35:11 Lisa systemd-logind[599]: Operation 'suspend' finished.
Oct 15 16:35:11 Lisa NetworkManager[768]: <info> [1760542511.4724] manager: sleep: wake requested (sleeping: yes enabled: yes)
Oct 15 16:35:11 Lisa ModemManager[804]: <msg> [sleep-monitor-systemd] system is resuming
Oct 15 16:35:11 Lisa NetworkManager[768]: <info> [1760542511.4726] device (enp0s25): state change: unmanaged -> unavailable (reason 'managed', managed-type: 'external')
Oct 15 16:35:11 Lisa systemd[1]: Starting grub-common.service - Record successful boot for GRUB...
Oct 15 16:35:11 Lisa systemd[1]: Stopped target suspend.target - Suspend.
Oct 15 16:35:11 Lisa ModemManager[804]: <wrn> [plugin-manager] task 4: port context already scheduled
Oct 15 16:35:11 Lisa ModemManager[804]: <wrn> [plugin-manager] task 4: port context already scheduled
Oct 15 16:35:11 Lisa ModemManager[804]: <wrn> [plugin-manager] task 4: port context already scheduled
Oct 15 16:35:11 Lisa ModemManager[804]: <wrn> [plugin-manager] task 5: port context already scheduled
Oct 15 16:35:11 Lisa ModemManager[804]: <wrn> [plugin-manager] task 4: port context already scheduled
Oct 15 16:35:11 Lisa ModemManager[804]: <wrn> [plugin-manager] task 4: port context already scheduled
Oct 15 16:35:11 Lisa systemd[1]: grub-common.service: Deactivated successfully.
Oct 15 16:35:11 Lisa systemd[1]: Finished grub-common.service - Record successful boot for GRUB.
Oct 15 16:35:11 Lisa NetworkManager[768]: <info> [1760542511.6858] device (wlp3s0): state change: unmanaged -> unavailable (reason 'managed', managed-type: 'external')
Oct 15 16:35:11 Lisa kernel: iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
Oct 15 16:35:11 Lisa dbus-daemon[1730]: [session uid=1000 pid=1730 pidfd=5] Activating via systemd: service name='org.xfce.Xfconf' unit='xfconfd.service' requested by ':>
Oct 15 16:35:11 Lisa systemd[1705]: Starting xfconfd.service - Xfce configuration service...
Oct 15 16:35:11 Lisa dbus-daemon[1730]: [session uid=1000 pid=1730 pidfd=5] Successfully activated service 'org.xfce.Xfconf'
Oct 15 16:35:11 Lisa systemd[1705]: Started xfconfd.service - Xfce configuration service.
Oct 15 16:35:11 Lisa usb_modeswitch[3191]: switch device 1199:9013 on 002/003
Oct 15 16:35:11 Lisa systemd[1]: [email protected]: Deactivated successfully.
Oct 15 16:35:11 Lisa systemd[1]: Finished [email protected] - USB_ModeSwitch_2-1.4.
Oct 15 16:35:11 Lisa kernel: iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
Oct 15 16:35:12 Lisa NetworkManager[768]: <info> [1760542512.0830] device (wlp3s0): set-hw-addr: set MAC address to 62:FF:3B:82:C5:B9 (scanning)
Oct 15 16:35:12 Lisa kernel: iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
Oct 15 16:35:12 Lisa kernel: iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
Oct 15 16:35:12 Lisa NetworkManager[768]: <info> [1760542512.4512] manager: NetworkManager state is now DISCONNECTED
Oct 15 16:35:12 Lisa wpa_supplicant[770]: dbus: fill_dict_with_properties dbus_interface=fi.w1.wpa_supplicant1.Interface.P2PDevice dbus_property=P2PDeviceConfig getter f>
Oct 15 16:35:12 Lisa NetworkManager[768]: <info> [1760542512.4658] device (wlp3s0): supplicant interface state: internal-starting -> disconnected
Oct 15 16:35:12 Lisa NetworkManager[768]: <info> [1760542512.4661] device (wlp3s0): state change: unavailable -> disconnected (reason 'supplicant-available', managed-ty>
Oct 15 16:35:12 Lisa kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000
Oct 15 16:35:12 Lisa kernel: #PF: supervisor instruction fetch in kernel mode
Oct 15 16:35:12 Lisa kernel: #PF: error_code(0x0010) - not-present page
EDIT 3:
If I do not run the code:
echo 1 | sudo tee /sys/bus/pci/devices/0000:03:00.0/remove
The system does not freeze. But I am unable to connect to the Internet via Wi-Fi and sudo journalctl -f displays the following errors:
Oct 17 06:51:22 Lisa kernel: iwlwifi 0000:03:00.0: Failed to run INIT ucode: -5
Oct 17 06:51:22 Lisa kernel: iwlwifi 0000:03:00.0: Unable to initialize device.
Oct 17 06:51:22 Lisa kernel: iwlwifi 0000:03:00.0: Could not load the [0] uCode section
sudo journalctl -b -1 -eshows more.iwlwifimodule, including just the16:35:12messages. In Ubuntu, I'd use theubuntu-bugtool, but YMMV.dmesg | grep iwlwifion your system? Also, this answer was a solution to a very similar issue. Perhaps that would work. And make sure you have firmware-iwlwifi installed.