Disable External Power Button


Recommended Posts

Hi Everyone,

I've done some searching already on this topic and can't find a solution that works for me, so I'm hoping I'm missing something really easy.

I need to disable the 'off' command when the power button is pressed on my machine. I have a cat that likes to sleep on it and despite placing a cover etc... he still manages to turn the bloody thing off! lol

 

I can't just unplug the button from the motherboard as I still want the ability to 'turn it on' the reason why is I have the Navi 10 reset problem and use a script to reset the card, which places my machine in standby mode.

 

I'm hoping there is a really easy way I can just change the button's behaviour in linux - so that it does nothing when pressed if already on.

 

I'm using the release candidate 6.9 of Unraid and my motherboard is a X570 Aurus Xtreme (may help).

 

Thanks,
Steve

Link to comment
14 hours ago, pearce1340 said:

I have a cat that likes to sleep on it and despite placing a cover etc... he still manages to turn the bloody thing off! lol

You could always upgrade to a dog :)

 

One solution is to rename the script that handles ACPI events, e.g.:

 mv /etc/acpi/acpi_handler.sh /etc/acpi/acpi_old.sh

This would need to be done after every boot, with the go file or with a user script, also note that a long button press will still do a hard shutdown, as that's not software controlled.

 

P.S. pretty sure that ACPI script won't be missed by anything else but not 100% sure.

 

 

 

 

  • Thanks 1
  • Haha 1
Link to comment
On 12/31/2020 at 8:08 AM, JorgeB said:

You could always upgrade to a dog :)

 

One solution is to rename the script that handles ACPI events, e.g.:


 mv /etc/acpi/acpi_handler.sh /etc/acpi/acpi_old.sh

This would need to be done after every boot, with the go file or with a user script, also note that a long button press will still do a hard shutdown, as that's not software controlled.

 

P.S. pretty sure that ACPI script won't be missed by anything else but not 100% sure.

 

 

 

 

This is amazing, its exactly what I needed. Before you ask, not the dog... the move command lol.

 

I've stuck it in a user script to run when the array first starts - which should do the trick!

 

Little b&%$%d occasionally hits the reset button with a claw as well... so I'll disable that

  • Like 1
Link to comment
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.