Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Discussion about suspend-resume problems n solutions.

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Discussion about suspend-resume problems n solutions.

#1 Post by Deb-fan »

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.

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
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. :D
Most powerful FREE tech-support tool on the planet * HERE. *

tdave
Posts: 17
Joined: 2020-08-30 23:08

Re: Discussion about suspend-resume problems n solutions.

#2 Post by tdave »

when my system goes to sleep I have to log out then log back in before I can get to desktop. could not get linux to stop going to sleep so I think my laptop does it. I could not stop sleep function with windows either. If you have any sugestions please offer.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Discussion about suspend-resume problems n solutions.

#3 Post by Head_on_a_Stick »

tdave wrote:could not get linux to stop going to sleep
https://wiki.debian.org/Suspend#Disable ... ibernation
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Discussion about suspend-resume problems n solutions.

#4 Post by Deb-fan »

Would definitely suggest you look over the resource Head_on was nice enough to provide. Though yes, if it's 100% certain an issue is centered around suspend + resuming, then a sure fire fix would have to be taking suspend/resume out of the equation. Not really the best of solutions, as it's totally reasonable that peoples computers should be able to successfully suspend ... Totally eliminating suspend + resume capability on a given system is a dirty, lazy persons hack. May be perfectly acceptable for a given person/usecase too though.

Another brilliant suggestion, send me your pc, with at least a reasonably detailed description of what you want done, I'll get er done for you and send the thing back. You pay shipping both ways and an "alcohol surcharge" though. If history proves nothing it shows that I tend to do some of my best work while extremely intoxicated. :D

For real this thread is not intended as an ongoing help thread for all problems suspend/resume or gnu/Nix power management problems related. There's just wayyyyy too much to that. Case by case basis type of thing. The idea here was-is to solicit information from nixers on the forum who've encountered such problems, found solutions and might be willing to share what they learned for the benefit of others. So hopefully some folks do take notice and post some info. Something relevant, entertaining or whatever else which could be useful. :)

Ps, though errrr judging from the overwhelming response so far, it's looking kinda doubtful. If you do find a working solution, even if it's just getting rid of suspend altogether, perhaps post something about it, the process, your system specs, software desktop, display manager etc etc etc ? Ah no matter, still a couple tidbits in the thread. The /lib/systemd/system-sleep thing is pretty cool and interesting and link Head_on posted too.
Most powerful FREE tech-support tool on the planet * HERE. *

tdave
Posts: 17
Joined: 2020-08-30 23:08

Re: Discussion about suspend-resume problems n solutions.

#5 Post by tdave »

Thanks for the info. I ran the command to shut off the suspend/sleep feature since it is one i don't need but bookmarked the page so I could run the debug feature it told about when I have more time. maybe i can find out what is happening. so thank you..

tdave
Posts: 17
Joined: 2020-08-30 23:08

Re: Discussion about suspend-resume problems n solutions.

#6 Post by tdave »

you fixed my problem it seems. I still go into sleep mode but I have no problems logging back in. Sleep-suspend is built into this laptop but stopping it in the os has stopped the problems I had getting back my display. thank you.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Discussion about suspend-resume problems n solutions.

#7 Post by Deb-fan »

Also nother suggestion, start a help request thread in the appropriate section of the forum. Do include the basic info people are going to need about your system , hardware specs and overview of software you're using. Which OS/version, kernel, desktop etc. All of that info is easily discovered. So help people to help you. Fact that just logging in/out fixes it, suggests its something simple, easy to resolve. :)
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Discussion about suspend-resume problems n solutions.

#8 Post by Deb-fan »

Wanted to pop this link up, https://bbs.archlinux.org/viewtopic.php?id=252030 specifically taking about what Arch user @Ropid shares, such things and coupled with use of /lib/systemd/system-sleep no doubt could resolve many nixers suspend-resume problems. Think it's interesting/cool junk to know regardless, so shared. :)

Ps, while yep some of that is Arch specific (pacman logs blahblah), the general idea he used is cool, its also a somewhat big hammer approach though should/could work fine for many things anyway.
Most powerful FREE tech-support tool on the planet * HERE. *

Post Reply