Message boards : Questions and problems : GPU Computation Error when Sleeping [Ubuntu]
Message board moderation
Author | Message |
---|---|
Send message Joined: 6 Jul 14 Posts: 94 ![]() |
Whenever there is a task running on the GPU, and I suspend Ubuntu (sleep mode), the task always errors out upon waking up. The log says that the output file is absent, and the task is marked as computation error. If I suspend GPU work in the BOINC client before Ubuntu enters sleep mode, the task starts up again just fine when Ubuntu wakes up. Is there a way to keep this from happening, or to somehow signal BOINC to suspend GPU work just before Ubuntu enters sleep mode? |
![]() ![]() Send message Joined: 30 May 15 Posts: 265 ![]() |
Is there a way to keep this from happening, or to somehow signal BOINC to suspend GPU work just before Ubuntu enters sleep mode? See askubuntu.com for details. I would add a 20_boinc script with hibernate and suspend entries boinccmd --set_gpu_mode never and for thaw, resume boinccmd --set_gpu_mode auto You might need to add a small delay for boinc the actually shut down the GPU tasks, a few seconds at most. hth |
Send message Joined: 6 Jul 14 Posts: 94 ![]() |
Is there a way to keep this from happening, or to somehow signal BOINC to suspend GPU work just before Ubuntu enters sleep mode? This seems like the perfect solution, but the commands simply won't run. I've even tried to echo text into a file with the script, but it never runs. The file is owned by root, and has the same permissions as every other file in the folder, and I checked the syntax. What am I doing wrong? |
![]() Send message Joined: 29 Aug 05 Posts: 15633 ![]() |
The BOINC client must run to allow boincmd to do the commands to it. So make sure you run BOINC (boinc-client). But why not use the Compute only between N and N preferences you can set through the web site global computing preferences? That way you can tell BOINC to end calculations gracefully minutes before your sleep kicks in. Or are you saying that you put your computer to sleep before you leave the system? Perhaps that you then take the couple of seconds to set BOINC to suspend as well, or automate the sleep function and use the preferences of run only between... You can even add the Suspend when no mouse/keyboard input in last N minutes preference and and have the sleep function check for system idleness before going to sleep. |
Send message Joined: 6 Jul 14 Posts: 94 ![]() |
The BOINC client must run to allow boincmd to do the commands to it. So make sure you run BOINC (boinc-client). I have BOINC set up to only run when the system is idle. I wanted to save some power by letting the computer go into sleep mode after an hour or 2. Since GPU tasks error out after resuming from sleep mode, I was trying to resolve this. The "Suspend when no mouse/keyboard input in last N minutes" sounds like it would work, but I think a better solution for me might be to use "Compute only between N and N" and set up an automatic shutdown at night. Silly me, trying to save power and run CPU/GPU intensive applications at the same time... :) |
Send message Joined: 20 Nov 12 Posts: 801 ![]() |
Do you get anything in /var/log/pm-suspend.log? |
Send message Joined: 6 Jul 14 Posts: 94 ![]() |
Do you get anything in /var/log/pm-suspend.log? No such file or directory. I suppose I should have mentioned my version. I'm currently running on Ubuntu 16.10, and I've heard that some configs are a little different in systemd. |
![]() ![]() Send message Joined: 30 May 15 Posts: 265 ![]() |
Do you get anything in /var/log/pm-suspend.log? Need to keep an eye on pm-utils bug You don't say exactly how you are "sleeping" - can you be specific? Have you tried sleeping / hibernating via the command line sudo pm-hibernate ? |
Send message Joined: 20 Nov 12 Posts: 801 ![]() |
On openSUSE 42.1, systemd-sleep(8) points to /usr/lib/systemd/system-sleep/ . Maybe pm-utils isn't even supposed to work any more with systemd. edit: I really hate Linux projects that don't bother to put a note on their homepage when the project is obsoleted by some other software. pm-utils has not had any code changes in the past six years and the web page was last updated three years ago. |
Send message Joined: 6 Jul 14 Posts: 94 ![]() |
Do you get anything in /var/log/pm-suspend.log? I've been suspending by clicking the gear icon in the top-right, and selecting "Suspend" just above "Shut Down..." The script works perfectly if I use "sudo pm-suspend," but my screen isn't locked when it wakes up. If I let the computer go into sleep by itself, it doesn't run the script. There is no system-sleep folder in /usr/lib/systemd/. I'll have to see if tasks error out or not when the computer goes into sleep by itself. I have to wait until tomorrow though, because a bunch of tasks couldn't initialize the GPU after resuming, and I hit a daily task limit. |
Send message Joined: 20 Nov 12 Posts: 801 ![]() |
There is no system-sleep folder in /usr/lib/systemd/. Turns out it's /lib/systemd/system-sleep/ in Ubuntu. |
![]() ![]() Send message Joined: 30 May 15 Posts: 265 ![]() |
There is no system-sleep folder in /usr/lib/systemd/. ... and an example hibernate and systemd - ignore the second comment, as we have just found pm-utils just been systemd'd... annoying. It would not take a lot of effort to update the man pages of for pm-utils etc, to point out these have been deprecated. |
Send message Joined: 6 Jul 14 Posts: 94 ![]() |
Thank you both for your help! After putting the script in the systemd folder, everything is working as it should. |
Copyright © 2025 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.