Results 1 to 3 of 3

Thread: Hibernate when closing laptop cover?

  1. #1

    Default Hibernate when closing laptop cover?

    I installed Leap 15.1, gnome desktop, on my laptop over the weekend. I have gone into the power options, and there does not seem to be an entry to choose what to do when I close the laptop cover. There is an entry for what happens when I press the power button, though.

    When I do close the cover, the laptop sleeps. What I would like the laptop to do is to hibernate.

    Is there a way to change this behavior so that the laptop will hibernate when I close the cover?


  2. #2
    Join Date
    Aug 2010
    Chicago suburbs
    Blog Entries

    Default Re: Hibernate when closing laptop cover?

    Checking on my laptop, I see such an option for KDE. But I do not see one for Gnome. Perhaps there are settings for this with dconf-editor (I didn't check).
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3
    Join Date
    Jun 2008
    Auckland, NZ
    Blog Entries

    Default Re: Hibernate when closing laptop cover?

    Check the '#HandleLidSwitch=' configuration /etc/systemd/logind.conf, and adjust to suit your needs. It may need to be uncommented first.

    For example
    For more info, read 'man logind.conf', and as explained below be aware that graphical desktop environments may employ 'low-level inhibitor locks' that will override the behaviour configured in the /etc/systemd/lognd.conf file.

    HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=, HandleLidSwitch=, HandleLidSwitchDocked=
    Controls how logind shall handle the system power and sleep keys and the lid switch to trigger actions such as system
    power-off or suspend. Can be one of "ignore", "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate",
    "hybrid-sleep", and "lock". If "ignore", logind will never handle these keys. If "lock", all running sessions will be
    screen-locked; otherwise, the specified action will be taken in the respective event. Only input devices with the
    "power-switch" udev tag will be watched for key/lid switch events. HandlePowerKey= defaults to "poweroff".
    HandleSuspendKey= and HandleLidSwitch= default to "suspend". HandleLidSwitchDocked= defaults to "ignore".
    HandleHibernateKey= defaults to "hibernate". If the system is inserted in a docking station, or if more than one display is
    connected, the action specified by HandleLidSwitchDocked= occurs; otherwise the HandleLidSwitch= action occurs.

    A different application may disable logind's handling of system power and sleep keys and the lid switch by taking a
    low-level inhibitor lock ("handle-power-key", "handle-suspend-key", "handle-hibernate-key", "handle-lid-switch"). This is
    most commonly used by graphical desktop environments to take over suspend and hibernation handling, and to use their own
    configuration mechanisms. If a low-level inhibitor lock is taken, logind will not take any action when that key or switch
    is triggered and the Handle*= settings are irrelevant.
    openSUSE Leap 15.1; KDE Plasma 5

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts