Bug 215918 - Wifi randomly disconnects [AR9462] - dedicated to Ubuntu flavor
Summary: Wifi randomly disconnects [AR9462] - dedicated to Ubuntu flavor
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-29 09:14 UTC by Daniel Calcoen
Modified: 2022-06-08 05:15 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.15.x, 5.16.x, 5.17.x, 5.18.x
Subsystem:
Regression: No
Bisected commit-id:


Attachments
installation of kernel 5.17.5 log, show compiling switches used (6.28 KB, text/plain)
2022-04-29 09:48 UTC, Daniel Calcoen
Details
dmesg for Kernel 5.17.5 (113.03 KB, text/plain)
2022-04-29 10:17 UTC, Daniel Calcoen
Details
dmesg for Kernel 5.15.5 (112.82 KB, text/plain)
2022-04-29 13:51 UTC, Daniel Calcoen
Details
installation of kernel 5.15.5 log, show compiling switches used (6.66 KB, text/plain)
2022-04-29 13:51 UTC, Daniel Calcoen
Details
dmesg for Kernel 5.15.0 (104.02 KB, text/plain)
2022-04-29 13:54 UTC, Daniel Calcoen
Details
installation of kernel 5.15.0 log, show compiling switches used (6.36 KB, text/plain)
2022-04-29 13:55 UTC, Daniel Calcoen
Details
dmesg for Kernel 5.15.4 (102.08 KB, text/plain)
2022-04-29 14:22 UTC, Daniel Calcoen
Details
installation of kernel 5.15.4 log, show compiling switches used (6.81 KB, text/plain)
2022-04-29 14:22 UTC, Daniel Calcoen
Details
screen shot advising for using bugzilla.kernel.org (131.38 KB, image/png)
2022-04-29 16:36 UTC, Daniel Calcoen
Details
installation of kernel 5.18.0rc5 log, show compiling switches used (unsuccessful) (6.51 KB, text/plain)
2022-05-06 10:58 UTC, Daniel Calcoen
Details
NVIDIA make log (81.95 KB, text/plain)
2022-05-06 11:04 UTC, Daniel Calcoen
Details
installation of kernel 5.18.0rc5 log, show compiling switches used (4.71 KB, text/plain)
2022-05-06 12:06 UTC, Daniel Calcoen
Details
dmesg for Kernel 5.18.0rc5 (111.93 KB, text/plain)
2022-05-06 12:08 UTC, Daniel Calcoen
Details

Description Daniel Calcoen 2022-04-29 09:14:59 UTC
as recommended at 
https://bugzilla.kernel.org/show_bug.cgi?id=215698#c14
I open this ticket to collect the information of Ubuntu flavor of the kernels
Comment 1 Daniel Calcoen 2022-04-29 09:17:28 UTC
my hardware : laptop Asus N751JK Network controller: Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01) Subsystem: AzureWave AR9462 Wireless Network Adapter

I was runing Ubuntu 20.10, 21.04 up to Ubuntu 21.10 with Kernel 5.13.0 without any problem.
When migrated to Ubuntu 22.04 which installs Kernel 5.15 then the problems started.

I upgraded and tested unsuccessfully the following Kernels : 5.15.28, 5.15.36, 5.16.14, 5.16.20, 5.17.4, 5.17.5

I disabled the power save as explained at https://askubuntu.com/questions/1403773/22-04-wifi-keeps-disconnecting-for-a-few-seconds-frequently/1404471#1404471
without improvement in any of the Kernels tested.
Also the "intel_iommu=off" mentioned at https://groups.google.com/g/linux.debian.kernel/c/RFpPIp0cncA/m/v9ELDxLICgAJ Bug#994590 didn't help.

I downgraded and currently running without any problem using the Kernel 5.13.19-051319-generic.

