Hello guy. I have an issue with the laptop - the WiFi is not detected anymore after laptop wakes up from sleep.
Using Zorin OS 18
Laptop model Lenovo idea pad pro 5 14IAH10 (what a mouth full)
The OS is in dual boot with windows 11 (not having this issue under windows)
I have applied almost all suggestion the google's AI but nothing works. The WiFi itself is made by intel and it is WiFi 7.
The laptop is in s2idle
sudo systemctl restart NetworkManager does not work
sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf (changed the value from 3 to 2 but with no results)
Also i have used other command suggested by the AI because i'm no tech guru and to be honest Linux is kinda my weak spot. I have briefly used it shortly now and then but you could not say that i'm a true user. I'm toying with the idea to move away from windows, but little stuff like the above mentioned make things hard.
Would appreciate if there is someone that could offer a working solution as i can't really go about rebooting the laptop every time it goes to sleep just to get the WiFi going.
I still have access to win 11 so i have logged on disabled fast startup.
Also after sudo modprobe -r iwlmvm iwlwifi i got an error something like iwlmld still in use or something. I acctualy made a proper reply for you but after i hit reply i remembered that the WIFI was off so had to reboot and i didn't save my reply to you.
Another user created this script which helped to stop the Networkmanager before the suspend, remove the kernel modules for intel wifi and after suspend to reload the kernel modules and to start the Networkmanager again:
Unfortunately that did not do the trick. While i did not get any errors, nothing happened. Well acctualy something did. The GUI for WiFi has disappeared after the commands. Extra 2 lines was a poor attempt from by behalf to ..do something. But nothing worked.
If my first suggestion doesn't work it could mean your wifi will not support suspend, I had the problem with my old laptop, so I disabled suspend mode
edit this file
sudo nano /etc/systemd/sleep.conf
Remove “#” at the beginning of the lines above and make this changes
well I did try your suggestion. Just to see what will happen, but just by reading the code, while i'm a total noob, I could tell that this might work just because the laptop will not actually go to sleep anymore. Even the screen doesn't turn of while the lead is closed. It is a fix just like when you go to the doctor telling you have horrible nightmares while sleeping and he is telling you well..just don't sleep anymore. This laptop has a huge battery life i used often unplugged it also comes with an oled screen. If i will let it like that, if i will get up and go somewhere on a short notice the battery will take a hit. Even the screen due to burn in. If i close the screen and the screen doesn't even turn off anymore is also not good. Therefore, thank you for the suggestion. But i will revert because it is not the fix i was looking for.
for this command i got a result of "1" pointing that this was the problem
echo 0 | sudo tee /sys/bus/pci/devices/0000:02:00.0/d3cold_allowed
this command had a result of "0" pointing that the situation might have been fixed. At this point I have put the laptop to sleep to see if i still have wifi after wake up. (and it did --yeeey)
the below 2 lines of code was to make things permanent even after laptop reboot
echo 'ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x272b", ATTR{d3cold_allowed}="0"' | sudo tee /etc/udev/rules.d/10-intel-wifi-d3cold.rules
sudo tee /usr/lib/systemd/system-sleep/wifi-d3cold.sh << 'EOF'
#!/bin/sh
case "$1" in
post)
echo 0 > /sys/bus/pci/devices/0000:02:00.0/d3cold_allowed
;;
esac
EOF
sudo chmod 755 /usr/lib/systemd/system-sleep/wifi-d3cold.sh
#after the above line of code i have rebooted the laptop, put it to sleep and woke it up and the wifi was still there, thus a valid solution to my problem.
thank you for the time and help of everybody that was involved. Hopefully this will help others in the future. I will def. save this fix for future cause i don't want to search it from scratch again.