Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wifi works for a while then stop
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
pieterbreed
n00b
n00b


Joined: 15 Dec 2022
Posts: 8

PostPosted: Thu Dec 15, 2022 8:24 pm    Post subject: Wifi works for a while then stop Reply with quote

My laptop wifi works, as in I can browse networks in kde and connect to them. All internet related activites then work correctly at this point.

If I leave the computer idling for a while (couple of 10s of minutes reliably triggers this) then the wifi sort-of stops working. The link shows as connected, and the OS thinks it is connected, but no connection attempts succeed or timeout. Everything making or using connections to the net just hangs on waiting for a timeout. If I then manually disconnect and reconnect everything proceeds for a while.

If I'm on a zoom meeting where I don't do much with the computer for a while, the meeting will continue streaming, but in the background at some point, services making outbound connections stop being able to.

How can I debug this?
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Thu Dec 15, 2022 8:40 pm    Post subject: Reply with quote

Hi Pieter.

Sounds like it could be aggressive power saving... maybe a WiFi module option or something that's set to try insanely hard to save your laptop's battery? As a test and possible workaround, you could have a script in the background pinging a remote server once a minute, or something like that, to see if this activity keeps your WiFi alive.
Back to top
View user's profile Send private message
pieterbreed
n00b
n00b


Joined: 15 Dec 2022
Posts: 8

PostPosted: Fri Dec 16, 2022 8:56 pm    Post subject: Reply with quote

psycho wrote:
Sounds like it could be aggressive power saving... maybe a WiFi module option or something that's set to try insanely hard to save your laptop's battery?


Could be. This is a fairly new installation (3 weeks). Where would I go and look for such options? The kernel? Somewhere else?

Quote:
As a test and possible workaround, you could have a script in the background pinging a remote server once a minute, or something like that, to see if this activity keeps your WiFi alive.


ok, I'm `ping -D -i 60 8.8.8.8`. Will report back in a day or two and see if this changes things.
Back to top
View user's profile Send private message
pieterbreed
n00b
n00b


Joined: 15 Dec 2022
Posts: 8

PostPosted: Sat Dec 17, 2022 11:41 am    Post subject: Reply with quote

pieterbreed wrote:
ok, I'm `ping -D -i 60 8.8.8.8`. Will report back in a day or two and see if this changes things.


Results are in.
Code:

[1671224002.935680] 64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=20.5 ms
...
[1671256795.372678] 64 bytes from 8.8.8.8: icmp_seq=547 ttl=116 time=23.9 ms


It ran
from Friday, December 16, 2022 8:53:22.935 PM
to Saturday, December 17, 2022 5:59:55.372 AM

when it got stuck.

My country suffers intermittent electricity load-shedding and I think the laptop either went to battery power or came onto mains power at that moment at 6am.

Where would I go looking for scripts that react to power events?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3134

PostPosted: Sat Dec 17, 2022 12:04 pm    Post subject: Reply with quote

If you want to track events related to the power supply it in the future (and possibly respond in some way), acpid is one option to do that.
Back to top
View user's profile Send private message
pieterbreed
n00b
n00b


Joined: 15 Dec 2022
Posts: 8

PostPosted: Mon Dec 19, 2022 7:58 am    Post subject: Reply with quote

szatox wrote:
If you want to track events related to the power supply it in the future (and possibly respond in some way), acpid is one option to do that.


I don't have acpid installed, so whatever is messing up my connections is not that.
Back to top
View user's profile Send private message
pieterbreed
n00b
n00b


Joined: 15 Dec 2022
Posts: 8

PostPosted: Mon Dec 19, 2022 1:04 pm    Post subject: Reply with quote

What is funny is that TCP connections that exist keep on working, so the wifi connection is not completely severed.

Sometimes when I use zoom for example, the call will continue and finish without interruption, but if I try to use a browser to access something in the background it will not work before I reconnect to the wifi AP.

The browser get stuck at Looking up <hostename>... so it's possible that DNS lookup is somehow the function (or one of the functions) of the internet connection that gets disrupted.
Back to top
View user's profile Send private message
pieterbreed
n00b
n00b


