Wifi speed gets cut after wake from lid close

I reinstalled again and my wifi is at full speed, but now the problem is when I shut the lid the speed gets cut by 1/3. I go from 600mbs to 200mbs.

When I had Zorin 16 on this same laptop I could close the cover without any speed reduction.

I tried the following but it doesn't help:

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
[connection]
wifi.powersave = 2

sudo nano /etc/systemd/logind.conf
HandleLidSwitch=ignore

sudo nano /etc/UPower/UPower.conf
IgnoreLid=true

I also installed Gnome Extras and disabled suspend.

This can be closed. This worked for me:

Get the wifi adapter name:
iwconfig
In my case it was: wlp2s0

Now edit or create this file:
sudo /etc/pm/power.d/wireless

PUT THIS IN THE FILE:

#!/bin/sh

/sbin/iwconfig wlan0 power off
1 Like