How to disable suspend on Ubuntu
Whenever my laptop wakes from suspend, wifi stops working. I could restart
the network manager using
sudo service network-manager restart but I ran
into issues with VPN or the DNS. I decided to just disable suspend permanently.
I did a couple of differnt things to disable suspend. I am not sure which one finally worked but I am just listing them here as a note to self.
Gnome Tweak Tool
Gnome tweak tool has an option to disable suspend when lid is closed. Install and run it using the following command.
sudo apt install gnome-tweaks gnome-tweaks
suspend when laptop lid is closed option.
Ignore lid close in logind
sudo nano /etc/systemd/logind.conf
ignore. Restart systemd-logind.
sudo systemctl restart systemd-logind
Upower.conf to change the
sudo nano /etc/UPower/UPower.conf
and then restart
sudo service upower restart