Bug 1174622 - System not reconnecting to WLAN after suspend/resume
System not reconnecting to WLAN after suspend/resume
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Kernel
Leap 15.3
x86-64 SUSE Other
: P5 - None : Normal (vote)
: ---
Assigned To: openSUSE Kernel Bugs
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-07-28 21:28 UTC by Holger Sickenberg
Modified: 2022-07-22 08:34 UTC (History)
4 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Output of hwinfo --netcard (1.47 KB, text/plain)
2020-07-28 21:28 UTC, Holger Sickenberg
Details
NetworkManager log (50.91 KB, text/plain)
2020-07-28 21:57 UTC, Holger Sickenberg
Details
dmesg output (101.68 KB, text/plain)
2020-07-29 08:44 UTC, Holger Sickenberg
Details
dmesg output (103.52 KB, text/plain)
2020-07-29 13:10 UTC, Holger Sickenberg
Details
dmesg output Tumbleweed (98.01 KB, text/plain)
2020-07-30 22:45 UTC, Holger Sickenberg
Details
dmesg output kernel-default-5.0 (107.94 KB, text/plain)
2020-08-01 08:32 UTC, Holger Sickenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Sickenberg 2020-07-28 21:28:13 UTC
Created attachment 840122 [details]
Output of hwinfo --netcard

System with NetworkManger is connected to a wifi network. After suspend and resume later, it is not able to reconnect to the same wifi network. After a reboot, system is connecting to the same wifi network without any problems.
Comment 1 Holger Sickenberg 2020-07-28 21:57:47 UTC
Created attachment 840123 [details]
NetworkManager log

Added NetworkManager log
Comment 2 Takashi Iwai 2020-07-29 06:36:47 UTC
Could you give dmesg output, too?
Comment 3 Holger Sickenberg 2020-07-29 08:44:22 UTC
Created attachment 840132 [details]
dmesg output
Comment 4 Holger Sickenberg 2020-07-29 13:10:25 UTC
Created attachment 840144 [details]
dmesg output
Comment 5 Takashi Iwai 2020-07-30 06:51:30 UTC
We see a fatal firmware loading error of iwlwifi at resume:
[ 1859.606056] iwlwifi 0000:03:00.0: Error sending REPLY_SCAN_ABORT_CMD: time out after 2000ms.
....

And it's an old chip (6205) which firmware hasn't been updated for 8 years log.
So it must be a kernel side problem.

Could try to boot with TW kernel on this system while keeping the rest, and check whether the similar issue is seen or not?
Comment 6 Holger Sickenberg 2020-07-30 11:29:31 UTC
Unfortunately that's not working for my system. After installing TW kernel, I can no longer boot into my system on encrypted LVM, that's just working with the current 15.2 kernel.
Comment 7 Takashi Iwai 2020-07-30 12:24:20 UTC
(In reply to Holger Sickenberg from comment #6)
> Unfortunately that's not working for my system. After installing TW kernel,
> I can no longer boot into my system on encrypted LVM, that's just working
> with the current 15.2 kernel.

That's bad.  I don't know of such an issue, maybe some problem with initrd.
Do you get the emergency shell?

In the worst case, you can try some TW Live image.  We want to see only whether the suspend/resume works, after all.
Comment 8 Holger Sickenberg 2020-07-30 22:45:42 UTC
Created attachment 840227 [details]
dmesg output Tumbleweed

OK, I installed Tumbleweed alongside and see the same behavior. See dmesg log
Comment 9 Takashi Iwai 2020-07-31 06:37:05 UTC
Thanks!

I forgot to ask, though, whether it's a regression.  Did it work on Leap 15.1?
If yes, could you check installing Leap 15.1 kernel onto Leap 15.2 system and retest?  (Only if you still have Leap 15.2 system on your machine; TW installation wouldn't work with Leap 15.1 kernel due to the compressed firmware files.)

If it's confirmed to be a kernel regression since Leap 15.1 and TW kernel suffers, we should report it to upstream.  Please report it to upstream devs, e.g. bugzilla.kernel.org?  Feel free to put me (tiwai@suse.de) in Cc there.
Comment 10 Holger Sickenberg 2020-07-31 12:21:52 UTC
So far my tests on 15.2 with 15.1 kernel are successful - I have not seen any crash.

Since I do not have an account on kernel.org, I'd appreciate if you can move that issue there.
Comment 11 Takashi Iwai 2020-07-31 13:33:15 UTC
(In reply to Holger Sickenberg from comment #10)
> So far my tests on 15.2 with 15.1 kernel are successful - I have not seen
> any crash.

OK, at least it's a good news.

Leap 15.1 kernel is based on 4.12, but the WiFi stack and iwlwifi driver are almost equivalent with 4.19.

There are a few other older kernels available in OBS home:tiwai:kernel:4.19, home:tiwai:kernel:4.20, home:tiwai:kernel:5.0, home:tiwai:kernel:5.1 and home:tiwai:kernel:5.2, corresponding to each kernel version.  If you can find out which kernel starts regression, it can be a great help.

> Since I do not have an account on kernel.org, I'd appreciate if you can move
> that issue there.

Then you can report to linux-wireless ML instead, too.  This can be even a better path :)  But it'd be better to narrow down the regression at first.
Comment 12 Holger Sickenberg 2020-08-01 08:32:20 UTC
Created attachment 840275 [details]
dmesg output kernel-default-5.0

I did not have any problems with 4.X kernels up to 4.20. But starting with the 5.0 kernel, I see that crashes. dmesg for 5.0 output attached
Comment 13 Takashi Iwai 2020-08-04 13:28:57 UTC
Thanks.  Now let's communicate with the upstream devs.
I'm going to report to linux-wireless ML.
Comment 14 Tripple Moon 2020-08-13 11:14:02 UTC
Not sure if it is related but maybe worth mentioning also, i had a problem with networking after a resume which i solved with a workaround.
It was systemd-networkd related: https://github.com/systemd/systemd/issues/14987
Maybe it can be of use in this case also, aside the problem with the driver loading.
Comment 15 Holger Sickenberg 2020-09-04 08:06:30 UTC
(In reply to Tripple Moon from comment #14)
> Not sure if it is related but maybe worth mentioning also, i had a problem
> with networking after a resume which i solved with a workaround.
> It was systemd-networkd related:
> https://github.com/systemd/systemd/issues/14987
> Maybe it can be of use in this case also, aside the problem with the driver
> loading.

Did you - with your problem - see any similar crash in dmesg as in my logs?
Comment 16 Holger Sickenberg 2020-10-19 06:45:47 UTC
Issue still around with current 15.2 kernel (5.3.18-lp152.44-default)
Comment 17 Takashi Iwai 2020-10-27 15:58:50 UTC
Unfortunately no reaction to my upstream report.  So it's little chance to get it fixed magically without action.

And, it's tough to find out the culprit; basically you need to bisect the commits between 4.20 and 5.0.
Comment 18 Takashi Iwai 2020-10-27 16:01:41 UTC
BTW, do you get the network again if you reload the driver?
Try "modprobe -r iwlmvm" and "modprobe iwlwifi"
Comment 19 Holger Sickenberg 2020-11-03 21:21:22 UTC
yes, "modprobe -r iwldvm; modprobe iwlwifi" will make it work again
Comment 20 Takashi Iwai 2020-11-16 14:47:50 UTC
You may put some hacks in either systemd or something else for the suspend/resume to perform those module reloads, too.  Of course, it's a quite ugly workaround and should be seen as the last resort...
Comment 21 Takashi Iwai 2020-11-23 15:11:01 UTC
FWIW, a simple workaround would be to create a script /usr/lib/systemd/system-sleep/iwlwifi-reload.sleep, containing the content like:

#!/bin/sh
if [ "$1" = "pre" ]; then
    modprobe -r iwlmvm
else
    modprobe iwlwifi
fi
exit 0
Comment 22 Michael V 2020-12-02 08:31:56 UTC
This is happening to me too on a MacBookPro11,4

Operating System: openSUSE Leap 15.2
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.71.0
Qt Version: 5.12.7
Kernel Version: 5.3.18-lp152.50-default
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4770HQ CPU @ 2.20GHz
Memory: 15,5 GiB

I have another laptop where the WiFi is OK, but the USB hub just stops working and it's necessary to reset the USB hub. If you could provide a script for me to run every time the error occurs, I'll execute it and post the output.

When I was running TW (which doesn't work anymore on this Macbook due to https://bugzilla.opensuse.org/show_bug.cgi?id=1175994 ) I can't remember running into this problem, so maybe it's fixed in a higher kernel.

TW ran with 5.5.1-1-default to 5.6.14-1-default. Maybe that helps narrow down the problem. If there's a repo with all kernels until 5.5.1-1-default, I wouldn't mind manually installing a new one and testing until I see the error again. Just point me to it.
Comment 23 Takashi Iwai 2020-12-07 13:31:04 UTC
There are kernels for each major version in OBS home:tiwai:kernel:* repo, e.g. home:tiwai:kernel:5.4, home:tiwai:kernel:5.5, etc.  It'd be helpful if you can try and check which kernel works and which doesn't.
Comment 24 Miroslav Beneš 2022-01-21 12:29:28 UTC
Holger, has the situation improved since back then (there is also Leap 15.3, 15.2 is not supported anymore)? Or are you satisfied with the workaround Takashi proposed?

Michael V, have you tried old kernels Takashi provided?
Comment 25 Holger Sickenberg 2022-01-21 14:34:21 UTC
Unfortunately not, the problem is still the same. I have updated to 15.3 in the meantime and still suffering from the same issue.
Comment 26 Miroslav Beneš 2022-01-28 09:43:35 UTC
Ok, that was a long shot. Anyway, if the problem started to appear between 4.20 and 5.0, the easiest would be just to bisect it. Would you be able to do that? If we found the offending commit, it would be easier to fix it (or to force upstream to fix it).

Just to be sure, could you also try the latest TW kernel, please? Kernel:stable project in OBS (you might need Kernel:stable:Backport due to some recent incompatible changes. I am not sure.).
Comment 27 Holger Sickenberg 2022-07-22 08:22:23 UTC
My impression is that this is no longer an issue starting with openSUSE 15.4. I'm not 100% sure, but hopeful.
Comment 28 Takashi Iwai 2022-07-22 08:34:43 UTC
OK, then let's close for now.  Feel free to reopen if the problem reappears again.  Thanks.