This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: Shutdown by power button on Beaglebone Black

Part Number: AM3358

Tool/software: Linux

Hi,

I am booting beagle bone black from SD card. My SD card is having linux kernel (v4.9.28). I tried to install acpid to enable power button pressed event in the following way:

# opkg install acpid

I got the following error:

Collected error:

* opkg_prepare_url_for_install: Could not find anything to satisfy 'acpid'

I could not update the opkg since there are no package feeds provided for it.

So, I tried to find the power button pressed event in /dev/input/event0 to run the shutdown command on power button pressed.

But, event0 is missing in my kernel.

# ls /dev/input

mice

Only mice is listed under /dev/input directory. 

Is there any alternate way to use the Power Button on Beagle bone Black for Shutdown?

Thanks & regards,

Manimekala Rajendran

  • The software team have been notified. They will respond here.
  • Hello Manimekala,

    Just install the attached acpid package.
    Next time you need a package, please build by following this guide.
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/acpid_5F00_2.0.27_2D00_r0_5F00_armv7ahf_2D00_neon.ipk

    Best regards,
    Kemal

  • Dear Kemal,

     Thank you very much for your immediate reply. Sorry for late response.I installed acpid package that you have sent in BBB. The installation was successfull. But, Power button pressed is not working. When I see the status of acpid service, It displays following information:

    root@am335x-evm:# systemctl status acpid.service

    [[0;1;32m●[[0m acpid.service - ACPI Event Daemon
    Loaded: loaded (/lib/systemd/system/acpid.service; enabled; vendor preset: en
    abled)
    Active: [[0;1;32mactive (running)[[0m since Mon 2017-12-11 11:54:54 UTC; 2min
    36s ago
    Process: 202 ExecStart=/usr/sbin/acpid (code=exited, status=0/SUCCESS)
    Main PID: 207 (acpid)
    Tasks: 1 (limit: 512)
    CGroup: /system.slice/acpid.service
    └─207 /usr/sbin/acpid

    Dec 11 11:54:52 am335x-evm systemd[1]: Starting ACPI Event Daemon...
    Dec 11 11:54:52 am335x-evm acpid[202]: [[0;1;31mcannot open input layer[[0m
    Dec 11 11:54:52 am335x-evm acpid[202]: RTNETLINK1 answers: No such file or directory
    Dec 11 11:54:52 am335x-evm acpid[202]: acpid: error talking to the kernel via netlink
    Dec 11 11:54:52 am335x-evm acpid[207]: starting up with netlink and the input layer
    Dec 11 11:54:52 am335x-evm acpid[207]: 0 rules loaded
    Dec 11 11:54:52 am335x-evm acpid[207]: waiting for events: event logging is off
    Dec 11 11:54:54 am335x-evm systemd[1]: Started ACPI Event Daemon.

    Can you please suggest the solution to solve this problem?

    Thanks & Regards,

    Manimekala Rajendran

  • Please, apply these two patches.

  • Hi Kemal,

    Thank you for your prompt reply. 

    Can you please guide me how to apply those two patches?

    Am I need to rebuild the kernel for that?

    Thanks & Regards,

    Manimekala.R

  • Open the file which need to be patched with your favourite text editor and copy and paste the green marked areas in proper locations. Yes you need to rebuild the kernel and device trees since the changes have done over the device tree and the C files.