Jump to content
XPEnology Community

Power off from the buttom


sraptor

Recommended Posts

Nanoboot 5.0.3.1 have acpi enable for 100% because it's work on my system :smile:

I use power button for on or off my nas so acpi works fine with last nanoboot.

I've seen there are several packages of NB5031 available. Probably I've got one without? Do you use the package from trantor or the one I mentioned in my initial question?

Link to comment
Share on other sites

Nanoboot 5.0.3.1 have acpi enable for 100% because it's work on my system :smile:

I use power button for on or off my nas so acpi works fine with last nanoboot.

I've seen there are several packages of NB5031 available. Probably I've got one without? Do you use the package from trantor or the one I mentioned in my initial question?

 

Hmm, I dont remember :sad: but it can downloaded from *.nl site

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...

Hi all,

 

I got button shutdown working on DSM_DS3612xs_4528 under proxmox. I didn't check on bare-metal, but I think it should work as well.

 

This method is based on darkest_star's message.

I cross-compiled acpid 2 for DSM_DS3612xs_4528 with nanoboot NB_x64_5032_DSM_50-4528.

 

Download acpi-button.tgz in the attachment. All files you can extract, except /etc/rc. It's ok to overwrite it you have exactly same version of DSM. Otherwise, just look at the bottom of /etc/rc in the archive and before "exit 0" you will find there

# This is to get acpi button working
SYNOLoadModules "button"

 

which you have to add to your /etc/rc

 

After reboot it should work.

acpi-button.tgz

Link to comment
Share on other sites

  • 1 month later...

Some kind of instruction, how to got it on nanoboot with 5.0-4493.pat through ssh session on mac

 

I used this two posts:

darkest_star » 29 окт 2013 23:39

dilshodm » 01 ноя 2014 16:38

 

0. download, unpack and copy folder from dilshodm's archive to folder "homes" at your disk on synology

 

1. Open terminal, type

ssh root@192.168.1.22 

 

2.

. Install a acpid daemon

- For this I have rebuilt the busybox with enabled acpid. Since I'm not sure, if the other busybox features are correctly working with my own built busybox, I'm using it only as acpid.

The acpid in the download package is simply a renamed busybox.

- copy acpid to /bin as user root and check that it's executable. Should look like this:

DiskStation> ll /bin/acpid
-rwxr-xr-x    1 root     root        536592 Oct 27 18:08 /bin/acpid

 

cp /volume1/homes/acpi-button/bin/acpid /bin

 

Check, type:

ls /bin

ll /bin/acpid

 

I've got

-rwx--x--x 1 root root 63701 Dec 14 17:30 /bin/acpid

 

So, I've fixed this:

chmod 755 /bin/acpid

 

Another check:

 

ll /bin/acpid

-rwxr-xr-x 1 root root 63701 Dec 14 17:30 /bin/acpid

 

Got it

 

3. Install a acpid start/stop script

- create an startup script /usr/syno/etc/rc.d/S30acpid.sh

 

- check that it's executable. Should look like this:

DiskStation> ll /usr/syno/etc/rc.d/S30acpid.sh
-rwxr-xr-x    1 root     root           359 Oct 29 20:45 /usr/syno/etc/rc.d/S30acpid.sh

 

cp /volume1/homes/acpi-button/usr/syno/etc/rc.d/S30acpid.sh /usr/syno/etc/rc.d

 

Check1 (you must see S30acpid.sh):

ls /usr/syno/etc/rc.d

Check2:

ll /usr/syno/etc/rc.d/S30acpid.sh 

 

Fix, if needed

chmod 755  /usr/syno/etc/rc.d/S30acpid.sh

 

4. Add a acpid event config

- Finally add a acpid config file for the power button event

- also here: check it's owned by root and executable:

 

cp -r /volume1/homes/acpi-button/etc/acpi /etc

 

Check1:

ls /etc/acpi

Check2:

ll /etc/acpi/powerbtn.sh

 

Fix, if needed:

chmod 755  /etc/acpi/powerbtn.sh

 

 

 

# This is to get acpi button working
SYNOLoadModules "button"

 

which you have to add to your /etc/rc

 

 

ll /etc/rc

-rwxr-xr-x 1 root root 22164 Dec 14 17:10 /etc/rc

remember size of file and permissions

 

Copy

cp /etc/rc /volume1/homes

Copy file rc from homes to any directory that you can see from mac

Open it in TextEdit and add string

# This is to get acpi button working
SYNOLoadModules "button"

before "exit 0" at the end of file