There is no problem in my airpoint (router) nor my internet access, I have other different computers and devices working correctly on wifi.
In addition my N751JK works correctly when using the Ethernet adapter for the physical cable.
Comment 2 Daniel Calcoen 2022-04-29 09:19:32 UTC
Note:
I use Ubuntu Mainline Kernel Installer to install/remove the kernels
https://github.com/bkw777/mainline
Comment 3 Daniel Calcoen 2022-04-29 09:33:32 UTC
Ubuntu Mainline Kernel Installer fetchs from kernel.ubuntu.com
Comment 4 The Linux kernel's regression tracker (Thorsten Leemhuis) 2022-04-29 09:45:18 UTC
I'm not one of the maintainers that needs to take care of this, but FWIW: it afaics would be really helpful to check if this was introduced between 5.13 (some would call it 5.13.0) and 5.15 or between 5.15 and 5.15.28
Comment 5 Daniel Calcoen 2022-04-29 09:48:26 UTC
Created attachment 300848 [details]
installation of kernel 5.17.5 log, show compiling switches used
Comment 6 Daniel Calcoen 2022-04-29 09:48:59 UTC
installation of kernel 5.17.5 log, show compiling switches used
https://bugzilla.kernel.org/attachment.cgi?id=300848
Comment 7 Daniel Calcoen 2022-04-29 10:14:43 UTC
result of
sudo dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1 \
/fi/w1/wpa_supplicant1 \
org.freedesktop.DBus.Properties.Set \
string:fi.w1.wpa_supplicant1 \
string:DebugLevel \
variant:string:"msgdump" >wpa_supplicant.log

method return time=1651226558.254675 sender=:1.5 -> destination=:1.146 serial=166 reply_serial=2

method return time=1651226649.835958 sender=:1.5 -> destination=:1.149 serial=195 reply_serial=2
Comment 8 Daniel Calcoen 2022-04-29 10:17:42 UTC
Created attachment 300849 [details]
dmesg for Kernel 5.17.5
Comment 9 Daniel Calcoen 2022-04-29 10:21:29 UTC
the problem appears under heavy load for the wifi, i.e. when downloading a big file over the net

at the dmesg or Kernel 5.17.5
https://bugzilla.kernel.org/attachment.cgi?id=300849

