WHAT FUN I HAD trying to get SLEEP to work on my media server.
I ran through at least 6 Linux Distros before I accepted it was a PC issue.
Then hours of forum searching finally pieced it together:
It was a random, specific issue, with my motherboard playing with Linux.
sudo nano /usr/local/bin/nogpp.sh
#!/bin/bash
declare -a devices=(GPP0 GPP8)
for device in "${devices[@]}"; do
if grep -qw ^$device.*enabled /proc/acpi/wakeup; then
sudo sh -c "echo $device > /proc/acpi/wakeup"
fi
done
sudo nano /etc/systemd/system/nogpp.service
[Unit]
Description=No GPP Wake
[Service]
Type=oneshot
ExecStart=/usr/local/bin/nogpp.sh
[Install]
WantedBy=default.target
sudo chmod 744 /usr/local/bin/nogpp.sh
sudo chmod 644 /etc/systemd/system/nogpp.service
sudo systemctl daemon-reload && systemctl enable nogpp.service
sudo systemctl status nogpp.service
nano /proc/acpi/wakeup
In short, motherboard bridge/device had specific conflict with Linux.
These helped during the resolution searching:
I don’t know how, but essentially a day was spent daisy-chaining searching until it came to an answer.
Prints system info if you need to troubleshoot
inxi -F
Command to sleep from terminal
sudo systemctl suspend
Checks sleep command report, look for errors
journalctl -b -u systemd-suspend.service
Lists sleep inhibitors
systemd-inhibit --list --mode=block
Lists devices that enable wake / prevent sleep
nano /proc/acpi/wakeup