Joined: 15 Dec 2022
Posts: 8

PostPosted: Mon Dec 19, 2022 3:19 pm    Post subject: Reply with quote

I have the output of dmesg and journalctl -f here over the portion where it failed:

dmesg

Code:

[ 9185.088395] wlp4s0: deauthenticating from 88:f0:31:77:ef:bf by local choice (Reason: 3=DEAUTH_LEAVING)
[ 9192.257194] wlp4s0: authenticate with 88:f0:31:77:ef:bf
[ 9192.260949] wlp4s0: send auth to 88:f0:31:77:ef:bf (try 1/3)
[ 9192.288450] wlp4s0: authenticated
[ 9192.292676] wlp4s0: associate with 88:f0:31:77:ef:bf (try 1/3)
[ 9192.295166] wlp4s0: RX AssocResp from 88:f0:31:77:ef:bf (capab=0x111 status=0 aid=11)
[ 9192.303583] wlp4s0: associated
[ 9192.370149] wlp4s0: Limiting TX power to 14 dBm as advertised by 88:f0:31:77:ef:bf
[ 9192.370205] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready



journalctl -f

Code:

Dec 19 16:48:51 tiberius wpa_supplicant[1347]: wlp4s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-64 noise=9999 txrate=390000
Dec 19 16:49:37 tiberius wpa_supplicant[1347]: wlp4s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-63 noise=9999 txrate=390000
Dec 19 16:50:16 tiberius wpa_supplicant[1347]: wlp4s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-69 noise=9999 txrate=520000
Dec 19 16:51:23 tiberius wpa_supplicant[1347]: wlp4s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-67 noise=9999 txrate=526600
Dec 19 16:52:12 tiberius sudo[51754]:   pieter : TTY=pts/1 ; PWD=/home/pieter/Source/github.com/nette-io/nette ; USER=root ; COMMAND=/bin/journalctl -f
Dec 19 16:52:12 tiberius sudo[51754]: pam_unix(sudo:session): session opened for user root(uid=0) by pieter(uid=1000)

worked until this point
stopped working below

Dec 19 16:54:59 tiberius wpa_supplicant[1347]: wlp4s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-63 noise=9999 txrate=433300
Dec 19 16:58:20 tiberius systemd-resolved[1241]: [] DNSSEC validation failed for question app.slack.com IN DS: no-signature
Dec 19 16:58:20 tiberius systemd-resolved[1241]: [] DNSSEC validation failed for question app.slack.com IN SOA: no-signature
Dec 19 16:58:20 tiberius systemd-resolved[1241]: [] DNSSEC validation failed for question app.slack.com IN AAAA: no-signature
Dec 19 16:59:14 tiberius NetworkManager[1279]: <info>  [1671461954.5398] dhcp4 (wlp4s0): state changed new lease, address=10.4.3.109
Dec 19 17:00:47 tiberius wpa_supplicant[1347]: wlp4s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-62 noise=9999 txrate=585100
Dec 19 17:01:01 tiberius CROND[53441]: (root) CMD (run-parts /etc/cron.hourly)
Dec 19 17:01:01 tiberius CROND[53440]: (root) CMDEND (run-parts /etc/cron.hourly)
Dec 19 17:01:12 tiberius wpa_supplicant[1347]: wlp4s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-65 noise=9999 txrate=585100
Dec 19 17:01:53 tiberius systemd-resolved[1241]: Failed to send hostname reply: Transport endpoint is not connected
Dec 19 17:01:53 tiberius systemd-resolved[1241]: Failed to send hostname reply: Transport endpoint is not connected
Dec 19 17:02:04 tiberius systemd-resolved[1241]: Failed to send hostname reply: Transport endpoint is not connected

It seems to me like something is happening, maybe a lease update or something on the wifi. journalctl shows that the DNS stops working like I said higher up.

Not sure where to go from here?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Mon Dec 19, 2022 3:19 pm    Post subject: Reply with quote