Save, and copy file rc at path homes/acpi-button/etc

Copy to synology

cp /volume1/homes/acpi-button/etc/rc /etc

Check

ll  /volume1/homes/acpi-button/etc/rc

-rwx--x--x 1 admin users 22227 Dec 14 18:32 /volume1/homes/acpi-button/etc/rc

Check file size (it must be bigger than before) and permissions

Fix, if needed:

chmod 755  /volume1/homes/acpi-button/etc/rc

 

Finally reboot your box.

Now you could safely shutdown your box by pressing the power button.

 

Hope it helps you too! :smile:

Link to comment
Share on other sites

Some kind of instruction, how to got it on nanoboot with 5.0-4493.pat through ssh session on mac

 

I used this two posts:

darkest_star » 29 окт 2013 23:39

dilshodm » 01 ноя 2014 16:38

 

In this instruction I use as example IP 192.168.1.2

If you use another IP for you xpenology, use you own)

 

0. download, unpack and copy folder from dilshodm's archive to folder "homes" at your disk on synology

 

1. Open terminal, type

ssh root@192.168.1.2 

 

2.

. Install a acpid daemon

- For this I have rebuilt the busybox with enabled acpid. Since I'm not sure, if the other busybox features are correctly working with my own built busybox, I'm using it only as acpid.

The acpid in the download package is simply a renamed busybox.

- copy acpid to /bin as user root and check that it's executable. Should look like this:

DiskStation> ll /bin/acpid
-rwxr-xr-x    1 root     root        536592 Oct 27 18:08 /bin/acpid

 

cp /volume1/homes/acpi-button/bin/acpid /bin

 

Check, type:

ls /bin

ll /bin/acpid

 

I've got

-rwx--x--x 1 root root 63701 Dec 14 17:30 /bin/acpid

 

So, I've fixed this:

chmod 755 /bin/acpid

 

Another check:

 

ll /bin/acpid

-rwxr-xr-x 1 root root 63701 Dec 14 17:30 /bin/acpid

 

Got it

 

3. Install a acpid start/stop script

- create an startup script /usr/syno/etc/rc.d/S30acpid.sh

 

- check that it's executable. Should look like this:

DiskStation> ll /usr/syno/etc/rc.d/S30acpid.sh
-rwxr-xr-x    1 root     root           359 Oct 29 20:45 /usr/syno/etc/rc.d/S30acpid.sh

 

cp /volume1/homes/acpi-button/usr/syno/etc/rc.d/S30acpid.sh /usr/syno/etc/rc.d

 

Check1 (you must see S30acpid.sh):

ls /usr/syno/etc/rc.d

Check2:

ll /usr/syno/etc/rc.d/S30acpid.sh 

 

Fix, if needed

chmod 755  /usr/syno/etc/rc.d/S30acpid.sh

 

4. Add a acpid event config

- Finally add a acpid config file for the power button event

- also here: check it's owned by root and executable:

 

cp -r /volume1/homes/acpi-button/etc/acpi /etc

 

Check1:

ls /etc/acpi

Check2:

ll /etc/acpi/powerbtn.sh

 

Fix, if needed:

chmod 755  /etc/acpi/powerbtn.sh

 

 

 

# This is to get acpi button working
SYNOLoadModules "button"

 

which you have to add to your /etc/rc

 

 

ll /etc/rc

-rwxr-xr-x 1 root root 22164 Dec 14 17:10 /etc/rc

remember size of file and permissions

 

Copy

cp /etc/rc /volume1/homes

Copy file rc from homes to any directory that you can see from mac

Open it in TextEdit and add string

# This is to get acpi button working
SYNOLoadModules "button"

before "exit 0" at the end of file

Save, and copy file rc at path homes/acpi-button/etc

Copy to synology

cp /volume1/homes/acpi-button/etc/rc /etc

Check

ll  /volume1/homes/acpi-button/etc/rc

-rwx--x--x 1 admin users 22227 Dec 14 18:32 /volume1/homes/acpi-button/etc/rc

Check file size (it must be bigger than before) and permissions

Fix, if needed:

chmod 755  /volume1/homes/acpi-button/etc/rc

 

Finally reboot your box.

Now you could safely shutdown your box by pressing the power button.

 

Hope it helps you too! :smile:

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...

Hello everyone,

 

i updated from XPEnoboot_DS3615xs_5.1-5022.3 to XPEnoboot_DS3615xs_5.2-5565.1 on my proxmox server.

