Fixing Sleep/Wake Up
Hello everyone, As you might know from my previous post, I was able to purchase a new Lenovo Thinkpad T430. I decided that Windows 8 was too dirty and evil to leave it in installed in this gorgeous computer, so I decided to install Arch Linux on it. I went with Antergos because it is so much more easy and fast to install than vanilla Arch Linux. This version of Antergos ran absolutely smooth until I decided to test sleep mode.
When I placed the machine on sleep mode, when I tried to wake it up, the unlock screen will pop up but then it will go completely black and it will not let me do anything with the computer, not even drop into a shell to troubleshoot the issue. This issue forced me to force shut down the computer every time I woke it up from sleep which could damage my system, as well as the data in it. So after the third time that this happened to me, I set out to find the solution for this annoying issue.
What I found was that the issue was caused by the default LightDM log in manager implementation of Antergos. They tend to force you to use it even if you are using a desktop environment that requires a different login manager such as Gnome (With GDM) which I have never liked. So, the easiest way to get rid of LightDM is by replacing it with another login manager. The one that I have found which seems to work the best for me has been SDDM. SDDM is the login manager used by default on KDE currently. It plays nicely with other desktop environment and logs in extremely fast. In order to install SDDM, we run in our terminal the command:
$ sudo pacman -S sddm
Now that SDDM is installed, we need to replace LightDM with it. So first, we need to disable LightDM by running the command:
$ sudo systemctl disable lightdm.service
Finally, we can enable SDDM by running the command:
$ sudo systemctl enable sddm.service
Now, if you would like to test out SDDM to see if it works, you can restart your computer and see if SDDM is your login manager when your machine boots up. If it does, then you are set. You will also want to make sure that sleep/ wake up works after you log in into your session.
Theming SDDM
I know I know, by default SDDM looks hideous. Lucky for us, there are some themes out there that we can install to make our SDDM look slightly better. I really liked the themes in the archlinux-themes-sddm package available in the AUR, so I am going to use those as an example. You can download the theme by using the tool Yaourt (can be installed by default when installing Antergos) by running the command:
$ yaourt -S archlinux-themes-sddm
After the package has been installed, you can see your installed themes by running the command
$ ls /usr/share/sddm/themes/
If you would like any of the themes in this folder, you can use the command
$ sddm-greeter –theme /usr/share/sddm/themes/your_theme_here/
where “your_theme_here” is the theme that you would like to test out. For instance, if you would like to test the “archlinux-simplyblack” theme included in the previously installed package, we can run the command:
$ sddm-greeter –theme /usr/share/sddm/themes/archlinux-simplyblack/
To leave the theme testing window, we can ALT+Tab to get to ger back to our terminal and then CTRL + C to close the command running in our terminal. Now that you have tested that your theme works and you would like to set it as the default login theme, you would need to change the configuration file of SDDM to tell it which theme you would like to use. To do this we need to access said configuration file by running the command
$ sudo nano /etc/sddm.conf
In this configuration file, you will see a section called “[Theme]”, after “Current =” type the name of the file of your theme located in /usr/share/sddm/themes.
For this example, I will set mines to be the theme “archlinux-simplyblack”, remember to write the name as it is written in the file name of the theme.
There are other things that you can play with and change in this configuration file, please refer to the Arch Wiki SDDM entry, as well as their Github Wiki page for more information.
Anyways, that is all I have for today. If you have any questions regarding this tutorial, please leave them in the comments below. If this post helped you in any way, share it with people that might find it useful.