Suchen

Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

13.10. Preventing the Computer from Suspending when Closing the Lid

download PDF
When closing the lid of your laptop, your computer suspends in order to save power. You can prevent the computer from suspending when closing the lid by changing the setting for that behavior.

Warning

Some laptops can overheat if they are left running with the lid closed, especially if they are in a confined place like a backpack. Therefore, consider if changing the default setting (suspend) is the best option in your case.

Procedure 13.10. Configuring the lid switch

  1. Open the /etc/systemd/logind.conf file for editing.
  2. Find the HandleLidSwitch=suspend line in the file. If it is quoted out with the # character at the start, unquote it.
    If the line is not present in the file, add it.
  3. Replace the default suspend parameter with
    • lock for the screen to lock;
    • ignore for nothing to happen;
    • poweroff for the computer to switch off.
    For example:
    [Login]
    HandleLidSwitch=lock
  4. Save your changes and close the editor.
  5. Run the following command so that your changes preserve the next restart of the system:
    # systemctl restart systemd-logind.service

    Warning

    Keep in mind that restarting the service forcibly interrupts any currently running GNOME session of any desktop user who is logged in. This can result in users losing unsaved data.
For more information on the /etc/systemd/logind.conf file, see the logind.conf(5) man page.
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.