WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: acpid does not recognize Thinkpad's sleep button  (Read 321 times)

Offline GNUser

  • Hero Member
  • *****
  • Posts: 628
Re: acpid does not recognize Thinkpad's sleep button
« Reply #30 on: September 16, 2020, 12:57:25 PM »
I can confirm that without elogind running in Devuan, first press of sleep key produces output in xev, then no output for (what feels like) a long while, then it produces output one more time followed by no output for a while... Exactly as described in that quote. Nice find, Rich!!

So it seems that   elogind  does not get involved in generating an event when the sleep button is pressed--it simply notices the event and puts the machine to sleep.

So it's still a mystery what exactly is generating an event when sleep key is pressed. Because the quote describes so accurately what's going on, it suggests thinkpad-acpi is what generates the event. But there are two problems with that theory: 1) Devuan can generate events without thinkpad_acpi being loaded and 2) TCL10 64bit and TCL11 bit (the two versions I've tested) cannot produce an event despite thinkpad_acpi being loaded.

There must be something more to the story.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8113
Re: acpid does not recognize Thinkpad's sleep button
« Reply #31 on: September 16, 2020, 01:07:11 PM »
HI GNUser
Does your keyboard show up in  /dev/input/by-id/ ? If it does, try catting that keyboard file and see if it responds to FN+F4.

Offline aus9

  • Sr. Member
  • ****
  • Posts: 262
Re: acpid does not recognize Thinkpad's sleep button
« Reply #32 on: September 16, 2020, 06:09:10 PM »
In addition to above,

1) Have you confirmed you do not need firmware or if need, its ok?

2) Have you considered modding an app I found in devuan,

http://www.nongnu.org/tpb/doc/tpb.1.html

known keys it interacts with are
Code: [Select]
IDENTIFIER        STATES/VALUE
thinkpad          pressed
home              pressed
search            pressed
mail              pressed
favorites         pressed
reload            pressed
abort             pressed
backward          pressed
forward           pressed
fn                pressed
zoom              on, off
thinklight        on, off
display           lcd, crt, both
expand            on, off
brightness        PERCENT
volume            PERCENT
mute              on, off
ac_power          connected, disconnected
powermgt_ac       high, auto, manual
powermgt_battery  high, auto, manual

    [EDIT]: Added code tags.  Rich
« Last Edit: September 16, 2020, 07:06:43 PM by Rich »

Offline GNUser

  • Hero Member
  • *****
  • Posts: 628
Re: acpid does not recognize Thinkpad's sleep button
« Reply #33 on: September 16, 2020, 08:29:32 PM »
Hi, Rich. I don't have /dev/input/by-id but I do have /dev/input/by-path. When I cat the keyboard file, I see output when I press various keys (see below) but I see no output with any of the special Fn+F? keys.

Code: [Select]
TCL:/dev/input/by-path$ sudo cat platform-i8042-serio-0-event-kbd
Õb_(ö9Õb_(ö9Õb_(ö Õb_ï9Õb_ï9Õb_ïÕb_be9Õb_be9Õb_be Õb_kÜ9Õb_kÜ9Õb_kÜÕb_ Ø=Õb_ Ø=Õb_ ØÕb_=Õb_=Õb_Õb_1
=Õb_1
=Õb_1
Õb_Â
    =Õb_Â
         =Õb_Â
               Õb_= Õb_= Õb_ Õb_1= Õb_1= Õb_1¬Õb_S×®¬Õb_S×r¬Õb_S×­Õb_إ®­Õb_إr­Õb_إ­Õb_jÛ
                                                                                        °­Õb_jÛ
                                                                                               s­Õb_jÛ

Hi, aus9. Thanks for the input (pun intended). I have never needed to install firmware for the Thinkpad keyboard in the past when using other OSes (Devuan, Arch Linux). I do not have the  tpb  utility installed in Devuan but I see that it's available in the repository. I'll give it a shot, but the information here (http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work) confirms your impression that this utility is useful for many special buttons but not for the button I need (the sleep button on Fn+F4).

Offline aus9

  • Sr. Member
  • ****
  • Posts: 262
Re: acpid does not recognize Thinkpad's sleep button
« Reply #34 on: September 16, 2020, 08:43:32 PM »
try
Code: [Select]
/dev/input/by-path$ sudo strings  platform-i8042-serio-0-event-kbd
« Last Edit: September 16, 2020, 08:52:17 PM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8113
Re: acpid does not recognize Thinkpad's sleep button
« Reply #35 on: September 16, 2020, 09:05:29 PM »
Hi aus9
That won't change anything. What GNUser posted is exactly what you will see if you look at the raw keyboard output.