29 lines
525 B
Markdown
29 lines
525 B
Markdown
```bash
|
|
|
|
sudo tee /etc/systemd/system/suspend-radios.service << 'EOF'
|
|
[Unit]
|
|
Description=Disable radios before suspend
|
|
Before=sleep.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/usr/sbin/rfkill block wifi bluetooth
|
|
ExecStop=/usr/sbin/rfkill unblock wifi bluetooth
|
|
|
|
[Install]
|
|
WantedBy=sleep.target
|
|
EOF
|
|
|
|
sudo systemctl enable suspend-radios.service
|
|
```
|
|
|
|
```bash
|
|
sudo mkdir -p /etc/systemd/sleep.conf.d
|
|
sudo tee /etc/systemd/sleep.conf.d/hibernate.conf << 'EOF'
|
|
[Sleep]
|
|
HibernateDelaySec=30min
|
|
EOF
|
|
|
|
sudo systemctl daemon-reload
|
|
```
|