Saturday, January 7, 2023

Disabling sleep on Ubuntu 22.04

I just upgraded one of my Linux servers to Ubuntu 22.04 LTS, from 21.10, which was already at end of life.  The upgrade process went fairly well, and since I needed to reboot the computer (and there were already interruptions of the VMs running on this machine), I decided to start upgrading the software on some of these machines.

While I was going through this process, everything became unresponsive, both the host server and the VMs, and these connections were closed.  I walked to the Linux host server, and I noticed that the machine was asleep.  Once I pushed the power button, the machine woke back up, and I was able to connect again.

I wanted to find a way that I could prevent the server from going to sleep.  The Ubuntu sleep service allows this behavior to be controlled.

I used the following commands to disable sleep on the Ubuntu server:

systemctl mask
Once I ran that command, I verified that sleeping would be "masked" with: 

systemctl status

The output indicates that sleeping is masked:

No comments:

Post a Comment

Unlocking Raspberry Pi Potential: Navigating Network Booting Challenges for Enhanced Performance and Reliability

I've set up several Raspberry Pis around our house for various projects, but one recurring challenge is the potential for SD card failur...