WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] acpid does not recognize Thinkpad's sleep button  (Read 13244 times)

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1343
[Solved] acpid does not recognize Thinkpad's sleep button
« on: September 15, 2020, 06:42:39 PM »
I'm running TCL11.1 64-bit on my Thinkpad X200. The  thinkpad-acpi-5.4.3-tinycore64.tcz  extension is loaded. The  acpid.tcz  extension is also loaded.

acpi_listen shows output I press the volume buttons, battery button (Fn + F3) and various other buttons, but shows no output at all when I press the sleep button (Fn + F4):

Code: [Select]
$ sudo /usr/local/etc/init.d/acpid start
$ sudo acpi_listen
button/volumeup VOLUP 00000080 00000000 K
button/volumedown VOLDN 00000080 00000000 K
button/battery BAT 00000080 00000000 K

Is there a special boot code or an additional extension that's required for acpid to recognize the sleep button?
« Last Edit: November 20, 2020, 09:10:13 AM by Rich »

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1343
Re: acpid does not recognize Thinkpad's sleep button
« Reply #1 on: September 15, 2020, 07:54:04 PM »
Could X or libinput be to blame? xev generates output when battery key (Fn + F3) is pressed, but no output when sleep key (Fn + F4) is pressed:

Code: [Select]
$ xev
---snip---
KeyPress event, serial 36, synthetic NO, window 0x3200001,
    root 0xc8, subw 0x0, time 546887, (54,134), root:(1155,186),
    state 0x0, keycode 244 (keysym 0x1008ff93, XF86Battery), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x3200001,
    root 0xc8, subw 0x0, time 546887, (54,134), root:(1155,186),
    state 0x0, keycode 244 (keysym 0x1008ff93, XF86Battery), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

I'm running Xorg-7.7.
« Last Edit: September 15, 2020, 07:56:10 PM by GNUser »

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 388
Re: acpid does not recognize Thinkpad's sleep button
« Reply #2 on: September 15, 2020, 08:10:10 PM »
I am not familiar with this but from the corebook.pdf, use "laptop" boot code.

tinycorelinux

  • Guest
Re: acpid does not recognize Thinkpad's sleep button
« Reply #3 on: September 15, 2020, 08:17:55 PM »
Hi GNUser!
I've never used an extension like  thinkpad-acpi-5.4.3-tinycore64.tcz, so I can only talk about my method, which may be helpful to you.
You can map the following code to your shortcut keys (for example, Fn + F4) to do the same.
That's what I do. All these functions can be implemented in this way.
Code: [Select]
echo -n mem > /sys/power/state
« Last Edit: September 15, 2020, 08:28:46 PM by ONE »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: acpid does not recognize Thinkpad's sleep button
« Reply #4 on: September 15, 2020, 11:30:50 PM »
Those special buttons are very machine-dependant, try looking at thinkwiki or thinkpad forums how other distros detect that on that specific model.
The only barriers that can stop you are the ones you create yourself.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 388
Re: acpid does not recognize Thinkpad's sleep button
« Reply #5 on: September 16, 2020, 02:19:37 AM »
This is my way of doing it :
1. Start xev for listening inputs.
2. Press the Fn+F4 and then hit Ctrl+C.
3. Look at the keycode of the pressed key and add it to ~/xinitrc and the command too.
I generally use it to control volume of pulseaudio with External Buttons.
From here
https://wiki.archlinux.org/index.php/Xbindkeys

I think this may work too :
https://wiki.gentoo.org/wiki/ACPI/ThinkPad-special-buttons
.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1343
Re: acpid does not recognize Thinkpad's sleep button
« Reply #6 on: September 16, 2020, 05:41:29 AM »
Hello, all. Thanks for your input. The "laptop" boot code did not help. xev shows no output whatsoever when I press Fn+F4 while running TCL.

When I repeat the exercise in my OP in a console, results are the same. This rules out an X or libinput issue.

When I boot into a different OS on same machine, Fn+F4 is detected just fine. So it's not a hardware (defective keyboard/button) issue.

I think the issue is either: a) Fn+F4 keypress is not producing a scancode in TCL or b) kernel's keymap does not have the relevant scancode mapped to the appropriate keycode (KEY_SLEEP). Alas, I'm not sure how to prove or fix either one.

