
昨天,在 ThinkPad Edge E520-1143B 筆記型電腦上,我按照以下兩個指南從 Debian 9 (Stretch) 升級到 Debian 10 (Buster):
https://wiki.debian.org/DebianUpgrade
https://linuxconfig.org/how-to-upgrade-debian-9-stretch-to-debian-10-buster
升級完成,但我現在遇到一些意外的行為...
Debian 9 系統運作得非常順利。它的魅力之一是簡單的“當蓋子關閉時關閉螢幕”。這不再起作用了...
我記得在升級過程中,我被提示是否要保持個人化/etc/systemd/logind.conf
或取得開發人員的個人化設定。我選擇保留個人化的,希望蓋子開關能像以前一樣運作。
那麼,我要怎麼恢復這個功能呢?
這是我的實際情況/etc/systemd/logind.conf
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=ignore
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%
我嘗試過註釋和取消註釋這些行並執行操作,# systemctl restart systemd-logind.service
但蓋子開關似乎沒有任何作用。
# udevadm monitor
當我關閉並打開蓋子時留下空輸出。 (這可能是監控蓋子開關的錯誤方法嗎?)
從# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input2
U: Uniq=
H: Handlers=event1
B: PROP=0
B: EV=21
B: SW=1
我安裝libinput-tools
運行libinput debug-events
.輸出不記錄任何蓋子開關事件。
我知道我可以透過全新安裝來解決這個問題,但這不是我現在想要的方式。