I've been dealing with a frustrating issue on my laptop where my internet connections drop whenever I close the screen. I mainly use sshfs to access my home server as a file server, and it's a real hassle when those connections cut off. Is there a way to prevent this from happening? If not, can I set up a script that runs when I open my screen to automatically reconnect my sshfs sessions? I'm using Arch Linux with Hyprland on an older HP Omen laptop.
3 Answers
If you're using your laptop while it's closed, that could lead to overheating since laptops need airflow through the keyboard. It's worth checking the temperatures. But if you want to keep working and just want to resume when you open the lid, make sure you've set your laptop to suspend in the settings so it helps manage that heat.
It sounds like your laptop could be going into sleep mode when you close the lid, which would cut off your sshfs connection. You can check the configuration by looking at `/etc/systemd/logind.conf`. Make sure you set `HandleLidSwitch=ignore` and that the line isn't commented out. This way, your laptop won't suspend and your connections should stay active.
You might want to check if disabling WiFi power saving helps! You can create a file at `/etc/NetworkManager/conf.d/powersave.conf` and add this:
```
[connection]
wifi.powersave=2
```
After that, just reboot your laptop and see if the issue persists.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures