ACPI event on lid close, does it happen before suspend?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
thebestlettuce
Level 1
Level 1
Posts: 7
Joined: Thu Nov 30, 2023 2:41 pm

ACPI event on lid close, does it happen before suspend?

Post by thebestlettuce »

My laptop is configured to suspend when I close the screen. If I set up a script to run when the lid close event happens, does it happen before the suspend? If after, does it happen as soon as the laptop comes out of suspend?

to avoid xy problem: im trying to prevent an issue where my laptop wakes up while the screen is closed when it detects input from my wireless mouse. I'm going to have a script run on screen close with something like:

if screen open: enable mouse; exit
if screen closed: disable mouse; suspend
sleep 1 sec
repeat

This way the script wont have to run all the time, only when the lid is shut. and I'm assuming it wont be checking every second when the screen is shut because its in suspend, it will just be running when the computer leaves suspend

system info: https://termbin.com/8ndn
Post Reply

Return to “Beginner Questions”