Fedora 17 and 18: How to disable auto suspend when laptop lid is closed

Right after install Fedora 17 with LXDE (and update to 18), I noticed this annoying behavior when closing the laptop lid: it just stop replying pings and went to sleep, even with the AC power plugged in.

Since I didn’t have the GNOME config tools available here (and didn’t want to install tons of libs and applications just to config this), I investigated a bit and found that logind was the culprit for that. After google a bit more, I’ve found this procedure that solves the issue:

All you have to do is edit the file /etc/systemd/logind.conf (as root) and uncomment/set the variable “HandleLidSwitch” to “ignore”, as in the example below:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#Controllers=
#ResetControllers=cpu
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes

With this change, reboot your system (or just restart your display manager (thanks dmelo87)) and feel free to close your laptop lid that it will no longer go to sleep inadvertently.

Source: https://bbs.archlinux.org/viewtopic.php?id=154368

Anúncios

11 comentários sobre “Fedora 17 and 18: How to disable auto suspend when laptop lid is closed

  1. Hi there,

    I’m new in fedora and linux.
    So, I have the same problem with my notebook when closing the lid.
    I did the change in logind.conf, but the notebook still goes to suspend-mode.
    I also tried “lock” and “poweroff”. No difference.

    Is this a problem of my notebook?
    Can anybody help me?

    Thanks,

    smiler

    • Hi smiler,
      I’d try debugging systemd actions by editing /etc/systemd/system.conf and defining ‘LogLevel=debug’ (remember also to remove the ‘#’ from the beginning of the line). Then restart the system (or your display manager, as dmelo87 mentioned right below), close and open the lid and see if there is something related to suspend/hibernate on ‘journalctl’.
      Hope it helps a bit, and let us know how it goes.
      Thanks for the comment.

  2. Pingback: LXDE, Arch and shutting the laptop lid | The Fox from Switzerland

  3. Pingback: Fedora laptop setup – Dell Inspiron 1420 | h@ck4ly57

  4. I got what you intend, thankyou for putting up.Woh I am glad to find this website through google. It is a very hard undertaking to seek to please everybody. by Publilius Syrus. gcdcaebdgbgb

  5. Pingback: AUTODEKOR s.r.o. 3M Armatur Design Cockpit Dekor

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s