1)boot
2)I downloaded a 80Mb file, problem appears
3)turn off Wi-FI
4)turn on WI-FI the problem persist (without heavy load over the WI-FI)
Comment 10 Daniel Calcoen 2022-04-29 10:23:57 UTC
(In reply to The Linux kernel's regression tracker (Thorsten Leemhuis) from comment #4)
> I'm not one of the maintainers that needs to take care of this, but FWIW: it
> afaics would be really helpful to check if this was introduced between 5.13
> (some would call it 5.13.0) and 5.15 or between 5.15 and 5.15.28

Which is your advice ?
should I start testing from 5.15.0 onward, marking if the problem is present ?
which should be the log information you wish to have ?

these days I have the time and the will to help, so just ask :)
Comment 11 The Linux kernel's regression tracker (Thorsten Leemhuis) 2022-04-29 10:35:30 UTC
(In reply to Daniel Calcoen from comment #10)
>
> Which is your advice ?

Check if 5.15.0 is affected, as we already known that 5.13.y is working and 5.15.28 is not.

Depending on the outcome a git bisection between 5.13 and 5.15 or 5.15 and 5.15.28 would be helpful, unless the maintainer has an idea what might be wrong here.
Comment 12 Daniel Calcoen 2022-04-29 13:51:02 UTC
Created attachment 300851 [details]
dmesg for Kernel 5.15.5
Comment 13 Daniel Calcoen 2022-04-29 13:51:47 UTC
Created attachment 300852 [details]
installation of kernel 5.15.5 log, show compiling switches used
Comment 14 Daniel Calcoen 2022-04-29 13:54:05 UTC
the kernel 5.15.5 has the problem

result for the wpa_supplicant.log
method return time=1651239579.077019 sender=:1.4 -> destination=:1.164 serial=342 reply_serial=2

dmesg for Kernel 5.15.5
https://bugzilla.kernel.org/attachment.cgi?id=300851

installation of kernel 5.15.5 log, show compiling switches used
https://bugzilla.kernel.org/attachment.cgi?id=300852
Comment 15 Daniel Calcoen 2022-04-29 13:54:47 UTC
Created attachment 300853 [details]
dmesg for Kernel 5.15.0
Comment 16 Daniel Calcoen 2022-04-29 13:55:21 UTC
Created attachment 300854 [details]
installation of kernel 5.15.0 log, show compiling switches used
Comment 17 Daniel Calcoen 2022-04-29 13:57:43 UTC
the Kernel 5.15.0 works so far !

result for the wpa_supplicant.log
method return time=1651238101.785291 sender=:1.1 -> destination=:1.144 serial=52 reply_serial=2

dmesg for Kernel 5.15.0
https://bugzilla.kernel.org/attachment.cgi?id=300853

installation of kernel 5.15.0 log, show compiling switches used
https://bugzilla.kernel.org/attachment.cgi?id=300854
Comment 18 Daniel Calcoen 2022-04-29 14:22:20 UTC
Created attachment 300855 [details]
dmesg for Kernel 5.15.4
Comment 19 Daniel Calcoen 2022-04-29 14:22:54 UTC
Created attachment 300856 [details]
installation of kernel 5.15.4 log, show compiling switches used
Comment 20 Daniel Calcoen 2022-04-29 14:29:32 UTC
the Kernel 5.15.4 also works

for both 5.15.0 and 5.15.4 I also checked to stop the WI-FI and start again and both succeed, for the other cases doing that normally make the problem worse

for completeness
result for the wpa_supplicant.log
method return time=1651241954.655624 sender=:1.10 -> destination=:1.163 serial=106 reply_serial=2

dmesg for Kernel 5.15.4
https://bugzilla.kernel.org/attachment.cgi?id=300855

installation of kernel 5.15.4 log, show compiling switches used
https://bugzilla.kernel.org/attachment.cgi?id=300856
Comment 21 Daniel Calcoen 2022-04-29 14:30:22 UTC
seems to be something between 5.15.4 and 5.15.5 that is also propagates to 5.16.x and 5.17.x
Comment 22 Daniel Calcoen 2022-04-29 15:20:51 UTC
as suggested I'll continue at Ubuntu distribution place  https://bugs.launchpad.net/ubuntu/+source/kernel-package/+bug/1970965

this ticket can be closed
Comment 23 Daniel Calcoen 2022-04-29 16:36:51 UTC
Created attachment 300857 [details]
screen shot advising for using bugzilla.kernel.org
Comment 24 Daniel Calcoen 2022-04-29 16:38:30 UTC
the screen shot form the collect tool advises to publish in this site
as I'm using a mainline kernel

https://bugzilla.kernel.org/attachment.cgi?id=300857
Comment 25 The Linux kernel's regression tracker (Thorsten Leemhuis) 2022-05-06 09:17:45 UTC
FWIW, all the Ubuntuisms here make it hard to follow for me.

(In reply to Daniel Calcoen from comment #21)
> seems to be something between 5.15.4 and 5.15.5 that is also propagates to
> 5.16.x and 5.17.x

So just to understand things properly: your problem occurs with vanilla 5.15 and started to happen with 5.15.5; it's also still present in the lastet kernel? Could you maybe give 5.18-rc5 a quick try?
Comment 26 Daniel Calcoen 2022-05-06 09:34:44 UTC
I use Ubuntu Mainline Kernel Installer to install/remove the kernels
https://github.com/bkw777/mainline
which fetches the files from kernel.ubuntu.com
actually this app list, the newest kernel shown is the 5.17.5

I'll try 5.18-rc5 this night (just give me a bit of time because I need to install it manually :( )
Comment 27 Daniel Calcoen 2022-05-06 09:36:45 UTC
another person has confirmed the same behavior at
https://bugs.launchpad.net/ubuntu/+source/kernel-package/+bug/1970965
with not identical but similar hardware
Comment 28 Daniel Calcoen 2022-05-06 09:45:51 UTC
> actually at this app list the newest kernel shown is the 5.17.5
> 
> I'll try 5.18-rc5 this night (just give me a bit of time because I need to
> install it manually :( )

my bad, I un-hide the RCs and the 5.18.0-rc5 is there
I'll test it in an hour and let you know
Comment 29 Daniel Calcoen 2022-05-06 10:58:58 UTC
Created attachment 300891 [details]
installation of kernel 5.18.0rc5 log, show compiling switches used (unsuccessful)

installation of kernel 5.18.0rc5 log, show compiling switches used
unsuccessful installation
Comment 30 Daniel Calcoen 2022-05-06 11:00:56 UTC
Couldn't install the 5.18.0rc5 at the 1st try

unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.18.0-051800rc5-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.18.0-051800rc5-generic/build LD=/usr/bin/ld.bfd modules........(bad exit status: 2)
ERROR (dkms apport): kernel package linux-headers-5.18.0-051800rc5-generic is not supported
Error! Bad return status for module build on kernel: 5.18.0-051800rc5-generic (x86_64)
Consult /var/lib/dkms/nvidia/510.60.02/build/make.log for more information.
Comment 31 Daniel Calcoen 2022-05-06 11:04:18 UTC
Created attachment 300892 [details]
NVIDIA make log

NVIDIA make log
Comment 32 Daniel Calcoen 2022-05-06 11:05:34 UTC
I'm sorry I need to solve the errors with the NVIDIA or desinstall it before testing the 5.18.0rc5
Comment 33 The Linux kernel's regression tracker (Thorsten Leemhuis) 2022-05-06 11:07:37 UTC
(In reply to Daniel Calcoen from comment #32)
>  desinstall it before testing the 5.18.0rc5

Do that, most kernel developers don't care about reports with nvidia's driver loaded, as it might be the reason why something malfunctions
Comment 34 Daniel Calcoen 2022-05-06 12:05:50 UTC
I desinstalled the NVIDIA drivers and remove all NVIDIA packages and files
running with xorg driver in x11 (just to confirm)
Comment 35 Daniel Calcoen 2022-05-06 12:06:35 UTC
Created attachment 300893 [details]
installation of kernel 5.18.0rc5 log, show compiling switches used

installation of kernel 5.18.0rc5 log, show compiling switches used
Comment 36 Daniel Calcoen 2022-05-06 12:07:34 UTC
this time the installation of 5.18.0rc5 went ok
(also no compilation of the modules as NVIDIA is not anymore there)
Comment 37 Daniel Calcoen 2022-05-06 12:08:07 UTC
Created attachment 300894 [details]
dmesg for Kernel 5.18.0rc5

dmesg for Kernel 5.18.0rc5
Comment 38 Daniel Calcoen 2022-05-06 12:08:37 UTC
the problem is still there with 5.18.0.rc5
Comment 39 Daniel Calcoen 2022-05-06 12:10:28 UTC
I'm back on 
Linux ubuntu 5.15.4-051504-generic #202111211331 SMP Sun Nov 21 13:53:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
this time without NVIDIA and again everything works fine
Comment 40 Kalle Valo 2022-05-07 04:54:30 UTC
Few tips how to solve this:

Stop using Ubuntu built kernels and Ubuntu specific tools. This is kernel.org bugzilla, we only support kernels retrieved from kernel.org which users have built themselves. We don't know what distros do so we can't support distro kernels.

Don't use out of tree drivers like nvidia or virtualbox. Same comment as above, we don't know what they do.

For testing use the linux-stable tree and build the kernel yourself:

git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

If I'm understanding correctly v5.15.4 works and v5.15.5 is broken. First verify that v5.15.4 really works without problems by checking out the release and building the kernel yourself:

git checkout v5.15.4

Then do the same for v5.15.5 and make sure you see the bug:

git checkout v5.15.5

If you are 100% sure (this is important!) that v5.15.4 works and v5.15.5 is broken you can start a bisect search to find the commit which broke this:

git bisect start
git bisect bad v5.15.5
git bisect good v5.15.4

Again you have to be 100% sure before marking a commit good or bad. One mistake and the bisect is useless. After you have found the commit which broke this you can verify that by reverting the commit:

git checkout v5.15.15
git revert <commitid>

More info:

https://www.kernel.org/doc/html/latest/admin-guide/bug-bisect.html
Comment 41 Kalle Valo 2022-05-07 04:56:53 UTC
(In reply to Kalle Valo from comment #40)
> Again you have to be 100% sure before marking a commit good or bad. One
> mistake and the bisect is useless. After you have found the commit which
> broke this you can verify that by reverting the commit:
> 
> git checkout v5.15.15
> git revert <commitid>

Oops, a typo. This should be:

git checkout v5.15.5
git revert <commitid>
Comment 42 Daniel Calcoen 2022-05-07 05:50:37 UTC
Understood, I'll proceed following your advice.

In parallel, while testing each kernel, I wish to profit and collect more information related to the wi-fi,
 
which are the logs related to wi-fi modules/driver/function that I can produce ?

(because the output obtained from dmesg didn't provide too much help in this case, or I don't know how to interpret it correctly...)
Comment 43 Daniel Calcoen 2022-06-08 05:15:51 UTC
Unfortunately with my limited knowledge I was not able to bisect the Ubuntu Kernel version but I installed then Mainline Kernel 5.17.11 and the problem has disappeared

https://askubuntu.com/questions/1411565/which-repository-should-i-use-to-build-ubuntu-kernel-and-how-should-i-build-to-b

Note You need to log in before you can comment on or make changes to this bug.