1.5 KiB
1.5 KiB
Lenovo ideapad 510
Prevent suspend when lid closed
Add a new file:
nvim /etc/systemd/logind.conf.d/no-suspend-on-lid.conf
Add this:
[Login]
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
systemctl restart systemd-logind
Wake-on-lan
See my network interfaces:
ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 54:e1:ad:9d:a8:74 brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
link/ether 52:37:c4:2c:79:38 brd ff:ff:ff:ff:ff:ff permaddr 3c:f8:62:b3:7f:81
Enable for the ethernet
ethtool -s enp1s0 wol g
Make it pemanent. Create a systemd unit:
nvim /etc/systemd/system/wol.service
[Unit]
Description=Wake-on-LAN
Requires=network.target
After=network.target
[Service]
ExecStart=/usr/sbin/ethtool -s enp1s0 wol g
Type=oneshot
[Install]
WantedBy=multi-user.target
systemctl enable wol.service
Check it:
systemctl start wol.service
systemctl status wol.service
Suspend the laptop:
systemctl suspend
Wake it up again from another machine:
wakeonlan 54:e1:ad:9d:a8:74