This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-install-cuda-on-ubuntu-20-04-focal-fossa-linux
Unfortunately it did not yet work for me you documented. I get the warning
dpkg: error processing archive /var/cache/apt/archives/libcublas10_10.2.2.89-1_amd64.deb (âunpack):
trying to overwrite â/usr/lib/x86_64-linux-gnu/libnvblas.so.10â, which is also in package libnvblas10:amd64 10.1.243-3
Errors were encountered while processing:
/var/cache/apt/archives/libcublas10_10.2.2.89-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Did I miss a step?
I had this happen as well. It may be related to an older version of CUDA being installed, but possibly not. Either way I was able to get past the error by running
$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/libcublas10_10.2.2.89-1_amd64.deb
$ sudo apt --fix-broken install
You will get some warnings after running the first command but the --fix-broken-install clears that right up.
Cheers!
sudo apt install nvidia-cuda-toolkit
Reading package lists⌠Done
Building dependency tree
Reading state information⌠Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nvidia-cuda-toolkit : Depends: nvidia-cuda-dev (= 10.1.243-3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Hi, the installation worked well.
But when I run the sample hello.cu code, it get the output as:
Max error: 2.000000
I suppose it should be 0.000000. Is this fine? if so what is the reason for this difference?
Iâm not sure what the difference is, but when I was getting Max error:2.000000 something was wrong with my nvidia-driver (maybe due to SecureBoot) but running sudo dpkg --configure -a and then running sudo apt install nvidia-cuda-toolkit . This fixed the driver issue and then I got the error of 0.000
These instructions install the latest cuda version which at this time is cuda 11. There is a serious version mismatch with the 440 driver and version 11. Before installing this when I ran nvidia-smi it indicated that is used cuda 10.2. After installing cuda nvidia-smi returns
Failed to initialize NVML: Driver/library version mismatch
I read somewhere that Cuda 11 was required when running the 5.3 kernel, so itâs not clear that I could downgrade to cuda 10.2. Maybe I need a version 440 driver written with cuda 11, if such a thing exists.
Doing
sudo apt remove cuda
does not remove the cuda installation so nvidia-smi still errors.
Nvidia has created a terrible mess with this.
Hereâs what I did to get things to work.
After running sudo apt remove cuda
I had to run sudo apt autoremove
to actually remove the cuda installation. After rebooting I checked the Additional Drivers tab in Software & Updates and noticed that the 440 driver was gone and my system was not using the xorg nouveau driver. Apparently the cuda installation overwrites your driver and removing cuda removes the overwritten driver leaving you running the xorg driver.
I did sudo apt install cuda
and rebooted. The Additional Drivers tab in Software & Updates shows a manually installed driver in use. The nvidia-smi
shows a driver version 450 and cuda version 11.0. My other cuda binaries now run too.
It looks like the one thing that needs to be added to the installation instructions is to be sure you are running the xorg nouveau driver when you install cuda. If you are running an Nvidia driver it will be overwritten by the cuda install leaving you with driver and library version mismatches.
I did this:
- Followed âHow to install CUDA toolkit from Ubuntu Repositoryâ (I could not run hello.cu)
- Followed âHow to install the NVIDIA drivers on Ubuntu 20.04 Focal Fossa Linux.â
- When I ran the hello.cu ($nvcc -o hello hello.cu), I got the same max error: 2.000
- Restart Linux.
- Ran hello.cu again and got max error: 0.0000
Cheers.
A plea to the ether to assist. This page is very helpful, but I can get no combination of ubuntu 18/20 and available drivers/toolkit to work for a Grid K1 card. Consistently getting the âerror 2.0000â. The catch is this is a vm where the GPU is PCI passed thru, with apparent success. I see the device in âlshwâ, with the nvidia driver applied. Is there any chance itâs due to there also being a Cirrus Logic VGA on display:0, which I canât seem to get rid of? I donât see anywhere in the test code that itâs telling it which device to use for cuda.
Hi, thanks for all the info. I followed all the instructions to a tee on both linuxconfig dot org/ethereum-mining-on-ubuntu-18-04-and-debian and linuxconfig dot org/how-to-install-cuda-on-ubuntu-20-04-focal-fossa-linux but all I get when attempting to run either -
./ethminer -U -P stratum1+tcp://YOUR_ETHEREUM_ADDRESS_HERE@us1.ethpool.org:3333
or
./ethminer -U -P stratum1+tcp://0xb67440E02D5aA019248DF50E672695C87616EBc9@us1.ethpool.org:3333
is
"ethminer 0.18.0
Build: linux/release/gnu
CUDA Error : unknown error
Error: No usable mining devices found"
And yes I changed the mining crypto addressâŚ
Thank you!
Ivan
I too got the error max 2.000 as well.