« Last Edit: September 16, 2020, 05:43:11 AM by GNUser »

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1343
Re: acpid does not recognize Thinkpad's sleep button
« Reply #7 on: September 16, 2020, 06:05:03 AM »
I used the  showkey  utility in both Devuan and TCL11.

In Devuan, pressing Fn+F4 produces scancode 0xe0 0xf5 and keycode 142.
In TCL, pressing Fn+F4 produces neither a scancode nor a keycode.

I guess this means the kernel in TCL is not detecting the keypress at all, right? If this can be sorted out, it will take someone more knowledgeable than I am.
« Last Edit: September 16, 2020, 06:17:43 AM by GNUser »

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1343
Re: acpid does not recognize Thinkpad's sleep button
« Reply #8 on: September 16, 2020, 06:47:32 AM »
juanito - I see that the acpid extension for TCL11 is a bit old (version 2.0.23 from 2015). Would you like me to submit an updated extension? You are the maintainer.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: acpid does not recognize Thinkpad's sleep button
« Reply #9 on: September 16, 2020, 07:50:54 AM »
HI GNUser
Do you have a  /proc/acpi/ibm/hotkey  file? Try echoing  0xffffffff  into it as root and see if it generates an event then.

Does this list any  parm:  fields that may be useful:
Code: [Select]
modinfo thinkpad_acpi
Check for differences in Devuan for:
Code: [Select]
lsmod
cat /proc/cmdline

Maybe a search of  sysfs  for  *think*, *hotkey*, or *sleep*  turns up a clue:
Code: [Select]
sudo find /sys -iname *hotkey*
The kernel source tree has Documentation/laptops/thinkpad-acpi.txt. It's a bit dated but may be of use.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1343
Re: acpid does not recognize Thinkpad's sleep button
« Reply #10 on: September 16, 2020, 08:21:00 AM »
Hi, Rich. Yes, when the  thinkpad-acpi-KERNEL.tcz  extension is loaded, the file  /proc/acpi/ibm/hotkey  exists. Echoing that value to it does not help things.

modinfo thinkpad_acpi does not hit me over the head with an obviously helpful parameter:
Code: [Select]
TCL11$ modinfo thinkpad_acpi
filename:       /lib/modules/5.4.3-tinycore64/kernel.tclocal/drivers/platform/x86/thinkpad_acpi.ko.gz
author:         Henrique de Moraes Holschuh <hmh@hmh.eng.br>
author:         Borislav Deianov <borislav@users.sf.net>
description:    ThinkPad ACPI Extras
license:        GPL
parm:           fan:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           volume:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           brightness:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           beep:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           led:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           cmos:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           light:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           video:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           bluetooth:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           hotkey:Simulates thinkpad-acpi procfs command at module load, see documentation
parm:           enable:Enable the ALSA interface for the ACPI EC Mixer
parm:           id:ALSA id for the ACPI EC Mixer
parm:           index:ALSA index for the ACPI EC Mixer
parm:           software_mute:Request full software mute control
parm:           volume_control:Enables software override for the console audio control when true
parm:           volume_capabilities:Selects the mixer capabilities: 0=auto, 1=volume and mute, 2=mute only
parm:           volume_mode:Selects volume control strategy: 0=auto, 1=EC, 2=N/A, 3=EC+NVRAM
parm:           brightness_enable:Enables backlight control when 1, disables when 0
parm:           brightness_mode:Selects brightness control strategy: 0=auto, 1=EC, 2=UCMS, 3=EC+NVRAM
parm:           fan_control:Enables setting fan parameters features when true
parm:           force_load:Attempts to load the driver even on a mis-identified ThinkPad when true
parm:           debug:Sets debug level bit-mask
parm:           experimental:Enables experimental features when non-zero
version:        0.26
alias:          dmi:bvnIBM:bvrI[MU]ET??WW*
alias:          tpacpi
alias:          acpi*:LEN0268:*
alias:          acpi*:LEN0068:*
alias:          acpi*:IBM0068:*
srcversion:     244EE1C07B382DED86DB01C
depends:        snd,backlight,video,battery
intree:         Y
vermagic:       5.4.3-tinycore64 SMP mod_unload

