WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ACPID again - sorry, searched but cannot find an answer  (Read 1776 times)

Offline steptoesyard

  • WikiUser
  • *
  • Posts: 8
ACPID again - sorry, searched but cannot find an answer
« on: August 04, 2015, 03:30:34 AM »
Hi, i have installed tiny core on a dell fx160 thin client and have installed a terabyte hard disk to it which i am using as a samba server for my openelec boxes.
I am trying to get it to run headless and want to use the power button to shut it down.

Have installed acpid on boot, and followed the guide in the wiki at wiki.tinycorelinux.net/wiki:using_acpid_to_control_your_pc_buttons

I have created the two files  /usr/local/etc/acpi/events/all and /opt/.acpi/gen.sh and made the contents the same as in the wiki. Also marked executable as described.

I followed step five and uncommented the two lines but when i press the power button nothing happens, i dont get any popup - does this mean that acpid is not working? It is showing as running if i open control panel > services

If i use api_listen in terminal i get:

tc@box:$ acpi_listen
^[[3~button/power PBTN 00000080 00000000
button/power LNXPWRBN:00 00000080 00000002

Any help/ideas appreciated!
Thanks!
« Last Edit: August 04, 2015, 03:34:17 AM by steptoesyard »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: ACPID again - sorry, searched but cannot find an answer
« Reply #1 on: August 04, 2015, 04:57:44 AM »
Hitting the power button will not generate a popup.
Popup , if not commented out like in the example , only happens when an unassigned button is pressed.

Here is what I use for the power button:

#/usr/local/etc/acpi/events/power
event=button[ \]power
action=/usr/bin/exitcheck.sh


Add "/usr/local/etc/init.d/acpid start" to /opt/bootlocal.sh
Add "usr/local/etc/acpi/events/power" to /opt/.filetool.lst
Do a backup

That is it.  Just that one small file.

Offline steptoesyard

  • WikiUser
  • *
  • Posts: 8
Re: ACPID again - sorry, searched but cannot find an answer
« Reply #2 on: August 04, 2015, 06:49:26 AM »
Thanks very much for your help. The text above did not work for me, but i quessed from the result i got in my first post that my power button was button/power rather than button[ \]power.

I altered the file to this and it works perfectly.

exitcheck.sh doesn't seem to perform a backup when it shuts down, is there any way i can make it do this?

Cheers!
« Last Edit: August 04, 2015, 06:54:09 AM by steptoesyard »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12089
Re: ACPID again - sorry, searched but cannot find an answer
« Reply #3 on: August 04, 2015, 07:01:59 AM »
Code: [Select]
$ filecheck.sh -b
$ sudo exitcheck.sh

Offline steptoesyard

  • WikiUser
  • *
  • Posts: 8
Re: ACPID again - sorry, searched but cannot find an answer
« Reply #4 on: August 04, 2015, 07:15:19 AM »
Thanks to you both for all your help.

Cheers!