IgorS Posted April 9, 2018 Share Posted April 9, 2018 Please help, what I am missing? With legacy kernel installed acpid and pressing power button on OpiOne gives me events (monitoring with acpi_listen). Same thing not working with next kernel 4.14.18. Do anybody have solution? Link to comment Share on other sites More sharing options...
zador.blood.stained Posted April 9, 2018 Share Posted April 9, 2018 Since nothing on the PCB suggests that this button is a power button (and since suspend/resume and wakeup after shutdown is not currently possible) by default it has a different button code: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts#n96 It can be changed to KEY_POWER with a custom Device Tree overlay. Link to comment Share on other sites More sharing options...
IgorS Posted April 9, 2018 Author Share Posted April 9, 2018 22 minutes ago, zador.blood.stained said: Since nothing on the PCB suggests that this button is a power button (and since suspend/resume and wakeup after shutdown is not currently possible) by default it has a different button code: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts#n96 It can be changed to KEY_POWER with a custom Device Tree overlay. Thank you very much for answer... But I really don't know how to write such Device Tree overlay. Can you help me with this? Link to comment Share on other sites More sharing options...
IgorS Posted April 9, 2018 Author Share Posted April 9, 2018 3 minutes ago, IgorS said: Thank you very much for answer... But I really don't know how to write such Device Tree overlay. Can you help me with this? I am looking to example: https://github.com/armbian/sunxi-DT-overlays/blob/master/examples/gpio-button.dts Could I only change pin number in this example? Link to comment Share on other sites More sharing options...
zador.blood.stained Posted April 9, 2018 Share Posted April 9, 2018 1 minute ago, IgorS said: Could I only change pin number in this example? No since it will conflict with the existing button definition unless you remove it. The DT overlay should probably look like this: /dts-v1/; /plugin/; / { fragment@0 { target-path = "/r_gpio_keys/sw4"; __overlay__ { linux,code = <116>; }; }; }; Link to comment Share on other sites More sharing options...
IgorS Posted April 9, 2018 Author Share Posted April 9, 2018 2 minutes ago, zador.blood.stained said: No since it will conflict with the existing button definition unless you remove it. The DT overlay should probably look like this: /dts-v1/; /plugin/; / { fragment@0 { target-path = "/r_gpio_keys/sw4"; __overlay__ { linux,code = <116>; }; }; }; Thanks a lot, I'll try. Link to comment Share on other sites More sharing options...
IgorS Posted April 9, 2018 Author Share Posted April 9, 2018 Compiled and activated overlay, but still nothing from acpi_listen Link to comment Share on other sites More sharing options...
IgorS Posted April 14, 2018 Author Share Posted April 14, 2018 Can anybody help, please, I can't figure out how to fix this to work. Despite loaded overlay which change emited code to KEY_POWER on button press, there is no event created in /sys, I think that still something missing. This is beyond of my knowledge so please help. Link to comment Share on other sites More sharing options...
polop Posted November 10, 2018 Share Posted November 10, 2018 I have the same problem. I can not activate the Power button. I used the following commands: apt-get install acpid nano /etc/acpi/events/button_power write code event=button/power action=/sbin/shutdown -h now and /etc/init.d/acpid restart Help me. I'm new to linux I am used Orange PI pc plus Link to comment Share on other sites More sharing options...
polop Posted November 12, 2018 Share Posted November 12, 2018 On 11/10/2018 at 9:48 PM, polop said: I have the same problem. I can not activate the Power button. I used the following commands: apt-get install acpid nano /etc/acpi/events/button_power write code event=button/power action=/sbin/shutdown -h now and /etc/init.d/acpid restart Help me. I'm new to linux I am used Orange PI pc plus Solved the problem. Installed the old version of Armbian Xenial https://www.armbian.com/orange-pi-pc-plus/#kernels-archive Link to comment Share on other sites More sharing options...
Recommended Posts