-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] acpid handlers not working #25248
Comments
Hmm, after a thought last night, I woke up this morning and replaced the power button even command with a simple echo to file:
And, alas; the file is there after pressing the power button... so obviously this is in fact an error on my part with the scripts! I'll close this off. |
EDIT: Updated to include double invocation workaround. Figure I'd share here in case anyone finds it handy:
|
Issue description
I am attempting to declare some actions to take upon acpid events.
For instance, I would like to launch a
rofi
menu when pressing the power button, or runslock & systemctl suspend -i
when closing my laptop's lid.However, the declarations I've made in my configuration don't seem to operate as I'd expect.
I can see the files written by the properties I'm defining (an action file and an event file), and they seem correct, yet when these events happen, it doesn't seem the actions are triggered.
Steps to reproduce
Relevant portions of
configuration.nix
(two examples).services.acpid.handlers.lidEventCommands
/powerEventCommands
:services.acpid.handlers.powerEvent
Debugging from shell (follow along)
Results
When pressing the power button on my system, nothing happens.
If I manually execute the above script, it works as expected.
Watching
journalctl -f
, I can see the power button presses happening.Other notes
I have the power button set to
ignore
inlogind
, so it doesn't intercept any presses (and shut my system down).Technical details
17.03.1033.99dfb6dce3 (Gorilla)
nix-env (Nix) 1.11.8
17.03.1033.99dfb6dce3
The text was updated successfully, but these errors were encountered: