You are not logged in.

#1 2021-02-26 12:46:15

fetchinson
Member
Registered: 2012-10-19
Posts: 6

Wifi doesn't work after suspend

On my laptop the wifi works perfectly well after booting the machine, but I can't get it to work after a suspend.

By suspend I mean 'systemctl suspend'.

This is what lspci gives me:

    [fetch@fetch ~]$ lspci | grep Network
    02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6235 (rev 24)

And nmcli gives me:

    [fetch@fetch ~]$ nmcli
    ....
    ....
    wlp2s0: unavailable
            "Intel Centrino Advanced-N 6235"
            wifi (iwlwifi), C4:85:08:69:09:97, hw, mtu 1500
    ....
    ....

And ifconfig gives me:

    [root@fetch ~]# ifconfig wlp2s0 up
    SIOCSIFFLAGS: Connection timed out


And all of this happens even after I restart NetworkManager and wpa_supplicant and upower by

    [root@fetch ~]# systemctl restart NetworkManager
    [root@fetch ~]# systemctl restart wpa_supplicant
    [root@fetch ~]# systemctl restart upower

Any ideas what I should check further? There must be a way to restart the wifi I'd think....

By the way I'm not using any desktop environment like gnome or kde or similar.

Last edited by fetchinson (2021-02-26 12:52:37)

Offline

#2 2021-02-26 13:00:39

seth
Member
Registered: 2012-09-03
Posts: 51,135

Re: Wifi doesn't work after suspend

[root@fetch ~]# systemctl restart NetworkManager
    [root@fetch ~]# systemctl restart wpa_supplicant

If you've both services enabled, you're doing it wrong. NM will invoke wpa_supplicant when required; if you run multiple services, they'll trip over each other.

To address the problem:
- You could try to reload the iwlwifi module.
- do you use sth. likel TLP or laptop-mode-tools etc.?
- Do you have a parallel windows installation?
- look at the dmesg whether there're wifi related errors/warnings after the S3

Online

#3 2021-02-26 13:31:38

fetchinson
Member
Registered: 2012-10-19
Posts: 6

Re: Wifi doesn't work after suspend

seth wrote:

[root@fetch ~]# systemctl restart NetworkManager
    [root@fetch ~]# systemctl restart wpa_supplicant

If you've both services enabled, you're doing it wrong. NM will invoke wpa_supplicant when required; if you run multiple services, they'll trip over each other.

Okay, I stopped wpa_supplicant, and restarted NetworkManager.

seth wrote:

- You could try to reload the iwlwifi module.

Tried it, but didn't help.

seth wrote:

- do you use sth. likel TLP or laptop-mode-tools etc.?

I guess I don't understand this part smile What is sth. likel TLP?

seth wrote:

- Do you have a parallel windows installation?

No, I don't.

seth wrote:

- look at the dmesg whether there're wifi related errors/warnings after the S3

After reloading the iwlwifi module I get this in dmesg:

[161141.501232] iwlwifi 0000:02:00.0: Radio type=0x2-0x1-0x0
[161146.565345] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[161146.565354] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[161146.577346] iwlwifi 0000:02:00.0: Failed to run INIT ucode: -110
[161146.577359] iwlwifi 0000:02:00.0: Unable to initialize device.

I'm not sure what it means though...

The thing is that first I'd like to understand what's going on and only then apply a fix.

So what can be the reason for the disabled wifi? The power management stuff is switching it off to save battery time and then it doesn't switch it back on? Something like that? I use mate-power-manager. Even if the power management stuff is interfering, it's still weird that I can't force it back on.

Offline

#4 2021-02-26 13:40:02

seth
Member
Registered: 2012-09-03
Posts: 51,135

Re: Wifi doesn't work after suspend

- tlypo & https://archlinux.org/packages/community/any/tlp/
Not unlike mate-power-manager. Please disable it so we  can determine whether it's the cause before diving into the question why it does that.

-110 is a timeout, the dvice doesn't respond. It's just a symptom of the known condition.

Online

#5 2021-02-26 16:27:29

fetchinson
Member
Registered: 2012-10-19
Posts: 6

Re: Wifi doesn't work after suspend

seth wrote:

- tlypo & https://archlinux.org/packages/community/any/tlp/
Not unlike mate-power-manager. Please disable it so we  can determine whether it's the cause before diving into the question why it does that.

I see, thanks for the link, I don't use tlp, and now killed mate-power-manager as well. Still if I restart NetworkManager and try

ifconfig wlp2s0 up

I still get

SIOCSIFFLAGS: Connection timed out

By the way, what would be the most miniimal way to bringing the wifi back to life?
I'm afraid at the moment I'm issuing commands pretty randomly, without understanding what the order should be.
I'm trying with these:

modprobe iwlwifi
systemctl restart NetworkManager
ifconfig wlp2s0 up

What would be the ideal order of these commands? Is it possible to leave out NetworkManager entirely? It seems to me that would simplify things quite a bit because NetworkManager is doing all sorts of things in the background which are not very clear to me..

Offline

#6 2021-02-26 16:30:48

seth
Member
Registered: 2012-09-03
Posts: 51,135

Re: Wifi doesn't work after suspend

You certainly need to "modprobe -r iwlwifi" first, otherwise "modprobe iwlwifi" does nothing.

Online

#7 2021-02-26 17:16:32

fetchinson
Member
Registered: 2012-10-19
Posts: 6

Re: Wifi doesn't work after suspend

seth wrote:

You certainly need to "modprobe -r iwlwifi" first, otherwise "modprobe iwlwifi" does nothing.

Okay, got it, so this is what I get:

[root@fetch ~]# modprobe -r iwlwifi
modprobe: FATAL: Module iwlwifi is in use.

Offline

#8 2021-02-26 19:57:08

seth
Member
Registered: 2012-09-03
Posts: 51,135

Re: Wifi doesn't work after suspend

You'll have to stop NM (and all other controlling services)
Ensure that the NIC is down ("ip a") and at that point you should™ be able to remove the module.

Online

#9 2021-02-28 20:07:04

fetchinson
Member
Registered: 2012-10-19
Posts: 6

Re: Wifi doesn't work after suspend

seth wrote:

You'll have to stop NM (and all other controlling services)

Thanks a lot again, I've stopped NM (not sure what else would be interfering with the network though).

seth wrote:

Ensure that the NIC is down ("ip a") and at that point you should™ be able to remove the module.

I did "ip a" as well, but still can't remove the module:

[root@fetch ~]# modprobe -r iwlwifi
modprobe: FATAL: Module iwlwifi is in use.

What would be the best way to find out what is using the iwlwifi module still?

Offline

#10 2021-02-28 20:25:30

seth
Member
Registered: 2012-09-03
Posts: 51,135

Re: Wifi doesn't work after suspend

"ip a" won't do anything to change the situation, but the output should not suggest that the NIC is still up.

Online

Board footer

Powered by FluxBB