OpenCl does not survive suspend/resume cycle on nvidia graphics card

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
LateJunction
Level 4
Level 4
Posts: 212
Joined: Thu Jul 07, 2011 2:28 pm
Location: (Old) Hampshire, in UK

OpenCl does not survive suspend/resume cycle on nvidia graphics card

Post by LateJunction »

I know this is an old topic from many tears ago, but I am most surprised to see that the latest proprietary driver recommended in Mint 21.3, nvidia-driver-525 (version 525.78.01-0ubuntu0.22.04.1), still exhibits this defect. OpenCl is not available on my 1050GTX after a suspend/resume cycle - a scenario I use multiple times per day. clinfo, for example, reports no opencl platform available. Why hasn't nvidia fixed it yet?
Last edited by LockBot on Sat Jul 22, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
SMG
Level 25
Level 25
Posts: 31944
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: OpenCl does not survive suspend/resume cycle on nvidia graphics card

Post by SMG »

LateJunction wrote: Sun Jan 22, 2023 1:20 pm I know this is an old topic from many tears ago, but I am most surprised to see that the latest proprietary driver recommended in Mint 21.3, nvidia-driver-525 (version 525.78.01-0ubuntu0.22.04.1), still exhibits this defect.
Mint 21.3 does not yet exist. What version of Linux Mint are you running and what version of cuda-tools do you have installed?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
madsector
Level 1
Level 1
Posts: 5
Joined: Thu Apr 11, 2013 9:45 am

Re: OpenCl does not survive suspend/resume cycle on nvidia graphics card

Post by madsector »

Hi, I am having the same issue on Linux Mint 21.1 with Nvidia driver 525 installed. Suspend and wake-up works fine and OpenCL survives the suspend if no program is running that uses it (can check with clinfo), but if a program is opened that uses OpenCL, like Darktable, then after wake-up the OpenCL ability is inactive and Darktable falls back to CPU only (and clinfo shows no OpenCL device anymore).

I can reactivate OpenCL by closing Darktable and then use the following:

Code: Select all

sudo modprobe -r nvidia_uvm && sudo modprobe nvidia_uvm
In my case I had to disable the nvidia-suspend.service since I had trouble with resuming from sleep if a program using OpenCL was running, if no program was running sleep mode worked fine even with the service enabled.
madsector
Level 1
Level 1
Posts: 5
Joined: Thu Apr 11, 2013 9:45 am

Re: OpenCl does not survive suspend/resume cycle on nvidia graphics card

Post by madsector »

LateJunction wrote: Sun Jan 22, 2023 1:20 pm ...
Maybe in your case it is the same that the nvidia-suspend.service is disabled? Not sure how to check if it is disabled, but you can try activating it as a test with this command:

Code: Select all

sudo systemctl enable nvidia-suspend.service
In my case, when having the Nvidia service enabled and Darktable running, using the suspend option in the shutdown menu (equivalent to closing lid but with display visible) the PC shows status messages and then suspends fine, though recovery hangs after more status messages and I can only restart using Alt-Ctrl-Del (though switching to another prompt works and I can log in there).

If the Nvidia service is disabled I get no status messages during the sleep cycle and recovery works fine, even if Darktable is running, but then I get the behaviour as you descibed that OpenCL doesn't work after recovery.

Maybe worth a try to see how enabling the service fixes it for you?
Locked

Return to “Graphics Cards & Monitors”