You are not logged in.

#1 2012-10-17 18:18:38

Ziomalon
Member
Registered: 2012-10-17
Posts: 5

PowerButton on Thinkpad T400

Hi,

The problem is simple. Arch doesn't see that I pressed the power button in any way. I tried xev to see the key-code but nothing shows. If I press any other button it show the code, but not the power button.
How can I make Arch see that I actually pressed the damn key. Turning of my laptop by entering the terminal every time is quite frustrating.

Thanks for any reply

Offline

#2 2012-10-17 22:22:15

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,071

Re: PowerButton on Thinkpad T400

I used to use acpid for it, but since moving to systemd, I hear that it can replace acpid. --- How ? I am not quite sure since I haven't had the time to change it and also because its not as critical to me as my machine is always on.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2012-10-18 07:26:57

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

Re: PowerButton on Thinkpad T400

Check out logind.conf man pages.

#/etc/systemd/logind.conf

[Login]
...
HandlePowerKey=poweroff
HandleSuspendKey=pm-suspend
...

Offline

#4 2012-10-20 06:05:19

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: PowerButton on Thinkpad T400

If the button is not being recognized at all, make sure you have the 'button' module loaded, as this is typically what is in charge of that function.  I have always thought that it is quite the creative name fore a module....

Offline

#5 2012-10-20 14:24:18

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: PowerButton on Thinkpad T400

Confirmed on the T520, with the "button" module loaded.  Every other function key will work with systemd out-of-the-box (Fn + F4 suspends to RAM, for example) or can be mapped to a script, but not the power button.  I never use the power button, so I don't mind, but it's never worked to my recollection.

Offline

#6 2012-10-20 14:30:33

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: PowerButton on Thinkpad T400

That is interesting indeed.  Are you a systemd user, or still sticking with sysv for now?  Handling the power button is actually the default I believe., but maybe it would be worth checking?  The relevent info is found in the logind.conf man page.

Edit:  I have this in my journal, maybe knowing this might help you debug:

Oct 19 23:56:59 arch64-think systemd-logind[291]: Watching system buttons on /dev/input/event3 (Power Button)

There is also another line nearly identical, but indicates /dev/input/event1, so which one is the power button for real? I don't know.

Last edited by WonderWoofy (2012-10-20 14:58:10)

Offline

#7 2012-10-22 20:28:26

Ziomalon
Member
Registered: 2012-10-17
Posts: 5

Re: PowerButton on Thinkpad T400

I'm a systemd user since I had my fresh Arch install nearly a week ago (very glad about my choice btw). Everything else works out of the box (except for suspending...but thats the fault of the intel driver, which is a known bug for my T400).  As Šaran advised I looked in my logind.conf. Everything is fine as you showed. Still nothing. The button module is also loaded. Still nothing. 

My journal said:

Oct 22 22:15:59 Calenthe kernel: input: Power Button as /devices/LNXSYSTM:0...t3
Oct 22 22:15:59 Calenthe kernel: ACPI: Power Button [PWRF]

So he sees it...looks like my laptop is not blind but stupid.

edit. as ANOKNUSA said this is not just a problem with my configuration only. This may be a bug. The problem is whose fault is that. Is it Acpi's or systemd's or what...

Last edited by Ziomalon (2012-10-22 20:43:27)

Offline

#8 2012-11-12 02:59:55

vkurup
Member
From: Chapel Hill, NC
Registered: 2012-11-02
Posts: 3
Website

Re: PowerButton on Thinkpad T400

I have a T420S and noticed the same thing. Pressing the Power button has no effect. But, if I hold it down for about 1.5 seconds, then it works as expected. Does this work for others?

Offline

#9 2012-11-12 03:31:23

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,748

Re: PowerButton on Thinkpad T400

vkurup wrote:

I have a T420S and noticed the same thing. Pressing the Power button has no effect. But, if I hold it down for about 1.5 seconds, then it works as expected. Does this work for others?

Um, no.

A quick press of the button is supposed to send a message to the OS to initiate a controlled operation; sleep, shutdown, ask the user what to do, etc...

Pressing and HOLDING the button tells the hardware to just power off, regardless of whether the OS is ready or not.  I recommend you not do this except in rare conditions, with the understanding you are risking the integrity of your file systems.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#10 2012-11-12 03:47:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: PowerButton on Thinkpad T400

Well, if it is truly reacting to 1.5 seconds, it may actually be that it is sending those OS messages (though I doubt this), as typically it takes ~8 seconds to initiate the hard poweroff.

Offline

#11 2012-11-12 07:41:07

vkurup
Member
From: Chapel Hill, NC
Registered: 2012-11-02
Posts: 3
Website

Re: PowerButton on Thinkpad T400

You must hold the power button down for at least 5 seconds to trigger a hardware shutdown. That's not what I'm talking about. I'm talking about a much shorter keypress and it definitely does an orderly shutdown by calling the 'poweroff' command.

As the OP mentioned, just hitting the powerbutton quickly does not generate any xev events on my system (and I've seen this reported by other Thinkpad users). I'm using systemd and all the other ACPI events work perfectly. This bug report details a user that had the same issue and 'fixed' it by holding down the power button for smidge longer. Here's another user with the same issue.

Offline

#12 2012-11-13 17:04:31

Ziomalon
Member
Registered: 2012-10-17
Posts: 5

Re: PowerButton on Thinkpad T400

Well...this can be marked as SOLVED. It appears that this works also with my problem. Pressing down the button for 1,5 second turns off the machine by the software not hardware.
It's quite stupid but it works smile

Thank you all for replying

Offline

#13 2012-11-13 17:09:12

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: PowerButton on Thinkpad T400

That is interesting. My Thinkpad reacts instantaneously onpower button press.  Although i have an Edge which some might say is not really a Thinkpad.

Offline

#14 2012-11-13 19:04:17

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,071

Re: PowerButton on Thinkpad T400

WonderWoofy wrote:

That is interesting. My Thinkpad reacts instantaneously onpower button press.  Although i have an Edge which some might say is not really a Thinkpad.

You are right, its not wink


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#15 2012-11-14 22:58:36

bassu
Member
Registered: 2011-12-21
Posts: 90

Re: PowerButton on Thinkpad T400

~3 seconds does the soft reboot on Thinkpad. It was the same with acpid. I assume it is as well in Windows though never had that on this Thinkpad.

Last edited by bassu (2012-11-14 23:43:10)


The greatest threat to knowledge is not ignorance - it is the illusion of knowledge!

Offline

Board footer

Powered by FluxBB