Discussion about suspend-resume problems n solutions.
Posted: 2020-09-01 14:29
So I've seen plenty of people having issues after suspending-resuming their systems and wondering what people are doing to correct this themselves ? Do you have a networking issue, audio problem or whatever other type of suspend-resume related headaches ? What fix did you settle on to resolve it. Personally haven't as yet encountered this type of thing but clearly it's common enough. Most likely would go with running a script via key-combo, terminal alias, a systemd unit file or similar to address it at least somewhat smoothly or automagically.
Also while poking around came across something integrated into systemd, at the following location /lib/systemd/system-sleep apparently files in this directory which are executable "chmod +x /path/to/filename.sh" can be set to run whenever the system undergoes suspend(pre-post)resume, just now stumbled on this thing and don't know anything about it. Did notice on a Stretch install that has atop installed that there's a shell script named atop-pm in the above directory with the following contents.
Clearly stops and starts the atop service when this old laptop goes to sleep-wakesup. Outside of this no doubt other examples both good and bad to be found on this topic online. Still wondering what you folks have gone through dealing with this type of aggravation and how you solved it. Anyone care to outline what they went through, description of the problem you were having, give examples of working solutions, scripts, software or settings used to fix etc ?
Somewhat wondering how much of this as regards Debian is just yet more general pebcak, things like newish hardware, lacking firmware + need of kernel upgrade and so forth. Would think people might try one of the more out-of-box hardware friendly distro's such as Linux Mint or Ubuntu ... does the problem also occur while testing in these ?
Also don't overmuch care about suspend, seems only time I give a whit about the topic is watching other nixers struggling with something related to it but oh well. A clear cure all for suspend hassles would seem to be disabling whatever power management software, settings or config's which put the system to sleep at all and just call it good ? Though not an ideal resolution for people who want working suspend.
Also while poking around came across something integrated into systemd, at the following location /lib/systemd/system-sleep apparently files in this directory which are executable "chmod +x /path/to/filename.sh" can be set to run whenever the system undergoes suspend(pre-post)resume, just now stumbled on this thing and don't know anything about it. Did notice on a Stretch install that has atop installed that there's a shell script named atop-pm in the above directory with the following contents.
Code: Select all
#!/bin/bash
PATH=/sbin:/usr/sbin:/bin:/usr/bin
case "$1" in
pre) systemctl stop atop
exit 0
;;
post) systemctl start atop
exit 0
;;
*) exit 1
;;
esac
Somewhat wondering how much of this as regards Debian is just yet more general pebcak, things like newish hardware, lacking firmware + need of kernel upgrade and so forth. Would think people might try one of the more out-of-box hardware friendly distro's such as Linux Mint or Ubuntu ... does the problem also occur while testing in these ?
Also don't overmuch care about suspend, seems only time I give a whit about the topic is watching other nixers struggling with something related to it but oh well. A clear cure all for suspend hassles would seem to be disabling whatever power management software, settings or config's which put the system to sleep at all and just call it good ? Though not an ideal resolution for people who want working suspend.