Archive for the ‘Debian’ Category
ตัวอย่าง Network Interface – Debian 13.1
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp0s31f6
iface enp0s31f6 inet dhcp
#auto enp0s31f6
#iface enp0s31f6 inet static
# address 192.168.100.42
# netmask 255.255.255.0
# gateway 192.168.100.1
# dns-nameservers 8.8.8.8 1.1.1.1
Notebook- ปรับการตั้งค่า power ของระบบ (ไม่ให้ suspend เมื่อพับหน้าจอ)-Debian
ปัญหาที่เจอบน Debian/ThinkPad คือเวลาพับหน้าจอ ระบบจะเข้าสู่ suspend/hibernate ทำให้ SSH server หยุดทำงาน ทำให้ไม่สามารถเข้า SSH ได้
วิธีแก้
ปรับการตั้งค่า power ของระบบ (ไม่ให้ suspend เมื่อพับหน้าจอ)
แก้ไขไฟล์ logind configuration:
sudo nano /etc/systemd/logind.conf
หา (หรือเพิ่ม) บรรทัดเหล่านี้:
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
HandleLidSwitch=ignore → เมื่อพับฝา ไม่ทำ suspend
HandleLidSwitchDocked=ignore → ใช้เวลาเชื่อมต่อ docking station
รีสตาร์ท systemd-logind:
sudo systemctl restart systemd-logind
ทดสอบ: พับหน้าจอแล้วเครื่องยังคงทำงาน คุณยังสามารถ SSH เข้าได้