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.
About this post
- Posted
- Archived
- Edited
- Score
- 67 · 100% up
- Kind
- Text
- ID
- 81txod
26 comments
My old cat learned to hold the button down to turn off the computer. I think you are under estimating your cat.
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.
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
Just set HandlePowerKey to ignore.
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.
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
poweroffcommand instead.Cover the button.
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
It's nice, but you probably shouldn't do this if you dual boot with another os.
EDIT: hibernate I mean.
What's wrong with hibernating when you have a dual boot?
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.
Deleted before we saved it.
Tape a piece of popsicle stick (or equivalent) across the top of the power button.
The only sensible thing: get rid of the cat.
And then what? Buy a new pet? A dog maybe? RIP not only the button, but your monitor, peripherals, table legs, etc.
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.
rm -v cat
sudo pacman -Rs catPay 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.
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. :)
cat cat