Linux hack to disable the ATX power switch?

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
lparsons
Sophomore Member
Posts: 154
Joined: Sun Dec 18, 2005 10:59 pm
Location: Minneapolis, MN
Contact:

Linux hack to disable the ATX power switch?

#1 Post by lparsons » Fri Aug 15, 2008 11:25 am

Does anyone know if there is a way to setup Linux to ignore the ATX power and reset switches? I am administering some Linux workstations and some users have developed a bad habit of rebooting them without warning while sitting at them - which of course makes my life much more difficult.
I would like to set Linux to simply ignore the power and reset switches altogether - so that a user could only reboot or shutdown with a software command.
Any ideas?

gongo2k1
Sophomore Member
Posts: 200
Joined: Mon Jun 30, 2008 10:25 pm

#2 Post by gongo2k1 » Fri Aug 15, 2008 12:30 pm

these are handled via acpi. the reboot and shutdown console commands require su.

i think you'll have to remove the users from the powersave group (or whatever group is granted permissions to do this). then make sure that the power button event is handled by acpid/apmd/powersaved with a shell script that does nothing.

afaik, there's no way to disable the reset switch, it's hard-wired to the power supply.

finally, i'm having a hard time buying the story that users are randomly rebooting their machines. it's counter-productive because then they lose their work. if you need to do administrative tasks, try to do them at the very beginning of the day, during lunch, or at the very end of the day that way the users can work without interruption and you don't have to fight with them to get your stuff done. better yet, see if you can script some of the tasks to happen off-hours.

lparsons
Sophomore Member
Posts: 154
Joined: Sun Dec 18, 2005 10:59 pm
Location: Minneapolis, MN
Contact:

#3 Post by lparsons » Fri Aug 15, 2008 12:44 pm

gongo2k1 wrote:these are handled via acpi. the reboot and shutdown console commands require su.
I may have been unclear. They are not using the reboot or shutdown commands, they are hitting the switches. I want to disable the power and reset switches so they are not responded to.
afaik, there's no way to disable the reset switch, it's hard-wired to the power supply.
I know the reset switch can be disconnected with no significant harm to the system. I've done that before. But I want to disable the power switch and use only wake-on-lan, if possible
finally, i'm having a hard time buying the story that users are randomly rebooting their machines. it's counter-productive because then they lose their work.
I always appreciate people accusing me of lying. But I'll let it slide this time.
if you need to do administrative tasks, try to do them at the very beginning of the day, during lunch, or at the very end of the day that way the users can work without interruption and you don't have to fight with them to get your stuff done. better yet, see if you can script some of the tasks to happen off-hours.
The problem isn't limited to administrative tasks. These are shared workstations, and sometimes I need to do work on them to - my job is not limited to sysadmin, rather sysadmin is part of my job.

And then there are other tasks that they ask me to do during the day (like software installs) so that they can test the result and provide immediate feedback.

The users are using the reset and power switches to reboot these shared workstations at random times of the day. Said users couldn't use reboot or shutdown commands if they wanted to, they don't have permission for it.

Basically, the users see something wrong, and perceive the system to be crashed (when it isn't) and then hit the power or reset button without checking to see what is actually happening on the system.

I need to prevent them from taking down the system without warning.

aaa
ThinkPadder
ThinkPadder
Posts: 1062
Joined: Fri Jun 08, 2007 2:36 pm

#4 Post by aaa » Fri Aug 15, 2008 5:57 pm

There's the BIOS 4-second delay option, then you hope that they can't figure it out (they often can't). There might be an option in the BIOS to disable it totally but I don't think it's always there.

Then after you set that option, you tell Linux to ignore power button events in the ACPI scripts like gongo2k1 said. You can even make a reminder pop up to tell them not to do that.

Last resort is physically unplugging the button from the motherboard. Both power and reset go to the motherboard.

Of course, you should probably put a sign up or something, whether you disable the button or not. They might end up unplugging the machines from the wall or something.

gongo2k1
Sophomore Member
Posts: 200
Joined: Mon Jun 30, 2008 10:25 pm

#5 Post by gongo2k1 » Fri Aug 15, 2008 8:38 pm

aaa wrote:They might end up unplugging the machines from the wall or something.
:lol: :lol:
end users can be so... creative... at times!
ah, yes, the memories of providing desktop support through my college years...

gongo2k1
Sophomore Member
Posts: 200
Joined: Mon Jun 30, 2008 10:25 pm

#6 Post by gongo2k1 » Fri Aug 15, 2008 10:50 pm

lparsons wrote:I always appreciate people accusing me of lying. But I'll let it slide this time.
whoa, take it easy...

i think you missed the part where i answered your question. :)

mikeh
Freshman Member
Posts: 86
Joined: Fri Jul 25, 2008 12:54 am
Location: Perth, West Australia

#7 Post by mikeh » Sun Aug 24, 2008 7:46 pm

What thinkpad has a reset button?

whizkid
ThinkPadder
ThinkPadder
Posts: 1555
Joined: Wed Sep 29, 2004 1:40 pm
Location: Saint Paul, MN
Contact:

#8 Post by whizkid » Mon Aug 25, 2008 9:53 am

mikeh wrote:What thinkpad has a reset button?
Most of them.
Machine-Project: 750P, 600X, T42, T60, T400, X1 Carbon Touch

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 1 guest