I am running Ubuntu 14.04 and have a Nvidia Geforce GTX 970.
I have successfully installed both the graphics card driver and the CUDA toolkit and have been using it successfully.
When I am actually using the graphics card as my display hardware as well, i.e. my monitor is plugged into my graphics card, this works without a problem.
I would however prefer to use my graphics card for GPU processing only and thus plug my monitor into my motherboard graphics card.
When I do this, however, it seems like I am unable to use my Geforce card and I get a CUDA error when I try to use the GPU.
Is this a known quirk?
I am sure it must be possible to use a GPU without it being plugged in?
It would probably be helpful to know exactly what error is reported if you try to run a CUDA sample code like deviceQuery (in the failing state).
My guess is that your motherboard detects the presence of a monitor attached to the on-board graphics and automatically disables the GPU plugged into a PCIE slot.
Normally, without the above feature, you should not witness much difference between using the GPU when a display is plugged in vs. when no display is plugged in.
To help confirm this, when you have the monitor plugged into the onboard graphics, I would study the output of:
lspci |grep -i nvidia
and
dmesg |grep NVRM
It may be possible by entering the BIOS setup menu on your motherboard to modify this behavior. You’ll need to look for options which affect onboard graphics behavior.
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 30
-> unknown error
Result = FAIL
I am curious now why my system seems to be responding slowly when my GPU is running?
That was originally why I wanted to use the GPU only for GPU processing and free up the system graphics requirements.
But I see now there is no increase in speed of the GPU (as you hinted towards in your first comment), and my system is responding quite slowly. What would be the reason for that, since I am only using the GPU for one specific task, and that shouldn’t effect my CPU usage right?
I’m not certain what is happening in your case, but one possible issue preventing things from working (unless root) is a device file permissions issue as described here:
When X is managing the display (as would be the case when your monitor is plugged into the GTX 970) then the device files and permissions are automatically set by X, and the above item is not relevant. But if you are not running X on that GPU, it could be an issue. When you run as root, you also bypass any permissions issues.
At the moment I don’t have any theories on this:
I don’t really know what you mean by “responding slowly”, or "I see now there is no increase in speed of the GPU "
I think the permissions issue might be because th CUDA toolkit is installed in /usr/local, perhaps if it is installed in home, it wouldn’t need permissions, but that is not really a problem.
With ‘responding slowly’, I mean that desktop applications, such as viering a PDF in Evince, is very ‘laggy’ and responds slowly, similarly for other application.
With “increase in GPU speed” I meant that I thought that since the GPU was also used for my monitor, it might work faster if I only use it for GPU processing and use my onboard graphics card for my monitor, i.e. free up resources for the GPU.