Jump to content

Power Button on Banana Pi M5


Alberto234329

Recommended Posts

I had another distro and power button nicely shut down the system and it doesn't with armbian.

 

I have read some things about it but I'm not even sure if they apply to this board or they are updated, about acpi events, logind and AR100, and I've read the official schematics of the board. It seems the button is connected to ADC pins.

 

I installed acpid but acpi_listen reports nothing.

 

But evtest does!

 

root@bananapim5:~# evtest /dev/input/by-path/platform-adc_keys-event
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "adc_keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 259 (BTN_3)
Properties:
Testing ... (interrupt to exit)


Event: time 1687334663.436476, type 1 (EV_KEY), code 259 (BTN_3), value 1
Event: time 1687334663.436476, -------------- SYN_REPORT ------------
Event: time 1687334663.948482, type 1 (EV_KEY), code 259 (BTN_3), value 0
Event: time 1687334663.948482, -------------- SYN_REPORT ------------

 

Is there a way to tell the system that this is event is an acpi event or a driver would be needed?

 

I don't think I can make a real driver but I think I could get read the event from /dev/input/by-path/platform-adc_keys-event with python or something. If I can't I could always wrap evtest and make it do the reading.

 

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines