Cuda device initialisation failed after sleep/hibernate

Questions and Answers : GPU applications : Cuda device initialisation failed after sleep/hibernate
Message board moderation

To post messages, you must log in.

AuthorMessage
darsie

Send message
Joined: 8 Nov 01
Posts: 7
Credit: 456,918
RAC: 9
Austria
Message 2029670 - Posted: 28 Jan 2020, 15:55:13 UTC

After sleeping my PC I get "Postponed: Cuda device initialisation failed". Rebooting cures it, but I don't want to do that. IIRC there's a "computation error" at first.

The card works fine with Kerbal Space Program and the xfce desktop during this condition.

debian/Linux 10/buster
nvidia GTX 750 Ti
core2 quad 3 GHz
ID: 2029670 · Report as offensive
darsie

Send message
Joined: 8 Nov 01
Posts: 7
Credit: 456,918
RAC: 9
Austria
Message 2031771 - Posted: 10 Feb 2020, 12:12:19 UTC - in response to Message 2029670.  
Last modified: 10 Feb 2020, 12:15:09 UTC

Looks like remnants of old graphics drivers was the issue.

I replaced my nvidia quadro fx 1800 with a GTX 750 Ti. To deinstall the old drivers I removed/purged the nvidia-legacy-340xx-driver, IIRC, which also removed a lot of packages it depended on. While doing an unrelated aptitude full-upgrade I noticed some 340xx packages were still there and would get upgraded, so I removed them and now CUDA works fine after sleep/hibernation.
ID: 2031771 · Report as offensive
darsie

Send message
Joined: 8 Nov 01
Posts: 7
Credit: 456,918
RAC: 9
Austria
Message 2033156 - Posted: 20 Feb 2020, 13:32:58 UTC
Last modified: 20 Feb 2020, 13:33:23 UTC

It's happening again. I also got "No usable GPU found" before. Reboot fixed it, till the next hibernate/sleep or so.
ID: 2033156 · Report as offensive
Profile Mr. Kevvy Crowdfunding Project Donor*Special Project $250 donor
Volunteer moderator
Volunteer tester
Avatar

Send message
Joined: 15 May 99
Posts: 3776
Credit: 1,114,826,392
RAC: 3,319
Canada
Message 2033166 - Posted: 20 Feb 2020, 14:32:23 UTC

Have you tried quitting BOINC before putting the system to sleep and restarting it when it wakes up? (If you are putting it to sleep manually of course...)
ID: 2033166 · Report as offensive
darsie

Send message
Joined: 8 Nov 01
Posts: 7
Credit: 456,918
RAC: 9
Austria
Message 2033516 - Posted: 22 Feb 2020, 12:40:16 UTC - in response to Message 2033166.  

I did now. That avoided the failure. Maybe I can do that in a sleep/hibernation/wakeup script.
ID: 2033516 · Report as offensive
Grant (SSSF)
Volunteer tester

Send message
Joined: 19 Aug 99
Posts: 13720
Credit: 208,696,464
RAC: 304
Australia
Message 2033581 - Posted: 22 Feb 2020, 22:19:11 UTC

Sounds like Seti is starting up again, but before the video driver has been revived.
Grant
Darwin NT
ID: 2033581 · Report as offensive
darsie

Send message
Joined: 8 Nov 01
Posts: 7
Credit: 456,918
RAC: 9
Austria
Message 2033608 - Posted: 23 Feb 2020, 1:46:00 UTC
Last modified: 23 Feb 2020, 1:50:58 UTC

I created the file /lib/systemd/system-sleep/boinc-client with this content:

#!/bin/sh

case $1 in
  pre)
    service boinc-client stop
    ;;
  post)
    service boinc-client start
    ;;
esac


Works so far.
See also man systemd-suspend.service.
Please reply to this thread when this hack is no longer needed. thx.
ID: 2033608 · Report as offensive

Questions and Answers : GPU applications : Cuda device initialisation failed after sleep/hibernate


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.