1

I have a debian 12 installation in my ASUS ROG G15 laptop. I wanted to configure it so that it doesn't suspend when the laptop lid is closed. The method I tried the first was this which worked. I got what I wanted, I was able to work with the laptop lid closed.

But short after, I noticed that whenever I have the lid closed I loose my network connectivity. The interface doesn't get disconnected totally. I still can see that it is connected to my wireless network. But it's just not giving me network access. Sometimes it takes forever to load google even. I can say that internet access is not totally interrupted because, I can send a few pings to google with very high latency.

64 bytes from 102.170.233.64.in-addr.arpa (64.233.170.102): icmp_seq=6 ttl=54 time=2071 ms

In iwconfig I saw the the interface had Power Management turned on.

wlo1      IEEE 802.11  ESSID:"********"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 
          Bit Rate=39 Mb/s   Tx-Power=3 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=38/70  Signal level=-72 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:56  Invalid misc:19   Missed beacon:0

I even permanently turned it off using this. After a reboot, I still had the same problem.

I tried all the answers from the previously mentioned question except for the gnome specific answers which won't work for me since I'm using i3.

1 Answers1

0

Answer to this one was pretty obvious. The reason why I had this issue was because of how the WiFi antenna is positioned after I closed the lid of the laptop. Most of the laptops have the antenna in the lid, so when I close it the signal strength reduces drastically, that's the reason for the long latency.

So for anyone who's looking to set this up, here is a step by step process of everything you need to do.

  1. First, make sure you have edited the following lines in /etc/systemd/logind.conf
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore

This will disable the suspension of the system when the lid is closed and instead would do nothing. This should be all you need, but if you have any WiFi issues, (not talking about the low signal strength due to the mentioned reason above) you may want to proceed to the next step.

  1. Use iwconfig and see if your interface's Power Management is set to on. If so, you may want to set it to off.
sudo iwconfig [interface] power off

However, this is not permanent and will be reset to the default after a reboot. So to make this permanent, edit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and locate the [connection] section and change it as follows.

[connection]
wifi.powersave = 2

In my case, I didn't have such a file, so I created a new file and just added this and nothing else. This will make those changes permanent.

  1. Reboot the laptop and most importantly, make sure you keep the laptop in a vertical manner (this may or may not be a requirement for you depending on how your laptop is designed and where the WiFi antenna is placed) once you close the lid so that it is able to have a good signal strength. I'd recommend getting a vertical stand, but you can simply lean the laptop to a wall.