Andy Crouch - Code, Technology & Obfuscation ...

Setting Up GDM, Gnome Power Settings & Locking Suspend In Antergos

Power Switches

Photo: Unsplash

The new year lead me to finally rebuilding my Thinkpad and swapping in a new 240gb SSD. This means a shiny new install of Antergos which in turn means a short tweaking session to make it right.

Antergos, for those that are unaware, is a version of Arch that comes with a useful installer. While Arch Linux is not hard to install it can be a distraction from life. Their documentation is superb and it is easy to get lost in pages and pages of packages and options. I have seen some articles recently which suggest Antergos is a great beginner Linux. I would argue that it is better than Fedora, Ubuntu and co but that is probably another post in itself.

The main issue I had while tweaking Antergos this time was to do with power settings and suspending on lid close. I also decided to switch back to the GDM login manager as I have never really liked LightDM.

Installing GDM and configuring it is very easy. In a shell run the following command:

$ sudo pacman -S gdm

This will install GDM and running:

$ sudo systemctl disable lightdm && sudo systemctl enable gdm

will configure systemd to use it as the default login manager.

At this point, I rebooted to ensure it worked and all was as expected.

The next step was to get suspend working. By default, this time, nothing happened when I closed the Thinkpad’s lid. A little bit of Googling later and I found that first off I needed to install Gnome Power Manager:

$ sudo pacman -S gnome-power-manager               

Then I had to alter the /etc/systemd/logind.conf configuration file. This file is used by systemd to define the various settings for power related events. In my file, all settings were commented out. I uncommented the following entries and updated their setting values. One reboot later and suspend was working.

HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend

The final step was to enable the Screen Lock setting. Doing so ensures that when you suspend and power back on that GDM protects you by forcing you to log back in. This can be found under the Privacy setting section in Gnome Settings.

Gnome Power Settings

Unusually, figuring this out took a little reading and many sources. Hence why I am documenting it here, in case it is useful for anyone else.

If you have any great tweaks or Antergos/Arch related tips then please message me via twitter or email.