Laptop Lid Conditionals

K

kenizl86

Guest
Hello,

I'm not sure if anyone asked about this before (I tried searching here and didn't see much, but then again...), but I've always seem to have trouble with my Linux installations on my laptop whenever the lid closes. I always think I set the right things to do when I close the lid, but it always seems to be a bit screwy. For example, I say that when power is plugged in when I close the screen I want it to go on sleep, but all it does is lock. Sometimes it won't even lock.

That's just an example, but my main question is: is there a configuration file that is in a base Linux system that controls laptop lid conditionals? And if not, is there one for Ubuntu or Mint? Thanks for any help!
 


On Ubuntu/Mint power events are handled by the desktop environment. The same goes for most distributions that have full DEs like Gnome, KDE, etc.

For any system you can use ACPI to configure what happens when different events happen. Most desktop environments actually use ACPI to detect hardware events.

Then on other Distributions that use Systemd (like Fedora and Arch) you can use built in tools that are apart of systemd to detect the events. For example Gnome packages on Arch do not have Lid detection enabled. I simply use a systemd service to detect when the lid is closed and to put the system to sleep.
 


Top