Here's some output from my Devuan partition of this same machine:
Code: [Select]
Devuan$ lsmod
Module                  Size  Used by
iptable_filter         16384  0
ip_tables              24576  1 iptable_filter
ip6table_filter        16384  0
ip6_tables             28672  1 ip6table_filter
x_tables               40960  4 ip_tables,iptable_filter,ip6table_filter,ip6_tables
nfsd                  339968  2
auth_rpcgss            61440  1 nfsd
nfs_acl                16384  1 nfsd
nfs                   262144  0
lockd                  98304  2 nfsd,nfs
grace                  16384  2 nfsd,lockd
fscache                65536  1 nfs
sunrpc                339968  6 auth_rpcgss,nfsd,nfs_acl,lockd,nfs
parport_pc             45056  0
ppdev                  20480  0
lp                     20480  0
parport                49152  3 lp,parport_pc,ppdev
arc4                   16384  2
ath9k                 155648  0
ath9k_common           36864  1 ath9k
iTCO_wdt               16384  0
iTCO_vendor_support    16384  1 iTCO_wdt
ath9k_hw              471040  2 ath9k,ath9k_common
coretemp               16384  0
kvm_intel             155648  0
ath                    28672  3 ath9k_hw,ath9k,ath9k_common
mac80211              774144  1 ath9k
kvm                   585728  1 kvm_intel
snd_hda_codec_conexant    24576  1
irqbypass              16384  1 kvm
snd_hda_codec_generic    73728  1 snd_hda_codec_conexant
snd_hda_intel          40960  3
input_leds             16384  0
serio_raw              16384  0
snd_hda_codec         126976  3 snd_hda_intel,snd_hda_codec_conexant,snd_hda_codec_generic
pcspkr                 16384  0
cfg80211              614400  4 mac80211,ath9k,ath,ath9k_common
snd_hda_core           81920  4 snd_hda_intel,snd_hda_codec_conexant,snd_hda_codec,snd_hda_codec_generic
snd_hwdep              16384  1 snd_hda_codec
lpc_ich                24576  0
snd_pcm               102400  3 snd_hda_intel,snd_hda_codec,snd_hda_core
thinkpad_acpi          90112  0
shpchp                 36864  0
snd_timer              32768  1 snd_pcm
nvram                  16384  1 thinkpad_acpi
snd                    81920  14 snd_hda_intel,snd_hwdep,snd_hda_codec_conexant,snd_hda_codec,snd_timer,thinkpad_acpi,snd_hda_codec_generic,snd_pcm
soundcore              16384  1 snd
mac_hid                16384  0
i915                 1671168  3
i2c_algo_bit           16384  1 i915
drm_kms_helper        167936  1 i915
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
e1000e                241664  0
fb_sys_fops            16384  1 drm_kms_helper
i2c_i801               28672  0
ahci                   36864  3
drm                   397312  5 i915,drm_kms_helper
libahci                32768  1 ahci
psmouse               139264  0
ptp                    20480  1 e1000e
pps_core               20480  1 ptp
video                  40960  2 thinkpad_acpi,i915

Devuan$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz root=/dev/sda1 quiet

Devuan$ sudo find /sys -iname '*hotkey*'
/sys/devices/platform/thinkpad_acpi/hotkey_recommended_mask
/sys/devices/platform/thinkpad_acpi/hotkey_source_mask
/sys/devices/platform/thinkpad_acpi/hotkey_bios_mask
/sys/devices/platform/thinkpad_acpi/hotkey_enable
/sys/devices/platform/thinkpad_acpi/hotkey_all_mask
/sys/devices/platform/thinkpad_acpi/hotkey_mask
/sys/devices/platform/thinkpad_acpi/hotkey_bios_enabled
/sys/devices/platform/thinkpad_acpi/hotkey_poll_freq
/sys/devices/platform/thinkpad_acpi/hotkey_adaptive_all_mask
/sys/bus/acpi/drivers/thinkpad_hotkey

Devuan$ sudo find /sys -iname '*think*'
/sys/devices/platform/thinkpad_hwmon
/sys/devices/platform/thinkpad_acpi
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinkvantage
/sys/class/leds/tpacpi::thinkvantage
/sys/bus/platform/devices/thinkpad_hwmon
/sys/bus/platform/devices/thinkpad_acpi
/sys/bus/platform/drivers/thinkpad_hwmon
/sys/bus/platform/drivers/thinkpad_hwmon/thinkpad_hwmon
/sys/bus/platform/drivers/thinkpad_acpi
/sys/bus/platform/drivers/thinkpad_acpi/thinkpad_acpi
/sys/bus/acpi/drivers/thinkpad_hotkey
/sys/module/nvram/holders/thinkpad_acpi
/sys/module/video/holders/thinkpad_acpi
/sys/module/thinkpad_acpi
/sys/module/thinkpad_acpi/drivers/platform:thinkpad_hwmon
/sys/module/thinkpad_acpi/drivers/platform:thinkpad_acpi
/sys/module/snd/holders/thinkpad_acpi

Devuan$ sudo find /sys -iname '*sleep*'
/sys/kernel/mm/transparent_hugepage/khugepaged/scan_sleep_millisecs
/sys/kernel/mm/transparent_hugepage/khugepaged/alloc_sleep_millisecs
/sys/kernel/mm/ksm/sleep_millisecs
/sys/power/mem_sleep

Devuan$ lsmod
Module                  Size  Used by
iptable_filter         16384  0
ip_tables              24576  1 iptable_filter
ip6table_filter        16384  0
ip6_tables             28672  1 ip6table_filter
x_tables               40960  4 ip_tables,iptable_filter,ip6table_filter,ip6_tables
nfsd                  339968  2
auth_rpcgss            61440  1 nfsd
nfs_acl                16384  1 nfsd
nfs                   262144  0
lockd                  98304  2 nfsd,nfs
grace                  16384  2 nfsd,lockd
fscache                65536  1 nfs
sunrpc                339968  6 auth_rpcgss,nfsd,nfs_acl,lockd,nfs
parport_pc             45056  0
ppdev                  20480  0
lp                     20480  0
parport                49152  3 lp,parport_pc,ppdev
arc4                   16384  2
ath9k                 155648  0
ath9k_common           36864  1 ath9k
iTCO_wdt               16384  0
iTCO_vendor_support    16384  1 iTCO_wdt
ath9k_hw              471040  2 ath9k,ath9k_common
coretemp               16384  0
kvm_intel             155648  0
ath                    28672  3 ath9k_hw,ath9k,ath9k_common
mac80211              774144  1 ath9k
kvm                   585728  1 kvm_intel
snd_hda_codec_conexant    24576  1
irqbypass              16384  1 kvm
snd_hda_codec_generic    73728  1 snd_hda_codec_conexant
snd_hda_intel          40960  3
input_leds             16384  0
serio_raw              16384  0
snd_hda_codec         126976  3 snd_hda_intel,snd_hda_codec_conexant,snd_hda_codec_generic
pcspkr                 16384  0
cfg80211              614400  4 mac80211,ath9k,ath,ath9k_common
snd_hda_core           81920  4 snd_hda_intel,snd_hda_codec_conexant,snd_hda_codec,snd_hda_codec_generic
snd_hwdep              16384  1 snd_hda_codec
lpc_ich                24576  0
snd_pcm               102400  3 snd_hda_intel,snd_hda_codec,snd_hda_core
thinkpad_acpi          90112  0
shpchp                 36864  0
snd_timer              32768  1 snd_pcm
nvram                  16384  1 thinkpad_acpi
snd                    81920  14 snd_hda_intel,snd_hwdep,snd_hda_codec_conexant,snd_hda_codec,snd_timer,thinkpad_acpi,snd_hda_codec_generic,snd_pcm
soundcore              16384  1 snd
mac_hid                16384  0
i915                 1671168  3
i2c_algo_bit           16384  1 i915
drm_kms_helper        167936  1 i915
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
e1000e                241664  0
fb_sys_fops            16384  1 drm_kms_helper
i2c_i801               28672  0
ahci                   36864  3
drm                   397312  5 i915,drm_kms_helper
libahci                32768  1 ahci
psmouse               139264  0
ptp                    20480  1 e1000e
pps_core               20480  1 ptp
video                  40960  2 thinkpad_acpi,i915

