The officially official Devuan Forum!

You are not logged in.

#1 2024-09-12 21:14:02

metala
Member
From: Blagoevgrad, Bulgaria
Registered: 2020-01-22
Posts: 5  
Website

[HOW-TO] Prevent laptop suspend / sleep on lid close

The Problem:
I have installed fresh Devuan 5 without X server on an 2011-ish laptop. However, when I closed the lid of the "soon to be server" laptop, the device went to sleep.

The Solution:
1. Edit /etc/elogind/logind.conf

2. Uncomment and set the following parameters:

HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore

3. Reload elogind:
# service elogind reload

Note. I did it few months ago and I am not sure if the elogind reload helped or I needed a restart. service elogind reload works fine.

Last edited by metala (2024-09-17 11:11:17)

Offline

#2 2024-09-16 14:14:02

JWM-Kit
Member
Registered: 2020-06-29
Posts: 138  
Website

Re: [HOW-TO] Prevent laptop suspend / sleep on lid close

I've configured many laptops just as you have, and it works well. The only difference is I just reboot instead of reloading the services.

It may also be helpful to change the behavior of the power key so it does not trigger sleep

I do this by adding the following to logind.conf

HandlePowerKey=poweroff
PowerKeyIgnoreInhibited=yes

Offline

Board footer