88 lines
No EOL
1.5 KiB
Markdown
88 lines
No EOL
1.5 KiB
Markdown
# Lenovo ideapad 510
|
|
|
|
## Prevent suspend when lid closed
|
|
|
|
Add a new file:
|
|
|
|
```sh
|
|
nvim /etc/systemd/logind.conf.d/no-suspend-on-lid.conf
|
|
```
|
|
|
|
Add this:
|
|
|
|
```
|
|
[Login]
|
|
HandleLidSwitch=ignore
|
|
HandleLidSwitchExternalPower=ignore
|
|
HandleLidSwitchDocked=ignore
|
|
```
|
|
|
|
```sh
|
|
systemctl restart systemd-logind
|
|
```
|
|
|
|
## Wake-on-lan
|
|
|
|
See my network interfaces:
|
|
|
|
```sh
|
|
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
|
|
|
|
```sh
|
|
ethtool -s enp1s0 wol g
|
|
```
|
|
|
|
Make it pemanent. Create a systemd unit:
|
|
|
|
```sh
|
|
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
|
|
```
|
|
|
|
```sh
|
|
systemctl enable wol.service
|
|
```
|
|
|
|
Check it:
|
|
|
|
```sh
|
|
systemctl start wol.service
|
|
systemctl status wol.service
|
|
```
|
|
|
|
Suspend the laptop:
|
|
|
|
```sh
|
|
systemctl suspend
|
|
```
|
|
|
|
Wake it up again from another machine:
|
|
|
|
```sh
|
|
wakeonlan 54:e1:ad:9d:a8:74
|
|
``` |