修改 /etc/UPower/UPower.conf IgnoreLid=true
/etc/UPower/UPower.conf
IgnoreLid=true
/etc/systemd/logind.conf
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore