Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Powerbutton event triggers twice
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Arvo
n00b
n00b


Joined: 30 Sep 2019
Posts: 9

PostPosted: Thu Oct 10, 2019 11:01 am    Post subject: [SOLVED] Powerbutton event triggers twice Reply with quote

I'm running my gentoo in a Powermac G5 case. It has only one button, the power button and I'm trying to mimic the original usage of the button by toggling the tray when pressed quickly.
I've edited /etc/systemd/logind.conf such as:
Code:
#/etc/systemd/logind.conf
[Login]
HandlePowerKey=ignore

To enable the acpid to take action when power-key is pressed.
I've edited the /etc/acpid/default.sh:
Code:
#!/bin/sh
#/etc/acpi/default.sh

...

      case "$action" in
         power)
              /etc/acpi/actions/traytoggle.sh
            ;;

...



Code:

#!/bin/sh
#/etc/acpi/actions/traytoggle.sh
eject --traytoggle


Now.. Pressing the shutdown button triggers this event twice, The tray opens and closes as soon as it showed up. :o
Any help is appreciated. It's not a major issue, just something what I've tried to debug way too long to give up now.

EDIT: journalctl -u systemd-logind.service logs only one press
Code:

# Press the powerbutton
systemd-logind[xxxx]: Power key pressed.


SOLVED: aspii_listen shows that the powerbutton triggers two different events. Filtering out the second one made the power button work :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum