OPi One acpi not working?


Recommended Posts

Donate and support the project!

acpid need to be configured to take action, such triggering external scripts for shutdown.

In the meantime, try it with "evtest /dev/input/event0", I've done that and events are coming from PL3 where the button is connected.

 

EDIT : Be aware that you will only be able to shutdown the kernel, but since the OPiOne doesn't have any PMIC, it won't shutdown the power.

Link to post
Share on other sites
Quote

manuti@orangepione:~$ sudo evtest /dev/input/event0
[sudo] password for manuti:
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "r_gpio_keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 256 (BTN_0)
Properties:
Testing ... (interrupt to exit)
Event: time 1493239485.022862, type 1 (EV_KEY), code 256 (BTN_0), value 1
Event: time 1493239485.022862, -------------- SYN_REPORT ------------
Event: time 1493239485.952865, type 1 (EV_KEY), code 256 (BTN_0), value 0
Event: time 1493239485.952865, -------------- SYN_REPORT ------------

 

OK, evtest detects the button.

I create a script in /etc/acpi/powerbtn.sh with only:

 

sudo poweroff

 

and other config file on /etc/acpi/events/button_power with:

 

event=button[ /]power
action=/etc/acpi/powerbtn.sh

 

Is correct this approach or I'm going in the moron way?

Thanks again

Link to post
Share on other sites
9 hours ago, martinayotte said:

I will still look at it when I get change, simply to get the knowledge.

 

Same spirit here!

The poweroff by button is only for been a little bit lazy and I always unplug my devices when I finish to work or mingle with it.

Thanks for your help!

Link to post
Share on other sites
3 minutes ago, martinayotte said:

@tkaiser This AR100 code seem to perform a hard reset on SoC, I don't think real shutdown can be accomplish with it, especially that there is no PMIC.

 

It looks like a shutdown where ARISC core is in an endless loop and does a reset to power the system back up once the power button is pressed. But AFAIK shutdown is SoC specific - there are different regulators controlled by different GPIOs on different boards.

Link to post
Share on other sites

The same problem with my Orange Pi One button, but I can't solve it.

Installed ACPID and create an event/action file in /etc/acpi/events, but the button doesn't trigger any event.

acpi_listen never displays any event when I press the button.

And neither does the aforementioned utility "evtest /dev/input/event0", last line of text ever displayed is "Testing ... (interrupt to exit)".

 

I thought the button was not properly soldered to the board, but I tested with multimeter the 2 pins (*) on the back side of the board and it changes from infinite to 0 ohms when I press the button, so I suppose it's OK.

 

Using ARMBIAN 5.38 stable Debian GNU/Linux 9 (stretch) 4.14.18-sunxi

 

(*) In fact I tested continuity of one pin with the screws holding the board to the case, and then I tested resistance between the other pin and a screw.

Link to post
Share on other sites
Guest
This topic is now closed to further replies.