graysky2 / profile-sync-daemon

Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Other
910 stars 88 forks source link

Possible issue with system suspend/sleep #141

Closed lots0logs closed 8 years ago

lots0logs commented 9 years ago

I have been noticing lately that when my system is in sleep/suspend mode (or at least it appears to be) and then I wake it, it ends up in this weird limbo state. Everything seems like its working but their are a few quirks like, for example, the system journal isn't logging new messages. If I try to reboot or shutdown it acts like I put just it to sleep (indicated by the yellow light on the power button) Pressing the power button just gets me a blank screen that won't respond to anything so I have to hard power-off and then on again at which point it boots fine and everything is back to normal.

The journal doesn't really contain anything that confirms the issue to be caused by PSD but I have a feeling that its at least related. It's almost as though the system gets stuck in a state that is not quite completely suspended and the PSD timer syncs successfully every hour but nothing else is appears to be running.

Has anyone reported any similar issues with system sleep?

graysky2 commented 9 years ago

Psd is not sleep aware and there is nothing really running with psd (ie nothing stays in memory like sshd or the like). It just runs once on start up, rechecked hourly, and finally on shutdown. It is just a glorified/intelligent rsync script. I highly doubt your problems are related. Do the control experiment: disable psd and use the machine for a week or so. Do you see the same symptoms?

lots0logs commented 9 years ago

Shouldnt the script be sleep aware though? I mean shouldnt it perform the same tasks it does before shutdown before the system goes to sleep as well?

graysky2 commented 9 years ago

Hmmm... my initial thought was no but I suppose a crash could occur into or out of sleep... I think it's as easy as adding a suspend or hibernate target to the services, but I need to read up on that.

lots0logs commented 9 years ago

That's what I was thinking. I'll try to read up on it tonight and let you know what I come up with!

graysky2 commented 9 years ago

...I haven't found must useful into that applies to user units (there are targets for system units) but this seems to be an upstream gap for user units.

lots0logs commented 9 years ago

@graysky2 Sorry for the delay, work has been crazy busy. Anyway, I just want to let you know that I have been using these changes without a single issue since my last comment. There's no indication of the configuration being incorrect, nothing in the logs and no problems with PSD's functionality.

graysky2 commented 9 years ago

Thanks for the report back. Before I start testing on my own, can you confirm that when you stop psd (systemctl --user stop psd.service) that your sleep service also stops?

lots0logs commented 9 years ago

No, it does not BUT that's intentional. We don't want it to stop/start with psd.service. We only want it to be enabled/disabled when psd.service is enabled/disabled. psd-sleep.service should not be stopped/started directly. It gets stopped/started by systemd when the system sleeps/wakes.

graysky2 commented 9 years ago

Official word from Lennart is can't do from a shell script: http://lists.freedesktop.org/archives/systemd-devel/2015-November/034781.html

lots0logs commented 9 years ago

@graysky2 My logs seem to show that it is working properly. It might have been better to have him look at the service files so he could see exactly what you were asking about. :pensive:

graysky2 commented 9 years ago

Would you mind posting it to the ML? Up to my neck in shit to do right now :anguished: