Timeline for GNOME: disable sleep on lid close
Current License: CC BY-SA 3.0
19 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 23 at 7:23 | comment | added | sourcejedi | Huh. I think there will be an example in /usr/lib/systemd/ that you can copy into place and edit? | |
| May 23 at 0:34 | comment | added | q.undertow | In fedora 42, /etc/systemd/logind.conf doesn't exist. Do commenters here know what happened to it, and how can I do this (disable suspend on lid-close globally) on this system? | |
| Dec 5, 2023 at 7:58 | comment | added | Alex Robbins | It sounds like this feature of gnome-tweaks (the "Suspend when lid closed" option) was removed as it was considered out-of-scope for gnome-tweaks. It has been suggested that this feature ought to be implemented in Gnome Settings proper, instead of Tweaks, but that hasn't happened yet. So, it seems that as of Gnome 45 or so, neither Tweaks nor Settings still has an option to prevent systemd from suspending on lid switch. | |
| Mar 12, 2021 at 22:36 | comment | added | rugk |
Note that in my case Tweaks (for GNOME 33) created the autostart entry which starts ` /usr/libexec/gnome-tweak-tool-lid-inhibitor, which is a small Python script which does things I actually do not really understand. But it seems to also check the setting state etc. And checking systemd-inhibit --list` I also see it basically works the same by adding an inhibitor to systemd.
|
|
| Apr 20, 2019 at 3:29 | review | Suggested edits | |||
| Apr 20, 2019 at 4:34 | |||||
| Nov 9, 2018 at 19:50 | comment | added | jocull | @sourcejedi I've got nvidia graphics -- which may be a big part of the problem :) | |
| Nov 9, 2018 at 19:48 | comment | added | sourcejedi | @jocull or if more than one display is connected. I haven't tried this recently, but I think I've seen it work correctly. Intel graphics. | |
| Nov 9, 2018 at 18:17 | comment | added | jocull | @sourcejedi The problem may be that I don't have it in a docking station - it just has a monitor and keyboard/mouse plugged in :) | |
| Nov 9, 2018 at 15:34 | comment | added | sourcejedi | @jocull Hi, that's an excellent point, but in theory it should already be handled. "If the system is inserted in a docking station, or if more than one display is connected, the action specified by HandleLidSwitchDocked= occurs; if the system is on external power the action (if any) specified by HandleLidSwitchExternalPower= occurs; otherwise the HandleLidSwitch= action occurs." HandleLidSwitchDocked= defaults to "ignore". Maybe you have a different version of systemd, or a bug in systemd, or your hardware/drivers don't provide the information in the right way for systemd. | |
| Nov 9, 2018 at 15:28 | comment | added | jocull |
I needed to edit logind.con because I work with the laptop closed on an external monitor. It would go to sleep between my initial login and Gnome coming up.
|
|
| Nov 4, 2018 at 16:59 | comment | added | sourcejedi | @Ash thanks for the report, if you want to talk about collecting more information on that, it would probably work best elsewhere e.g. a separate question on this site, or a report on the Ubuntu bug tracker. | |
| Nov 4, 2018 at 16:42 | comment | added | Ash | This causes a strange behavior on Ubuntu 18.04: it logs out periodically. Sort of like a delayed login loop! | |
| Dec 21, 2017 at 0:27 | comment | added | thebunnyrules | Thanks for that. The autostart has changed since you wrote this answer. It is now: /usr/lib/gnome-tweak-tool/gnome-tweak-tool-lid-inhibitor | |
| Sep 13, 2016 at 10:58 | vote | accept | sourcejedi | ||
| Sep 3, 2016 at 19:07 | history | edited | sourcejedi | CC BY-SA 3.0 |
added 122 characters in body
|
| Sep 3, 2016 at 17:41 | comment | added | user22304 |
Editing /etc/systemd/logind.conf instead of using GNOME Tweak Tool may be better because it works even when GNOME is not running, for example when working at the console.
|
|
| Sep 2, 2016 at 19:21 | comment | added | sourcejedi | Lol. It comes up in search results (8th down)... but I was searching "disable" instead of "stop". In that case Google shows the snippet "When you close the lid of your laptop, your computer will suspend in order to save power", and nothing else. I suspect I saw that, but I didn't think it was a promising avenue of investigation! I mainly posted this question to get an answer into the Google results. At least that's worked :). google.com/search?q=gnome+stop+lid+close+suspend | |
| Sep 2, 2016 at 17:56 | comment | added | don_crissti | Also described in the gnome on-line help | |
| Sep 2, 2016 at 16:23 | history | answered | sourcejedi | CC BY-SA 3.0 |