# \[Resolu\] Desactiver la mise en veille fermeture du capot

**URL:** <https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621>\
**Category:** Support Debian\
**Created:** [Février 21, 2016, 9:34 UTC](https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621 "2016-02-21T21:34:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![matux](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@matux](https://www.debian-fr.org/u/matux)\
**Post date:** [Février 21, 2016, 9:34 UTC](https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621/1 "2016-02-21T21:34:25Z")

</div>

Tout d’abord bonjour,

Je pense que je vais poser une question de noob mais je la pose quand même 🙂

J’ai un ordinateur portable et je souhaite qu’il reste actif même lorsque je rabats le capot de celui-ci.

J’ai regarder dans les paramètres de ma Debian Jessie x64 mais je n’ai pas trouver cette option, je suis aussi preneur si il y a une solution en ligne de commande.

Merci d’avance pour votre aide.

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Février 21, 2016, 9:34 UTC](https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621/2 "2016-02-21T21:34:25Z")

</div>

Salut  
Dans le fichier `/etc/systemd/logind.conf` en démasquant ( retirer le `#`)

`#HandleLidSwitchDocked=ignore`

Le couvercle (lid) ne devrait plus être pris en compte

[freedesktop.org/software/sys … .conf.html](http://www.freedesktop.org/software/systemd/man/logind.conf.html)

---

<div class="post-metadata">

**Author:** ![glebelg](https://www.debian-fr.org/user_avatar/www.debian-fr.org/glebelg/32/3841_2.png) [@glebelg](https://www.debian-fr.org/u/glebelg)\
**Post date:** [Février 21, 2016, 9:34 UTC](https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621/3 "2016-02-21T21:34:27Z")

</div>

ou dans «&nbsp;dconf Editor&nbsp;» tu cherches `lid-close` et tu modifies l’action.

---

<div class="post-metadata">

**Author:** ![matux](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@matux](https://www.debian-fr.org/u/matux)\
**Post date:** [Février 21, 2016, 9:34 UTC](https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621/4 "2016-02-21T21:34:30Z")

</div>

Bonjour et merci pour votre aide et la rapidité de réponse 🙂

Finalement j’ai retenu la solution de grandtoubab, par contre la ligne en question ne portait plus le même nom (mais lui ressemblait fortement heureusement pour moi).

Pour Information ci-dessous la solution qui à fonctionné pour mon cas (Debian Jessie x64) :

Dans le fichier `/etc/systemd/logind.conf` en démasquant

`HandleLidSwitch=suspend`

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Février 21, 2016, 9:34 UTC](https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621/5 "2016-02-21T21:34:30Z")

</div>

> [@matux](#):
>
> Bonjour et merci pour votre aide et la rapidité de réponse 🙂
> 
> Finalement j’ai retenu la solution de grandtoubab, par contre la ligne en question ne portait plus le même nom (mais lui ressemblait fortement heureusement pour moi).
> 
> Pour Information ci-dessous la solution qui à fonctionné pour mon cas (Debian Jessie x64) :
> 
> Dans le fichier `/etc/systemd/logind.conf` en démasquant
> 
> `HandleLidSwitch=suspend`

c’est curieux parce que ca semble etre le contraire de ce que tu voulais. pour ignorer le bouton if faut mettre =ignore

HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=, HandleLidSwitch=, HandleLidSwitchDocked=  
Controls whether 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 «&nbsp;ignore&nbsp;», «&nbsp;poweroff&nbsp;», «&nbsp;reboot&nbsp;», «&nbsp;halt&nbsp;», «&nbsp;kexec&nbsp;», «&nbsp;suspend&nbsp;», «&nbsp;hibernate&nbsp;», «&nbsp;hybrid-sleep&nbsp;», and «&nbsp;lock&nbsp;». If «&nbsp;ignore&nbsp;», logind will never handle these keys. If «&nbsp;lock&nbsp;», all running sessions will be screen-locked; otherwise, the specified action will be taken in the respective event. Only input devices with the «&nbsp;power-switch&nbsp;» udev tag will be watched for key/lid switch events. HandlePowerKey= defaults to «&nbsp;poweroff&nbsp;». HandleSuspendKey= and HandleLidSwitch= default to «&nbsp;suspend&nbsp;». HandleLidSwitchDocked= defaults to «&nbsp;ignore&nbsp;». HandleHibernateKey= defaults to «&nbsp;hibernate&nbsp;». 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.  
   
Voici le fichier sur Jessie

```auto
:~$ cat /etc/systemd/logind.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
```

---

<div class="post-metadata">

**Author:** ![matux](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@matux](https://www.debian-fr.org/u/matux)\
**Post date:** [Février 21, 2016, 9:34 UTC](https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621/6 "2016-02-21T21:34:38Z")

</div>

Je me suis encore retrouvé avec mon ordinateur en veille :s effectivement grandtoubab il faut bien indiquer

`HandleLidSwitch=ignore`

Merci encore pour le suivi 🙂

---

<div class="post-metadata">

**Author:** ![Clochette](https://www.debian-fr.org/user_avatar/www.debian-fr.org/clochette/32/8757_2.png) [@Clochette](https://www.debian-fr.org/u/Clochette)\
**Post date:** [Octobre 8, 2022, 6:41 UTC](https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621/7 "2022-10-08T06:41:45Z")

</div>

A scindé ce sujet (le Octobre 8, 2022, 6:41 UTC)

Un message a été scindé en un nouveau sujet : [Désactiver la mise ne veille à la fermeture du capot](https://www.debian-fr.org/t/desactiver-la-mise-ne-veille-a-la-fermeture-du-capot/87248)

---

<div class="post-metadata">

**Author:** ![Clochette](https://www.debian-fr.org/user_avatar/www.debian-fr.org/clochette/32/8757_2.png) [@Clochette](https://www.debian-fr.org/u/Clochette)\
**Post date:** [Octobre 8, 2022, 6:42 UTC](https://www.debian-fr.org/t/resolu-desactiver-la-mise-en-veille-fermeture-du-capot/65621/8 "2022-10-08T06:42:06Z")

</div>

A fermé ce sujet (le Octobre 8, 2022, 6:42 UTC)