Here's ouput of same commands when running TCL:
Code: [Select]
TCL11$ lsmod
Module                  Size  Used by    Tainted: G 
iptable_mangle         12288  1
iptable_raw            12288  1
xt_connmark            12288  4
nf_conntrack           69632  1 xt_connmark
nf_defrag_ipv4         12288  1 nf_conntrack
xt_mark                12288  2
ip6table_mangle        12288  1
xt_comment             12288  6
xt_addrtype            12288  2
ip6table_raw           12288  1
ip6_tables             24576  2 ip6table_mangle,ip6table_raw
ath9k                  73728  0
mac80211              274432  1 ath9k
ath9k_common           12288  1 ath9k
ath9k_hw              376832  2 ath9k,ath9k_common
ath                    28672  3 ath9k,ath9k_common,ath9k_hw
cfg80211              208896  4 ath9k,mac80211,ath9k_common,ath
cpufreq_userspace      12288  0
cpufreq_powersave      12288  0
cpufreq_conservative    12288  0
wireguard             184320  0
ipv6                  286720 16 ip6table_mangle,wireguard,[permanent]
nf_defrag_ipv6         12288  2 nf_conntrack,ipv6
i915                 1093632  3
thinkpad_acpi          57344  0
i2c_i801               16384  0
snd_hda_codec_conexant    16384  1
snd_hda_codec_generic    45056  1 snd_hda_codec_conexant
snd_hda_intel          24576  0
snd_hda_codec          61440  3 snd_hda_codec_conexant,snd_hda_codec_generic,snd_hda_intel
drm_kms_helper         98304  1 i915
snd_hda_core           36864  4 snd_hda_codec_conexant,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec
snd_hwdep              12288  1 snd_hda_codec
snd_intel_nhlt         12288  1 snd_hda_intel
snd_pcm                57344  3 snd_hda_intel,snd_hda_codec,snd_hda_core
intel_agp              16384  0
snd_timer              24576  1 snd_pcm
drm                   282624  5 i915,drm_kms_helper
snd                    45056  8 thinkpad_acpi,snd_hda_codec_conexant,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore              12288  1 snd
intel_gtt              16384  2 i915,intel_agp
agpgart                28672  3 intel_agp,drm,intel_gtt
i2c_algo_bit           12288  1 i915
squashfs               32768 166
zstd_decompress        65536  1 squashfs
battery                16384  1 thinkpad_acpi
ac                     12288  0
video                  32768  2 i915,thinkpad_acpi
backlight              12288  3 i915,thinkpad_acpi,video
xhci_pci               12288  0
xhci_hcd               94208  1 xhci_pci
acpi_cpufreq           12288  1
lpc_ich                20480  0
e1000e                126976  0
loop                   20480 332

TCL11$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz64 tce=sda3 opt=sda3 tz=EST+5EDT,M3.2.0/2,M11.1.0/2 syslog lang=en_US.UTF-8 user=bruno loglevel=0 host=x200 blacklist=pcspkr

TCL11$ sudo find /sys -iname '*hotkey*'
/sys/devices/platform/thinkpad_acpi/hotkey_bios_mask
/sys/devices/platform/thinkpad_acpi/hotkey_all_mask
/sys/devices/platform/thinkpad_acpi/hotkey_adaptive_all_mask
/sys/devices/platform/thinkpad_acpi/hotkey_mask
/sys/devices/platform/thinkpad_acpi/hotkey_recommended_mask
/sys/devices/platform/thinkpad_acpi/hotkey_source_mask
/sys/devices/platform/thinkpad_acpi/hotkey_bios_enabled
/sys/devices/platform/thinkpad_acpi/hotkey_poll_freq
/sys/devices/platform/thinkpad_acpi/hotkey_enable
/sys/bus/acpi/drivers/thinkpad_hotkey