now the "vm proxmox shutdown" work anymore. bevore i updated it works with the acpi-button.tgz files from dilshodm post very well.

what can i do, to bring the "vm proxmox shutdown" button to work with the latest XPEnoboot_DS3615xs_5.2-5565.1 ??

 

Thank you very much for your help!

Link to comment
Share on other sites

Hi everyone,

 

the problem in 5.2-5565.1 and 5.2-5565.2 is caused by missing CONFIG_INPUT_EVDEV configuration in Synology's 3.10.35 kernel. You can cross-compile it as a evdev module (Device Drivers -> Input device support -> Event interface). After loading evdev.ko the dilshodm's acpid2 method is working again.

Link to comment
Share on other sites

Hi everyone,

 

the problem in 5.2-5565.1 and 5.2-5565.2 is caused by missing CONFIG_INPUT_EVDEV configuration in Synology's 3.10.35 kernel. You can cross-compile it as a evdev module (Device Drivers -> Input device support -> Event interface). After loading evdev.ko the dilshodm's acpid2 method is working again.

 

I have the same issue with the power button. Could you please explain the workaround step by step with the commands needed to cross-compile and how to load the module evdev.ko?

 

What do I have to do after loggin in with putty?

Link to comment
Share on other sites

Here is great guide how to cross-compile kernel module for Synology: https://hallard.me/how-to-install-kernel-modules-on-synology-ds1010-dsm-4-1/, but I woull not recommend you to do it if you have now idea what does it mean.

 

My version for x86_64 is http://uloz.to/x4jiZZV5/powerbutton-zip.

You can download and unzip it to your shared folder on the device, then copy evdev.ko to /opt/lib/modules/3.10.35/

 

You have to do it as root

sudo su -

 

Then copy the file

mkdir /opt/lib/modules
mkdir /opt/lib/modules/3.10.35/
cp /volume1/path_to_downloaded_files/evdev.ko /opt/lib/modules/3.10.35/

 

To test it just load the module with insmod

insmod /opt/lib/modules/3.10.35/evdev.ko

 

If you get no error, make the module be loaded automatically. Copy S10modules to /opt/etc/init.d/

cp /volume1/path_to_downloaded_files/S10modules /opt/etc/init.d/
chmod 755 /opt/etc/init.d/S10modules

 

Now it should be working.

And of course you have to follow the dilshodm steps to use acpid 2 (it is on top of page 9).

Link to comment
Share on other sites

Thank you for your guide, but it does not work for me.

 

I have tried this on a Dell T20 (bare metal) installation. The previous solution by darkest_star worked flawless before I have updated to DSM 5.2.

 

Has anyone else managed to get this working?

Link to comment
Share on other sites

Thank you thordrid, it works for me on a proxmox vm installation.

 

i have tried it with your guide, but lsmod shows no evdev.ko after restart.

 

copy evdev.ko -> /lib/modules
copy S10modules -> /usr/syno/etc/rc.d/S10module_evdev.sh
- edit MODULES_DIR="/lib/modules/"
- chmod 755 /usr/syno/etc/rc.d/S10module_evdev.sh

 

this is the working solution for me.

 

thank you very much thordrid for the cross-compiling !!!

Link to comment
Share on other sites

i wanna check this out, maybe u can hint me with this step, where do i change this?

 

nvr mind: got it, its in the ".sh" :smile:

 

thanks for your work!

 

Thank you thordrid, it works for me on a proxmox vm installation.

 

i have tried it with your guide, but lsmod shows no evdev.ko after restart.

 

- edit MODULES_DIR="/lib/modules/"

Link to comment
Share on other sites

Hello all,

Since 2013 I've used 4.2.3211++ (repack v1.2) for my NAS without any problem. Today I have done a new installation of 5.2 with new disks for the volume.

Now I have the same problem again: My power button is not working.

I've read all the posts in the meantime from 2013 until now to see whats the current state. Because on my system /proc/acpi/events is not present. I have loaded button.ko and evdev.ko. Without the /proc/acpi/event acpid will not work.

 

Is this a known problem?

Link to comment
Share on other sites

Hi,

/proc/acpi/events method is for quite a long time marked as deprecated and newest Synology kernel used in DSM 5.2 is compiled without it (ACPI_PROC_EVENT). I have not found a way to compile this as a .ko module, so I am affraid the only way to make it work is to recompile whole kernel. Better way is not to use /proc/acpi/events and acpid, but to switch to newer input layer method implemented in acpid2. You can follow dilshodm's steps on page 9 of this thread and after loading evdev.ko module everything is working again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...