Tip: Lower WiFi latency by disabling WiFi power management

Just a tip to lower your latency over WiFi connections:

Create a new file at:
/etc/NetworkManager/conf.d/wifi-powersave-off.conf

with the contents:

[connection]
wifi.powersave = 2

Then restart (not reload) NetworkManager
systemctl restart NetworkManager

Before higher latency, with spikes up to hundreds of ms possible

PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=3.52 ms
64 bytes from 192.168.100.1: icmp_seq=2 ttl=64 time=2.42 ms
64 bytes from 192.168.100.1: icmp_seq=3 ttl=64 time=2.36 ms
64 bytes from 192.168.100.1: icmp_seq=4 ttl=64 time=3.19 ms
64 bytes from 192.168.100.1: icmp_seq=5 ttl=64 time=2.49 ms

After lower latency

PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=1.37 ms
64 bytes from 192.168.100.1: icmp_seq=2 ttl=64 time=1.05 ms
64 bytes from 192.168.100.1: icmp_seq=3 ttl=64 time=1.06 ms
64 bytes from 192.168.100.1: icmp_seq=4 ttl=64 time=1.80 ms
64 bytes from 192.168.100.1: icmp_seq=5 ttl=64 time=1.03 ms
64 bytes from 192.168.100.1: icmp_seq=6 ttl=64 time=1.24 ms

Source:

I had some oddly specific issue with ssh. I couldn’t ssh into a local machine because it would just freeze while I was watching a discord stream (I know, oddly specific). This solved my issue. I’m saying this just in case someone is experiencing something similar. Thanks a lot