acpid
/etc/acpi/
handler.shbutton/lid
自己增加命令
我的场景带了 hdmi 的判断
```
59 │ button/lid)
60 │ case "$3" in
61 │ close)
62 │ echo none > /sys/class/drm/card*-HDMI*/status
63 │ hdmi_active=$(cat /sys/class/drm/card*-HDMI*/status)
64 │ if [[ $hdmi_active == "disconnected" ]]
65 │ then
66 │ sleep 3 && systemctl suspend
67 │ logger 'eDP Connected'
68 │ else
69 │ logger 'Hdmi Connected'
70 │ fi
71 │ logger 'LID closed'
72 │ ;;
73 │ open)
74 │ logger 'LID opened'
75 │ ;;
76 │ *)
77 │ logger "ACPI action undefined: $3"
78 │ ;;
79 │ esac
80 │ ;;
```