Skip to main content

Disabling auto-sleep due to gdm on Debian 10

· 2 min read
Asumu Takikawa

Sometime last year, I got a new headless workstation for building software and installed Debian 10 on it. Almost everything went well, except that there was an extremely annoying issue that would cause the machine to auto-suspend every 20 or so minutes (which is pretty bad for a headless build machine!).

A web search revealed that other people had been having the same issue, but most people were advocating for turning suspend/hibernate off entirely to avoid this problem. I did this for a while but it seemed like a blunt solution.

Recently, I found out from this Debian bug report that the problem is likely caused by gdm3's power settings policies. The policy seems to trigger even if you are not actually logged into a graphical session.

The solution is also in the bug report. Since it wasn't easy to find this solution via web search, I'm blogging it in the hope that it makes it a little easier to find. First, you need to open /etc/gdm3/greeter.dconf-defaults in an editor and then add the following:

# - Do not autosuspend
[org/gnome/settings-daemon/plugins/power]
sleep-inactive-ac-type='blank'

Then run dpkg-reconfigure gdm3, and then restart gdm or reboot the machine.

You could alternatively just uninstall gdm and use another login manager.