Skip to content

My cat likes to walk on my box's power button, triggering an instant shutdown. Is there a way to delay this, requiring the power button be pressed and held for a specified time?

I've searched around, and it seems /etc/systemd/logind.conf might hold the answer, but I can't seem to find an option for setting poweroff delay in man logind.conf

Perhaps I'm looking for a BIOS setting?

Please help; this is straining my relationship with my cat. :3

Edited 3 Mar 2018. We only hold this version.

67 points26 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
67 · 100% up
Kind
Text
ID
81txod

Author

73
posts
1.2k
comments
22
media
View profile

26 comments

My old cat learned to hold the button down to turn off the computer. I think you are under estimating your cat.

99 points

Mine just switched to the reset button. He doesn't walk on them, he slaps them with ninja speed. I've also caught him playing with back of the case, so I think he'll go for the power supply next.

4 points

Haha, it's in a bit of a precarious spot for her to stand; my desk hangs over but the box sticks out enough for her to use it as a stair when she's coming down off the desk to lay on my keyboard. :3

2 points

Just set HandlePowerKey to ignore.

35 points

Perfect! Thanks!

Still responds, but based on BIOS settings (with a delay).

I don't know why I didn't think of simply disabling it before.

12 points

That delayed thing where the BIOS responds, I think that's bad. It will just cut power when it triggers, basically crashing your system. You should run the poweroff command instead.

24 points

Another solution: Set the power button to suspend to ram/disk. I love that on my desktop, use it multiple times a day.

https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate

12 points

It's nice, but you probably shouldn't do this if you dual boot with another os.

EDIT: hibernate I mean.

4 points

A 3-second press on power button is handled by motherboard itself, you can not solve it in software. You can cancel reaction on a momentary press by recompiling your kernel without ACPI support. But then, during shutdown, you will need to turn the power off manually when prompted.

You should solve this problem in hardware. Make some lid or fence or something. Or glue a small pyramid (1d4 gaming dice) on the button, the cat will avoid stepping on it. Alternatively, go to the place where they sell parts for old cars, and get an ancient turnkey lock - it works just like a button, you can replace your power button with it.

10 points
unknown author

Deleted before we saved it.

8 points

Tape a piece of popsicle stick (or equivalent) across the top of the power button.

7 points

The only sensible thing: get rid of the cat.

5 points

And then what? Buy a new pet? A dog maybe? RIP not only the button, but your monitor, peripherals, table legs, etc.

-2 points

My dog is about 100x safer for my electronics than my cats. My dog couldn't care any less about cables, my cats will chew anything not buried under 3 feet of concrete.

10 points

rm -v cat

4 points

sudo pacman -Rs cat

error: failed to prepare transaction (could not satisfy dependencies)
:: human: removing cat breaks dependency 'cat'
:: cuddle: removing cat breaks dependency 'cat'
:: kitty-kisses: removing cat breaks dependency 'cat'
2 points

Pay more attention to your cat :-)

Mine started knocking things off my desk for a while, it'd sit there and watch me for a while and then just sweep something off the desk, and I realized I'd been heads-down into my own thing and doing nothing beyond food water and catbox for too long. I started making sure to have some time just for the cat, all was good.

2 points

Awh, I pay attention to her. She just uses my box as a stair when she comes to lay down on my keyboard. She's alright, don't worry. :)

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.