TCL11$ sudo find /sys -iname '*think*'
/sys/class/leds/tpacpi::thinkvantage
/sys/devices/platform/thinkpad_hwmon
/sys/devices/platform/thinkpad_acpi
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinkvantage
/sys/bus/platform/devices/thinkpad_hwmon
/sys/bus/platform/devices/thinkpad_acpi
/sys/bus/platform/drivers/thinkpad_hwmon
/sys/bus/platform/drivers/thinkpad_hwmon/thinkpad_hwmon
/sys/bus/platform/drivers/thinkpad_acpi
/sys/bus/platform/drivers/thinkpad_acpi/thinkpad_acpi
/sys/bus/acpi/drivers/thinkpad_hotkey
/sys/module/battery/holders/thinkpad_acpi
/sys/module/video/holders/thinkpad_acpi
/sys/module/backlight/holders/thinkpad_acpi
/sys/module/thinkpad_acpi
/sys/module/thinkpad_acpi/drivers/platform:thinkpad_acpi
/sys/module/thinkpad_acpi/drivers/platform:thinkpad_hwmon
/sys/module/snd/holders/thinkpad_acpi
bruno@x200:~$ sudo find /sys -iname '*sleep*'
/sys/kernel/mm/transparent_hugepage/khugepaged/scan_sleep_millisecs
/sys/kernel/mm/transparent_hugepage/khugepaged/alloc_sleep_millisecs
/sys/kernel/mm/ksm/sleep_millisecs
/sys/power/mem_sleep
/sys/module/dvb_core/parameters/dvb_powerdown_on_sleep
/sys/module/acpi/parameters/sleep_no_lps0

BTW, the  thinkpad-acpi-KERNEL.tcz  extension does cause some of the special keys (e.g., Fn+F3 which is the battery key) to produce output in  xev  when otherwise there would be no output. So it seems that the  thinkpad-acpi-KERNEL.tcz  extension enables some special keys (e.g., Fn+F3) but not others (e.g., Fn+F4).





Offline GNUser

  • Hero Member
  • *****
  • Posts: 1343
Re: acpid does not recognize Thinkpad's sleep button
« Reply #11 on: September 16, 2020, 08:29:41 AM »
Hmmm, it seems that in Devuan at least, the  thinkpad_acpi  kernel module is not required for the sleep (Fn+F4) key to be detected.

Notice how in Devuan, even after removing the thinkpad_acpi module, xev can still detect the sleep key when I press it:

Code: [Select]
Devuan$ lsmod | grep think
thinkpad_acpi          90112  0
nvram                  16384  1 thinkpad_acpi
snd                    81920  14 snd_hda_intel,snd_hwdep,snd_hda_codec_conexant,snd_hda_codec,snd_timer,thinkpad_acpi,snd_hda_codec_generic,snd_pcm
video                  40960  2 thinkpad_acpi,i915

Devuan$ sudo modprobe -r thinkpad_acpi
Devuan$ lsmod | grep think
Devuan$ xev
---snip---
KeyPress event, serial 38, synthetic NO, window 0x3600001,
    root 0xb3, subw 0x0, time 49668, (172,89), root:(723,412),
    state 0x0, keycode 150 (keysym 0x1008ff2f, XF86Sleep), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False



Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: acpid does not recognize Thinkpad's sleep button
« Reply #12 on: September 16, 2020, 08:32:04 AM »
Would you like me to submit an updated extension?

Please go ahead.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1343
Re: acpid does not recognize Thinkpad's sleep button
« Reply #13 on: September 16, 2020, 08:57:47 AM »
Would you like me to submit an updated extension?

Please go ahead.
Done :)

P.S. The new extension is tested and working. It has more helpful terminal output than the old version. Also, I fixed a hardwired path in acpid.h ("/etc/acpi/events" changed to "/usr/local/etc/acpi/events"). My specific issue persists, of course, because it appears to be due to something missing in the kernel (or one of its modules) that is needed for the sleep key to be recognized at all.
« Last Edit: September 16, 2020, 09:06:50 AM by GNUser »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: acpid does not recognize Thinkpad's sleep button
« Reply #14 on: September 16, 2020, 09:09:18 AM »
HI GNUser
Maybe compare the contents of these files:
Code: [Select]
/sys/devices/platform/thinkpad_acpi/hotkey_bios_mask
/sys/devices/platform/thinkpad_acpi/hotkey_all_mask
/sys/devices/platform/thinkpad_acpi/hotkey_adaptive_all_mask
/sys/devices/platform/thinkpad_acpi/hotkey_mask
/sys/devices/platform/thinkpad_acpi/hotkey_recommended_mask
/sys/devices/platform/thinkpad_acpi/hotkey_source_mask
/sys/devices/platform/thinkpad_acpi/hotkey_bios_enabled
/sys/devices/platform/thinkpad_acpi/hotkey_poll_freq
/sys/devices/platform/thinkpad_acpi/hotkey_enable