2

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
3
  • "a kernel panic happens"? More information needed. sudo journalctl -b -1 -e shows more. Commented Oct 15 at 17:22
  • Report a bug against the iwlwifi module, including just the 16:35:12 messages. In Ubuntu, I'd use the ubuntu-bug tool, but YMMV. Commented Oct 15 at 18:49
  • What is the output of dmesg | grep iwlwifi on 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. Commented Oct 19 at 14:43

1 Answer 1

2
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

This is a bug in iwldvm in your particular configuration. I can't find anything that indicates that this exact bug has been reported before. You would need to do a lot more debugging to find out the exact cause. You can take the full dmesg output (more than what you posted here) and report it if you would like. You may be asked to perform some steps to get more information, however.

In the meantime, you could see if you can put the computer into S2 (Suspend-to-Idle) instead of S3 (Suspend-to-RAM). S2 does not save as much power as S3 because devices are still powered on and initialized, but it may be a way to work around the bug. As root, change the default sleep state by running echo s2idle > /sys/power/mem_sleep. Then try to put the system to sleep. If this works, you can make the changes persistent so that they do not revert after a reboot.

3
  • Thanks. This workaround works. That woud be interesting if one could avoid/prevent any particular action that triggers the bug (i.e., related with iwldvm) while the system goes to sleep. Commented Oct 16 at 8:54
  • @cacamailg That could be possible, but it would take more information and troubleshooting. Commented Oct 16 at 14:55
  • Thanks for your support on this. I've updated my question, adding some more details. Commented Oct 17 at 9:46

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.