Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running Ubuntu 10.04 and the gnome-do docky applet. For some reason every so often (sometimes after one, sometimes after several suspends) when I wake up from a suspend (I'm on a laptop, so every time I close the screen in-between my classes) gnome-do starts devouring the CPU. Trying to use the quit button on gnome-do doesn't work, I have to kill -1 the process.

Apparently it's been a problem for several people as there is at least one bug report. According to the bug report it's been fixed, but the release hasn't been pushed into the PPA. So my idea was to have the suspend script kill gnome-do automagically and then I'd just have to start it up again when I wake up (or set that in a wakeup script). Unfortunately my google-fu seems to fail me - I've found plenty of info about shutdown and logout, but nothing on suspend.

Any pointers? Thanks!

share|improve this question

4 Answers 4

up vote 3 down vote accepted

I believe you can put a shell script in /etc/pm/sleep.d/ which will be run on suspend/hibernate/resume/thaw. See the pm-suspend manpage for more information.

I'd also recommend trying gnome-do from trunk (bzr branch lp:do) and seeing if this fixes it. If so, we can look at getting a targetted fix in as an SRU.

share|improve this answer
    
I finally got around to installing from source. It told me that docky was now a standalone program? –  Wayne Werner Dec 7 '10 at 23:49
    
Right. I don't think this was a problem with the docky theme specifically though, so unless you plan on no longer using Do then please continue to try from source. –  Iain Lane Dec 9 '10 at 9:16

You could kill -s STOP <pid> before and kill -s CONT <pid> after. This will suspend and then resume the process giving absolutely no CPU cycles while the computer is starting to go to sleep and when it's waking up. It's a bit of a stretch but maybe it will work.

Combine it with Iain Lane's /etc/pm/sleep.d/ idea and you got a completely automated solution.

share|improve this answer

Put a script in /etc/pm/sleep.d/. The file name should start with an ordering number, 00-49 for user scripts, and you can differ between suspend and wakeup by an argument that will be passed to the script (for more details on both, see man pm-suspend).

When killing it, I suggest doing

(killall -1 gnome-do; exit 0)

in the script. Otherwise, if you try to suspend, and process gnome-do isn't running, the killall will exit with exit code 1, which will cancel the entire suspend. The above will run killall in a sub-shell that will exit with 0.

If you're having problems, check /var/log/pm-suspend.log that will log the attempt to run your script and possible problems.

share|improve this answer

The key is to run docky process in background with & command. Otherwise some other problems occur.

You can find full solution this page: http://www.linux-compatible.com/tutorial/docky-closes-after-waking-suspend-ubuntu

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.