There is several informations needed related to this problem. Which wifi card do you use with which module? What are the messages related in dmesg?
Code:
dmesg|grep -i -e dns -e firm -e wire -e wifi -e wpa -e wlp4s0


Do this card work normally with other operating systems?

Have you try to disable the powersaving on the wifi
Code:
iwconfig wlp4s0 power off

With which wifi and dns clients do you connect? You can try alternatives for tests.
_________________
Paul
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3134

PostPosted: Mon Dec 19, 2022 4:50 pm    Post subject: Reply with quote

Quote:

Quote:
If you want to track events related to the power supply it in the future (and possibly respond in some way), acpid is one option to do that.

I don't have acpid installed, so whatever is messing up my connections is not that.
Not what I meant, try again.


Quote:
The browser get stuck at Looking up <hostename>... so it's possible that DNS lookup is somehow the function (or one of the functions) of the internet connection that gets disrupted.
Well, can you ping the internet with just IP addresses?
DNS problems happen on flaky links which are too happy to "not guarantee" delivery of UDP packets, or when SOHO router randomly decides not to respond to some calls...
This is when dnsmasq comes in handy.

Quote:
If I leave the computer idling for a while (couple of 10s of minutes reliably triggers this) then the wifi sort-of stops working. The link shows as connected, and the OS thinks it is connected, but no connection attempts succeed or timeout. Everything making or using connections to the net just hangs on waiting for a timeout. If I then manually disconnect and reconnect everything proceeds for a while.
And what happens if you just leave it it wait?
How reliable the result is? Like in:
Does it come back after certain time (and restarting the link takes time, so it will work again by the time it's done), or is it the action of reconnecting that fixes the immediate issue?
What service do you use for managing connections?


Quote:
journalctl shows that the DNS stops working
Uhm... Systemd-resolved, er?
I've had it create a lot of problems. Kill it with fire and see if the problem persists.
Like in: really kill it. Stop, disable and mask the service so it won't start again even if something tries to pull it. And do it first, before trying anything else. Just make sure your resolv.conf points to a valid nameserver. 127.0.0.1 is not a valid nameserver (unless you do actually know your system is an exception)
Back to top
View user's profile Send private message
pieterbreed
n00b
n00b


Joined: 15 Dec 2022
Posts: 8

PostPosted: Wed Dec 21, 2022 6:43 am    Post subject: Reply with quote

Logicien wrote:
What are the messages related in dmesg?


Code:
dmesg|grep -i -e dns -e firm -e wire -e wifi -e wpa -e wlp4s0

[    0.097290] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    0.360031] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.370649] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-7f] only partially covers this bridge
[    8.648896] Loading firmware: regulatory.db
[    8.651376] Loading firmware: regulatory.db.p7s
[    8.753782] Intel(R) Wireless WiFi driver for Linux
[    8.754023] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002)
[    8.777543] Loading firmware: iwlwifi-cc-a0-66.ucode
[    8.838550] iwlwifi 0000:04:00.0: api flags index 2 larger than supported by driver
[    8.867170] iwlwifi 0000:04:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37
[    8.903222] iwlwifi 0000:04:00.0: loaded firmware version 66.f1c864e0.0 cc-a0-66.ucode op_mode iwlmvm
[    9.021261] Loading firmware: iwl-debug-yoyo.bin
[    9.448714] iwlwifi 0000:04:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340
[    9.621965] iwlwifi 0000:04:00.0: Detected RF HR B3, rfid=0x10a100
[    9.688828] iwlwifi 0000:04:00.0: base HW address: e0:d4:64:7f:c3:0d
[    9.943842] iwlwifi 0000:04:00.0 wlp4s0: renamed from wlan0
[   10.663970] Loading firmware: amdgpu/green_sardine_sdma.bin
[   10.665229] Loading firmware: amdgpu/green_sardine_asd.bin
[   10.665751] Loading firmware: amdgpu/green_sardine_ta.bin
[   10.666121] Loading firmware: amdgpu/green_sardine_pfp.bin
[   10.666383] Loading firmware: amdgpu/green_sardine_me.bin
[   10.666774] Loading firmware: amdgpu/green_sardine_ce.bin
[   10.666959] Loading firmware: amdgpu/green_sardine_rlc.bin
[   10.667083] Loading firmware: amdgpu/green_sardine_mec.bin
[   10.668598] Loading firmware: amdgpu/green_sardine_dmcub.bin
[   10.669006] [drm] Loading DMUB firmware via PSP: version=0x01010024
[   10.669021] Loading firmware: amdgpu/green_sardine_vcn.bin
[   10.669619] [drm] Found VCN firmware Version ENC: 1.19 DEC: 5 VEP: 0 Revision: 0
[   10.669649] amdgpu 0000:06:00.0: amdgpu: Will use PSP to load VCN firmware
[   12.666462] Loading firmware: rtl_nic/rtl8125b-2.fw
[   17.213056] wlp4s0: authenticate with 88:f0:31:77:ef:bf
[   17.221878] wlp4s0: send auth to 88:f0:31:77:ef:bf (try 1/3)
[   17.249844] wlp4s0: authenticated
[   17.252590] wlp4s0: associate with 88:f0:31:77:ef:bf (try 1/3)
[   17.256872] wlp4s0: RX AssocResp from 88:f0:31:77:ef:bf (capab=0x111 status=0 aid=11)
[   17.267189] wlp4s0: associated
[   17.313909] wlp4s0: Limiting TX power to 14 dBm as advertised by 88:f0:31:77:ef:bf
[   17.336936] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
[ 7413.453550] wlp4s0: deauthenticating from 88:f0:31:77:ef:bf by local choice (Reason: 3=DEAUTH_LEAVING)
[ 7418.818976] wlp4s0: authenticate with 88:f0:31:77:ef:bf
[ 7418.822566] wlp4s0: send auth to 88:f0:31:77:ef:bf (try 1/3)
[ 7418.850855] wlp4s0: authenticated
[ 7418.851445] wlp4s0: associate with 88:f0:31:77:ef:bf (try 1/3)
[ 7418.854242] wlp4s0: RX AssocResp from 88:f0:31:77:ef:bf (capab=0x111 status=0 aid=11)
[ 7418.864545] wlp4s0: associated
[ 7418.864706] wlp4s0: Limiting TX power to 14 dBm as advertised by 88:f0:31:77:ef:bf
[ 7418.945407] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
[15362.096920] wlp4s0: deauthenticating from 88:f0:31:77:ef:bf by local choice (Reason: 3=DEAUTH_LEAVING)
[15365.068880] wlp4s0: authenticate with 88:f0:31:77:ef:b0
[15365.074704] wlp4s0: send auth to 88:f0:31:77:ef:b0 (try 1/3)
[15365.101275] wlp4s0: authenticated
[15365.104902] wlp4s0: associate with 88:f0:31:77:ef:b0 (try 1/3)
[15365.109505] wlp4s0: RX AssocResp from 88:f0:31:77:ef:b0 (capab=0x431 status=0 aid=150)
[15365.117847] wlp4s0: associated
[15365.195823] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
[15365.220950] wlp4s0: Limiting TX power to 10 dBm as advertised by 88:f0:31:77:ef:b0
[22616.791770] wlp4s0: deauthenticating from 88:f0:31:77:ef:b0 by local choice (Reason: 3=DEAUTH_LEAVING)
[22618.748528] wlp4s0: authenticate with 88:f0:31:77:ef:b0
[22618.752791] wlp4s0: send auth to 88:f0:31:77:ef:b0 (try 1/3)
[22618.790867] wlp4s0: authenticated
[22618.791460] wlp4s0: associate with 88:f0:31:77:ef:b0 (try 1/3)
[22618.797572] wlp4s0: RX AssocResp from 88:f0:31:77:ef:b0 (capab=0x431 status=0 aid=150)
[22618.806165] wlp4s0: associated
[22618.853123] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
[22618.893943] wlp4s0: Limiting TX power to 10 dBm as advertised by 88:f0:31:77:ef:b0
[35964.570379] wlp4s0: Connection to AP 88:f0:31:77:ef:b0 lost
[35967.052608] wlp4s0: authenticate with 88:f0:31:77:ef:bf
[35967.055943] wlp4s0: send auth to 88:f0:31:77:ef:bf (try 1/3)
[35967.085109] wlp4s0: authenticated
[35967.086588] wlp4s0: associate with 88:f0:31:77:ef:bf (try 1/3)
[35967.089691] wlp4s0: RX AssocResp from 88:f0:31:77:ef:bf (capab=0x111 status=0 aid=9)
[35967.097113] wlp4s0: associated
[35967.167773] wlp4s0: Limiting TX power to 14 dBm as advertised by 88:f0:31:77:ef:bf
[37377.068423] wlp4s0: deauthenticating from 88:f0:31:77:ef:bf by local choice (Reason: 3=DEAUTH_LEAVING)
[37380.406511] wlp4s0: authenticate with 88:f0:31:77:ef:b0
[37380.410954] wlp4s0: send auth to 88:f0:31:77:ef:b0 (try 1/3)
[37380.441120] wlp4s0: authenticated
[37380.446130] wlp4s0: associate with 88:f0:31:77:ef:b0 (try 1/3)
[37380.448569] wlp4s0: RX AssocResp from 88:f0:31:77:ef:b0 (capab=0x431 status=0 aid=196)
[37380.465917] wlp4s0: associated
[37380.465986] wlp4s0: Limiting TX power to 10 dBm as advertised by 88:f0:31:77:ef:b0
[37380.533893] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
[86210.216952] wlp4s0: deauthenticating from 88:f0:31:77:ef:b0 by local choice (Reason: 3=DEAUTH_LEAVING)
[86216.509214] wlp4s0: authenticate with 88:f0:31:77:ef:b0
[86216.511598] wlp4s0: send auth to 88:f0:31:77:ef:b0 (try 1/3)
[86216.544654] wlp4s0: authenticated
[86216.545037] wlp4s0: associate with 88:f0:31:77:ef:b0 (try 1/3)
[86216.547590] wlp4s0: RX AssocResp from 88:f0:31:77:ef:b0 (capab=0x431 status=0 aid=196)
[86216.558067] wlp4s0: associated
[86216.619035] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
[86216.650073] wlp4s0: Limiting TX power to 10 dBm as advertised by 88:f0:31:77:ef:b0


Shows messages since boot with a few cycles of disconnect/connect.


Quote:
Do this card work normally with other operating systems?


Yes. Previous OS on this machine was ubuntu that sucked for many reasons, but the wifi worked correctly.

Quote:
Have you try to disable the powersaving on the wifi


I tried that, but it made no difference.

Quote:
With which wifi and dns clients do you connect? You can try alternatives for tests.


Unless I misunderstand your question, I use the KDE wifi applet to connect and disconnect.
Back to top
View user's profile Send private message
pieterbreed
n00b
n00b


Joined: 15 Dec 2022
Posts: 8

PostPosted: Wed Dec 21, 2022 6:50 am    Post subject: Reply with quote

Quote:
Well, can you ping the internet with just IP addresses?


No :-( I had a long running ping command that I pasted the output of higher up. The ping just stops working, like it hangs. No error messages, but no more pings coming through either

Quote:
How reliable the result is? Like in: Does it come back after certain time (and restarting the link takes time, so it will work again by the time it's done), or is it the action of reconnecting that fixes the immediate issue?


It happens exactly the same way every time. The link does not come back by itself. Once it stops working only disconnecting and reconnecting solves the issue.


Quote:
Uhm... Systemd-resolved, er?
I've had it create a lot of problems. Kill it with fire and see if the problem persists.
Like in: really kill it. Stop, disable and mask the service so it won't start again even if something tries to pull it. And do it first, before trying anything else. Just make sure your resolv.conf points to a valid nameserver. 127.0.0.1 is not a valid nameserver (unless you do actually know your system is an exception)


OK - I'm trying this right now...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum