Jump to content

OPi One acpi not working?


manuti

Recommended Posts

In my Orange Pi One with ARMBIAN 5.27.170422 nightly Ubuntu 16.04.2 LTS 4.10.11-sun8i

I install acpi:

sudo apt-get install acpi

And run

sudo acpi_listen

 

And nothing is show when I press the power button.

Is normal or my button is damaged?

 

Thanks

Link to comment
Share on other sites

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 comment
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 comment
Share on other sites

I presume you're right !

But I never used acpid before, so I'm learning at the same time as you, although I probably won't use it as I mentioned yesterday "OPiOne doesn't have any PMIC, it won't shutdown the power".

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

 

Link to comment
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 comment
Share on other sites

@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.

The best I can see is that it could control a additional GPIO pin where users could attach some kind SSR to control the power line.

 

Link to comment
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 comment
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 comment
Share on other sites

But at least evtest worked for you, that's better than nothing :)

 

Have you upgraded Armbian since then? (your message is one year old).

And does evtest still work for you?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines