GPU Computation Error when Sleeping [Ubuntu]

Message boards : Questions and problems : GPU Computation Error when Sleeping [Ubuntu]
Message board moderation

To post messages, you must log in.

AuthorMessage
SuperSluether

Send message
Joined: 6 Jul 14
Posts: 94
United States
Message 73633 - Posted: 30 Oct 2016, 13:03:11 UTC
Last modified: 30 Oct 2016, 13:04:06 UTC

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?
ID: 73633 · Report as offensive
Profile Agentb
Avatar

Send message
Joined: 30 May 15
Posts: 265
United Kingdom
Message 73634 - Posted: 30 Oct 2016, 13:55:14 UTC - in response to Message 73633.  
Last modified: 30 Oct 2016, 13:58:05 UTC

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
ID: 73634 · Report as offensive
SuperSluether

Send message
Joined: 6 Jul 14
Posts: 94
United States
Message 73643 - Posted: 30 Oct 2016, 17:50:27 UTC - in response to Message 73634.  

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


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?
ID: 73643 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15480
Netherlands
Message 73644 - Posted: 30 Oct 2016, 18:07:41 UTC - in response to Message 73643.  

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.
ID: 73644 · Report as offensive
SuperSluether

Send message
Joined: 6 Jul 14
Posts: 94
United States
Message 73645 - Posted: 30 Oct 2016, 18:44:48 UTC - in response to Message 73644.  

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.


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... :)
ID: 73645 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73646 - Posted: 30 Oct 2016, 18:44:56 UTC - in response to Message 73643.  

Do you get anything in /var/log/pm-suspend.log?
ID: 73646 · Report as offensive
SuperSluether

Send message
Joined: 6 Jul 14
Posts: 94
United States
Message 73647 - Posted: 30 Oct 2016, 18:46:55 UTC - in response to Message 73646.  

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.
ID: 73647 · Report as offensive
Profile Agentb
Avatar

Send message
Joined: 30 May 15
Posts: 265
United Kingdom
Message 73648 - Posted: 30 Oct 2016, 19:34:19 UTC - in response to Message 73647.  

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.


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 ?
ID: 73648 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73649 - Posted: 30 Oct 2016, 19:42:09 UTC - in response to Message 73647.  
Last modified: 30 Oct 2016, 20:01:17 UTC

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.
ID: 73649 · Report as offensive
SuperSluether

Send message
Joined: 6 Jul 14
Posts: 94
United States
Message 73650 - Posted: 30 Oct 2016, 20:18:38 UTC - in response to Message 73648.  

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.


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 ?


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.
ID: 73650 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 73651 - Posted: 30 Oct 2016, 21:14:19 UTC - in response to Message 73650.  

There is no system-sleep folder in /usr/lib/systemd/.


Turns out it's /lib/systemd/system-sleep/ in Ubuntu.
ID: 73651 · Report as offensive
Profile Agentb
Avatar

Send message
Joined: 30 May 15
Posts: 265
United Kingdom
Message 73652 - Posted: 30 Oct 2016, 22:02:19 UTC - in response to Message 73651.  

There is no system-sleep folder in /usr/lib/systemd/.


Turns out it's /lib/systemd/system-sleep/ in Ubuntu.


... 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.
ID: 73652 · Report as offensive
SuperSluether

Send message
Joined: 6 Jul 14
Posts: 94
United States
Message 73653 - Posted: 30 Oct 2016, 23:23:23 UTC - in response to Message 73652.  

Thank you both for your help! After putting the script in the systemd folder, everything is working as it should.
ID: 73653 · Report as offensive

Message boards : Questions and problems : GPU Computation Error when Sleeping [Ubuntu]

Copyright © 2024 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.