You are not logged in.

#1 2015-03-29 16:03:51

dejy
Member
Registered: 2014-03-18
Posts: 67

Disable suspend on lid-close without reloading systemd-logind [Solved]

Is there a way to disable suspend on lid-close without reloading Logind? I need to do it without having to shutdown xserver.

Last edited by dejy (2015-03-29 16:23:49)

Offline

#2 2015-03-29 16:16:57

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Disable suspend on lid-close without reloading systemd-logind [Solved]

You should be able to block lid-switch handling with something like

$ systemd-inhibit --what=handle-lid-switch sleep 365d

Offline

#3 2015-03-29 16:23:30

dejy
Member
Registered: 2014-03-18
Posts: 67

Re: Disable suspend on lid-close without reloading systemd-logind [Solved]

Raynman wrote:

You should be able to block lid-switch handling with something like

$ systemd-inhibit --what=handle-lid-switch sleep 365d

Awesome, thanks! This should be on the wiki.

Offline

#4 2015-03-29 16:28:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,715

Re: Disable suspend on lid-close without reloading systemd-logind [Solved]

dejy wrote:

Awesome, thanks! This should be on the wiki.

If you are up to it, feel free to add it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2016-10-20 16:55:13

marmistrz
Member
Registered: 2016-01-05
Posts: 129

Re: Disable suspend on lid-close without reloading systemd-logind [Solved]

Hmmm, I'm using Cinnamon with its power management settings for lid closed set to "do nothing", systemd logind options set to suspend.

I issued the command

systemd-inhibit --what=handle-lid-switch sleep 365d

and closed the lid but the laptop suspended anyway. Any idea why?

Offline

#6 2016-10-20 17:18:06

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,421
Website

Re: Disable suspend on lid-close without reloading systemd-logind [Solved]

logind doesn't respect inhibit on the lid switch by default. man logind.conf


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#7 2016-10-21 11:52:16

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,694
Website

Re: Disable suspend on lid-close without reloading systemd-logind [Solved]

Also, please don't necrobump, marmistrz.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB