# cat /etc/os-release
NAME=Slackware
VERSION="14.1"
ID=slackware
VERSION_ID=14.1
PRETTY_NAME="Slackware 14.1"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:slackware:slackware_linux:14.1"
HOME_URL="http://slackware.com/"
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
# cat /proc/bus/input/devices
I: Bus=0006 Vendor=0000 Product=0000 Version=0000
N: Name="Speakup"
P: Phys=speakup/input0
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=1000 0 0 0
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input1
U: Uniq=
H: Handlers=sysrq kbd event1
B: PROP=0
B: EV=120013
B: KEY=20000 0 20 0 0 0 0 500f 2100002 3803078 f900d401 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7
I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=3
B: KEY=4000 0 0 0 0
I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input3
U: Uniq=
H: Handlers=event3
B: PROP=0
B: EV=21
B: SW=1
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input4
U: Uniq=
H: Handlers=kbd event4
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0
I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input5
U: Uniq=
H: Handlers=kbd event5
B: PROP=0
B: EV=3
B: KEY=3e000b 0 0 0 0 0 0 0
I: Bus=0011 Vendor=0002 Product=0007 Version=25b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio4/input0
S: Sysfs=/devices/platform/i8042/serio4/input/input6
U: Uniq=
H: Handlers=mouse0 event6
B: PROP=1
B: EV=b
B: KEY=6420 0 30000 0 0 0 0 0 0 0 0
B: ABS=11000003
I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="HP WMI hotkeys"
P: Phys=wmi/input0
S: Sysfs=/devices/virtual/input/input7
U: Uniq=
H: Handlers=kbd event7
B: PROP=0
B: EV=33
B: KEY=40 0 0 0 10007 0 0 2100400 0 0 0 0
B: MSC=10
B: SW=22
# grep . /sys/devices/LNXSYSTM:00/device:00/*/input/input*/name
/sys/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input3/name:Lid Switch
/sys/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input2/name:Sleep Button
# grep . /sys/devices/LNXSYSTM:00/device:00/*/input/input*/capabilities/sw
/sys/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input3/capabilities/sw:1
/sys/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input2/capabilities/sw:0
# cat /proc/acpi/button/lid/C1E9/state
state: open
# grep -rH 'PNP0C0D:00/input/input3' /var/log
/var/log/messages:Mar 30 17:08:09 salixlive kernel: [ 12.282223] input: Lid Switch as /devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input3
/var/log/dmesg:[ 12.282223] input: Lid Switch as /devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input3
# cat /etc/acpi/acpi_handler.sh
#!/bin/sh
# Default acpi script that takes an entry for all actions
IFS=${IFS}/
set $@
case "$1" in
button)
case "$2" in
power) /sbin/init 0
;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
# cat /etc/acpi/events/default
# This is the ACPID default configuration, it takes all
# events and passes them to /etc/acpi/default.sh for further
# processing.
# event keeps a regular expression matching the event. To get
# power events only, just use something like "event=button power.*"
# to catch it.
# action keeps the command to be executed after an event occurs
# In case of the power event above, your entry may look this way:
#event=button power.*
#action=/sbin/init 0
# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.
event=.*
action=/etc/acpi/acpi_handler.sh %e
# ls -l /etc/acpi/acpi_handler.sh
-rwxr-xr-x 1 root root 314 июл 10 2013 /etc/acpi/acpi_handler.sh
# ls -l /etc/acpi/events/default
-rw-r--r-- 1 root root 635 июл 10 2013 /etc/acpi/events/default
# acpi_listen
thermal_zone TZ1 00000081 00000000
video C055 00000080 00000000
button/lid C1E9 00000080 00000001
thermal_zone TZ1 00000081 00000000
video C055 00000080 00000000
button/lid C1E9 00000080 00000002
thermal_zone TZ1 00000081 00000000
video C055 00000080 00000000
button/lid C1E9 00000080 00000003
# ls -l /lib/modules/$(uname -r)/kernel/drivers/acpi
итого 168
-rw-r--r-- 1 root root 7555 окт 24 2013 ac.ko
-rw-r--r-- 1 root root 3319 окт 24 2013 acpi_i2c.ko
-rw-r--r-- 1 root root 6306 окт 24 2013 acpi_ipmi.ko
-rw-r--r-- 1 root root 10027 окт 24 2013 acpi_pad.ko
drwxr-xr-x 1 root root 49 сен 23 2014 apei
-rw-r--r-- 1 root root 17180 окт 24 2013 battery.ko
-rw-r--r-- 1 root root 9316 окт 24 2013 button.ko
-rw-r--r-- 1 root root 4566 окт 24 2013 ec_sys.ko
-rw-r--r-- 1 root root 5127 окт 24 2013 fan.ko
-rw-r--r-- 1 root root 43117 окт 24 2013 processor.ko
-rw-r--r-- 1 root root 16155 окт 24 2013 sbs.ko
-rw-r--r-- 1 root root 7119 окт 24 2013 sbshc.ko
-rw-r--r-- 1 root root 15806 окт 24 2013 thermal.ko
-rw-r--r-- 1 root root 22905 окт 24 2013 video.ko
# modinfo button
filename: /lib/modules/3.10.17-smp/kernel/drivers/acpi/button.ko
license: GPL
description: ACPI Button Driver
author: Paul Diefenbaugh
alias: acpi*:LNXPWRBN:*
alias: acpi*:PNP0C0C:*
alias: acpi*:LNXSLPBN:*
alias: acpi*:PNP0C0E:*
alias: acpi*:PNP0C0D:*
depends:
intree: Y
vermagic: 3.10.17-smp SMP mod_unload PENTIUMIII
# lsmod|grep button
button 3704 1 i915
# lsmod|sort
Module Size Used by
ac 3403 0
ac97_bus 834 1 snd_ac97_codec
acpi_cpufreq 6310 0
agpgart 22075 3 drm,intel_agp,intel_gtt
b44 23779 0
battery 9591 0
bluetooth 192760 24 bnep,btusb,rfcomm
bnep 8661 2
btusb 13948 0
button 3704 1 i915
cfg80211 321151 2 libipw,ipw2200
cpufreq_ondemand 7199 1
drm 186279 3 i915,drm_kms_helper
drm_kms_helper 31358 1 i915
ehci_hcd 32261 1 ehci_pci
ehci_pci 2884 0
evdev 7552 8
fan 1965 0
firewire_core 44166 1 firewire_ohci
firewire_ohci 28780 0
freq_table 2176 3 cpufreq_ondemand,acpi_cpufreq,thermal_sys
fuse 59945 7
hp_wmi 6032 0
hwmon 1021 1 thermal_sys
i2c_algo_bit 4575 1 i915
i2c_core 17388 4 drm,i915,drm_kms_helper,i2c_algo_bit
i915 508710 2
intel_agp 8680 1 i915
intel_gtt 10512 3 i915,intel_agp
ipv6 246794 16
ipw2200 128548 0
joydev 7395 0
lib80211 2997 4 lib80211_crypt_ccmp,lib80211_crypt_tkip,libipw,ipw2200
lib80211_crypt_ccmp 3961 1
lib80211_crypt_tkip 6891 1
libipw 22256 1 ipw2200
loop 13468 12
lp 7199 0
lpc_ich 11413 0
microcode 8880 0
mii 3335 1 b44
mmc_core 78434 3 ssb,sdhci,sdhci_pci
mperf 919 1 acpi_cpufreq
ohci_hcd 20924 0
parport 25305 3 lp,ppdev,parport_pc
parport_pc 16728 0
pcmcia 30709 1 ssb
pcmcia_core 10252 3 pcmcia,pcmcia_rsrc,yenta_socket
pcmcia_rsrc 9184 1 yenta_socket
ppdev 4710 0
processor 24543 2 acpi_cpufreq
psmouse 72582 0
rfcomm 27214 8
rfkill 12610 5 cfg80211,hp_wmi,bluetooth
sdhci 22430 1 sdhci_pci
sdhci_pci 9552 0
serio_raw 3545 0
snd 44159 10 snd_ac97_codec,snd_intel8x0,snd_timer,snd_pcm
snd_ac97_codec 89231 1 snd_intel8x0
snd_intel8x0 23649 4
snd_page_alloc 6062 2 snd_intel8x0,snd_pcm
snd_pcm 62870 3 snd_ac97_codec,snd_intel8x0
snd_timer 14870 2 snd_pcm
soundcore 4318 1 snd
sparse_keymap 2542 1 hp_wmi
speedstep_lib 2471 0
squashfs 23196 6
ssb 45260 1 b44
thermal 7136 0
thermal_sys 19013 4 fan,video,thermal,processor
tifm_7xx1 3605 0
tifm_core 3761 1 tifm_7xx1
uhci_hcd 19872 0
usb_storage 35263 1
video 10142 1 i915
wmi 7059 1 hp_wmi
xhci_hcd 76900 0
yenta_socket 19023 0
# ls -1FR /etc/polkit-1/
/etc/polkit-1/:
localauthority/
localauthority.conf.d/
nullbackend.conf.d/
/etc/polkit-1/localauthority:
10-vendor.d/
20-org.d/
30-site.d/
50-local.d/
90-mandatory.d/
/etc/polkit-1/localauthority/10-vendor.d:
/etc/polkit-1/localauthority/20-org.d:
/etc/polkit-1/localauthority/30-site.d:
/etc/polkit-1/localauthority/50-local.d:
10-org.freedesktop.NetworkManager.pkla
20-plugdev-group-mount-override.pkla
/etc/polkit-1/localauthority/90-mandatory.d:
/etc/polkit-1/localauthority.conf.d:
50-localauthority.conf
/etc/polkit-1/nullbackend.conf.d:
50-nullbackend.conf