How to disable auto-suspend in Linux
If you work in an open environment, it can even protect your computer from opportunists snooping, trying to steal sensitive data while you're away.
However, that doesn't mean the auto-suspend feature is completely useful. It is often annoying and disrupts your workflow, such as when you are trying to read a long web page or actively running an application in the background. In these situations, disabling auto-suspend will allow you to get the most out of your Linux system.
How to disable auto-suspend using the GUI
One of the easiest ways to turn off auto-suspend on your computer is to use the Settings app. You can adjust System Suspension settings in Ubuntu and similar distributions by navigating to Settings > Power . Click Automatic Suspend and toggle the two settings so your computer doesn't automatically suspend when on battery power or when plugged in.
If you're not opposed to using an app to prevent auto-suspend, you may also find that programs like Caffeine will help you with the problem. Otherwise, the process is similar for distributions other than Debian and Ubuntu such as Arch Linux - although you may need to look for distro-specific configurations.
It should be noted that you may need to check your BIOS settings if your computer continues to automatically suspend or sleep despite adjusting the settings. After you have opened the BIOS by restarting your PC, you can usually configure the sleep settings by navigating to the Power Management tab .
How to disable auto-suspend from CLI
You'll find it just as easy to disable auto-suspend using the command line interface (CLI) on Linux, as you only need to enter a few commands on most distributions.
On Debian-based distributions such as Ubuntu and Linux Mint, you can disable the suspend daemon (and verify that its status is disabled) with the following commands:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target sudo systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
If you successfully disable the daemons responsible for system hibernation and sleep, the second command will result in a result that says ' Loaded: masked (Reason: Unit [daemon].target is masked. ) Active: inactive (dead)' for each daemon listed in the command. You may need to reboot the system before the changes take effect.
The process for disabling automatic suspend in other distributions is similar, although you may need to research some forums for specific advice. In Arch Linux, adding the following lines to .xinitrc with sudo nano /etc/X11/xinit/xinitrc usually fixes the problem:
xset s off xset -dpms xset s noblank
If you have a laptop that wants to prevent suspending after closing the lid, you will also need to edit the configuration file /etc/systemd.logind.conf. Open the file with the following command, add the lines followed by the asterisk, and close and save the file to disable the system suspend caused by the laptop closed:
sudo nano /etc/systemd/logind.conf * [Login] HandleLidSwitch=ignore HandleLidSwitchDocked=ignore
Entering the above command is very important if you plan to disable auto-suspend on your laptop. On the other hand, the systemd-logind daemon will try to call sleep.target hundreds of times per second when the lid is closed. Although it can be troublesome to tweak logind.conf , it will help keep your computer's CPU from being overloaded.
It's important to note that you can easily re-enable auto-suspend. If you want to run these system services again, you can enable them on your system by opening a terminal and entering the following commands:
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
You should read it
- How to disable Auto-Brightness on iPhone
- Turn off the Win 10 update, stop Windows 10 from updating automatically
- How to turn off automatic screen rotation in Windows 10
- Turn off Auto refresh in the browser
- Is Auto-GPT worth using without GPT-4?
- Auto Click and how to automatically click when playing games
- New features of Android Auto
- The bank has to suspend operations because of the cat's actions
May be interested
- Learn about Hibernate mode in Linuxwhen it comes to source options in linux distributions, there are logout, shutdown, suspend and hibernate functions. in today's article, let's learn about hibernate mode in linux.
- How to set up or disable Linux Mint update notificationsare you annoyed with linux mint software update notifications constantly appearing on the screen? adjusting or disabling update notifications on linux mint is very simple.
- Automatic shutdown increases the screen brightness of Windows 10turning off the auto-light feature on windows 10 will help you adjust the brightness according to your preference, without having an annoying flashing light when changing from light to dark and vice versa.
- How to disable and remove LightDM on Linuxwant to experiment with other display managers? or maybe your proprietary graphics driver conflicts with lightdm.
- Auto Click and how to automatically click when playing gamesautoclick also has a mode that allows you to record multiple locations to click and automatically perform them. right now we will go to learn about how to use autoclick - auto click software to play this game.
- The bank has to suspend operations because of the cat's actionsa bank sent an email to suspend operations shortly after an intruding cat-bear family attacked the bank.
- New features of Android Autoandroid auto is a mobile application developed by google to bring features from an android device such as a smartphone to a car's compatible notification and entertainment system.
- Download GS Auto Clicker 3.1.4gs auto clicker is a useful software, allowing you to save time spent on repeated clicks. the program protects the mouse from unnecessary wear and tear.
- How to turn off automatic preview on Netflixthe automatic preview mode on netflix is really not needed and users can disable them.
- Dota Auto Chess: Synthesize assassins to be strengthened in this updatesome new updates and changing heroes for players in dota auto chess