You are not logged in.

#1 2014-10-29 11:15:49

Fighter19
Member
Registered: 2012-04-15
Posts: 12

[Solved] Poweroff button without evdev?

Is there a possiblity to use the poweroff button without using evdev, or setting up evdev so that it only reacts to the poweroff button?
I need this for a project and I don't want to shutdown the machine only per ssh.
I think someone here may be able to help me to accomplish my goal ^o^.
So far I've got to blacklist the evdev module, but then the power button won't work.

Last edited by Fighter19 (2014-10-29 13:43:44)

Offline

#2 2014-10-29 11:57:51

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: [Solved] Poweroff button without evdev?

It might be a really stupid question, but why would you want to do this? I think you need to provide more information to make this a workable problem.

Anyway, you might have some luck reading the man page, the xorg wiki and so on.

Offline

#3 2014-10-29 12:02:19

Fighter19
Member
Registered: 2012-04-15
Posts: 12

Re: [Solved] Poweroff button without evdev?

ok if you really want me to roll out everything, I want to create a StepMania arcade like machine.
This needs to disable the evdev module as it would interfere with StepMania (it doesn't load the /dev/input/js0 but instead the corresponding event device which doesn't work).
Everything is working now despite the fact that I can't shutdown the system properly without using ssh.
I already tried to look through certain wiki pages. The only workaround would be to manually remove those certain event devices for the joysticks (/dev/input/event*) but as they sometimes change I really wouldn't like to do it this way. (Sometimes event14 sometimes event 12 etc) Stepmania accesses those devices directly so shutting them down in the xorg config file is no solution.

Last edited by Fighter19 (2014-10-29 12:04:17)

Offline

#4 2014-10-29 12:40:15

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: [Solved] Poweroff button without evdev?

All right. This is a shot in the dark (I am not familiar with Stepmania at all), but a possiblility is that you set up a custom keybinding in your WM or stepmania (if possible without evdev) for the power button, which runs a shutdown script.

Another option is to use systemD for the task. It has power management options which don't seem to require evdev (this includes shutdown, sleep etc). Have a look at the wiki.

Offline

#5 2014-10-29 13:24:47

Fighter19
Member
Registered: 2012-04-15
Posts: 12

Re: [Solved] Poweroff button without evdev?

I think the systemd part can be quite usefull. Thank you!
I'll have a look at it.
However im pretty sure the WM uses events from evdev and this module is deactivated and I think stepmania is only able to handle joydev despite evdev. So I think the first way wouldn't work.

EDIT:"THANK YOU! Using acpid I was able to configure the system so that once the button gets pressed it should execute systemctl poweroff. Problem solved!

Last edited by Fighter19 (2014-10-29 13:43:29)

Offline

Board footer

Powered by FluxBB