Jump to content

Button on PiOne board doesn't work in 4.14.14


eejeel

Recommended Posts

I'am running a PiOne with 4.14.14 Stretch.
I have installed acpid and give the command acpi_listen

When pussing the button in Stretch and I didn't see any logging.
With the old kernel in 5.38 Jessie on the same PiOne I saw
button/power PBTN 00000080 00000000
button/power PBTN 00000080 00000000
button/power PBTN 00000080 00000000

In the output of
 dtc /boot/dtb/sun8i-h3-orangepi-one.dtb
I saw

key_pins@0 {
    pins = "PL3";
    function = "gpio_in";
    linux,phandle = <0x39>;
    phandle = <0x39>;
};

Means gpio_in  defined as an input?

Is the button function not yet implemented in 4.14.14? Or is something going wrong?

Link to comment
Share on other sites

In mainline kernel DT the onboard button sends the code BTN_0 so it doesn't work as a power button by default.

		sw4 {
			label = "sw4";
			linux,code = <BTN_0>;
			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
		};

It can be changed to one of the codes defined here like KEY_POWER, but it will work only for shutdown, there is no suspend/resume or powering on after shutdown support.

Link to comment
Share on other sites

I use this button for shutdown the PiOne. Therefore in the 5.38 Jessie version I have put a file in /etc/acpi/events/button_power
File contents:
event=button/power
action=/sbin/shutdown -h now

As written in another forum topic, PiHole is my first and only Linux project. I don't know to implement this. Is it possible that this can be included in one of the next package releases?

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