Frequent lag spikes from network-manager-applet

I notice that anytime I click on the NetworkManager applet in my waybar (using Manjaro-Hyprland) I’ll get some lag spikes.

ping google.com| grep --color=always -E -e "^" -e "[[:digit:]]{3}\sms"
PING google.com (64.233.177.113) 56(84) bytes of data.
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=1 ttl=108 time=21.8 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=2 ttl=108 time=22.2 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=3 ttl=108 time=22.8 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=4 ttl=108 time=51.8 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=5 ttl=108 time=71.6 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=6 ttl=108 time=22.7 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=7 ttl=108 time=21.5 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=8 ttl=108 time=199 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=9 ttl=108 time=21.7 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=10 ttl=108 time=21.5 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=11 ttl=108 time=21.6 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=12 ttl=108 time=22.6 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=13 ttl=108 time=21.6 ms
64 bytes from yx-in-f113.1e100.net (64.233.177.113): icmp_seq=14 ttl=108 time=21.5 ms

see the jump to 199ms? that’s right after I click on the applet.

why would this be happening and how can I get it to stop? I stream games from my home PC to my laptop and it causes frame drops and audio drops.

is there an alternate applet I can use on the waybar? is this a bug with the applet itself or could it been “deeper” in the system?

Thank you for your time and assistance!

I tried some different wifi cards as well, intel AX201 and AX211, but neither were seen by the computer at all. I can confirm I have the drivers installed from linux-firmware. I am also going to try a MT7922 which should work better, though others say the performance is worse compared to the intel chips.

Is there an actual problem?
Could be a temporary glitch in name resolution.

You know the NetworkManager can be configured to use dnsmasq ?
… to cache all the queries - speeding things up considerably …

Yes, I’m dropping frames and audio when streaming to my home PC. doesn’t happen on ethernet.

I’ll look into dnsmasq

update: looks like dnsmasq was already installed. not sure how I can utilize it further though.

NetworkManager - ArchWiki

section 4.7.1.1

link goes to there directly

read all of it, though

Make sure dnsmasq has been installed. Then set main.dns=dnsmasq with a configuration file in /etc/NetworkManager/conf.d/:

/etc/NetworkManager/conf.d/dns.conf

[main] dns=dnsmasq

Look at the actual link - not just the copy/pasted snippet here.

Not at all sure that was the reason or the cure for what you described your issue was, though.

The Arch wiki is your most valuable resource for any kind of problem.
Manjaro is only slightly different - most of it applies.

I tried that, but no luck. pings would still spike to 155ms if i hover over or click on the wifi icon.

edit: I have read the networkmanager arch page top to bottom multiple times and searched all over the net for my issue. nothing has worked. I feel that something is up with the waybar icon causing the spikes, but I’m not 100% sure. I ordered another Mediatek wifi card to see if there’s a HW issue, but I really don’t think that’s it.

This could be a clue? But does it still happen when you don’t? … Just to be sure.

What does that mean?

Reading the page will not solve anything.

Implementing the suggested adaptation might.

The first query might take some time - subsequent queries will be faster, as they are cached locally
that is the idea behind it
dns queries served from the local cache instead of actually doing the query of the dns

You could also opt to change your DNS provider to something different from the one your ISP provides you with.

It does happen when I have the application (Moonlight) open in fullscreen, but not constantly.

I believe ultimately the issue might be the waybar icon, and my next step is to put in a ticket on its github page, but I’m exhausting all my resources so I’m asking here as well.

1 Like

I tried the config as you suggested in your post. I read the rest of the page but it was irrelevant to my issue. I don’t believe it’s a DNS issue, but a wifi searching issue caused by “activation” of the wifi icon in my waybar.

as posted above this might be a waybar issue, but i’m exhausting all my options at this point.

well - if you believe it …