Installing cuda... possible or not?

Is it possible or not to run/install/whatever nvidia CUDA ?
I need to run this: https://github.com/yzhou359/MakeItTalk
but the result is this:

RuntimeError: No CUDA GPUs are available

I tried to install cuda in many way, pip, paru/pacman, I don’t know what to do.
I tried this too:

pacman -Syu nvidia-utils --assume-installed xorg-server

drm@dr-80qr ~ (main)> nvidia-smi NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

My computer:

-Computer-
Processor : Intel(R) Core™ i5-2520M CPU @ 2.50GHz
Memory : 10071MB (2994MB used)
Operating System : EndeavourOS Linux
Resolution : 1366x768 pixels
OpenGL Renderer : Mesa Intel(R) HD Graphics 3000 (SNB GT2)
Session Display Server : Wayland
-GPUs-
drm-card0 : Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller
pci-dc0 : NVIDIA Corporation GF119M [Quadro NVS 4200M]

From chrome:

GPU0
VENDOR= 0x10de, DEVICE=0x1057, DRIVER_VENDOR=Mesa, DRIVER_VERSION=22.3.4
GPU1
VENDOR= 0x8086, DEVICE=0x0126, DRIVER_VENDOR=Mesa, DRIVER_VERSION=22.3.4 ACTIVE
Optimus true
GPU CUDA compute capability major version: 0
ANGLE (Intel, Mesa Intel(R) HD Graphics 3000 (SNB GT2), OpenGL 3.3 (Core Profile) Mesa 22.3.4)

It’s definitely possible, technically what you have to do:

  1. Install proprietary NoVidya drivers
  2. Install cuda

But since it’s laptop and most likely use garbage like Optimus - i’m pretty sure you also have to make sure to forcefully use Nvidia GPU in order to get cuda.

That indicate there’s something not right with NoVidya drivers :man_shrugging:
Must be that optimus crap swtiched to Intel.

sudo pacman -S nvidia-dkms nvidia-utils nvidia-settings lib32-nvidia-utils

then reboot.

is listed here if I am not wrong?
The proper command to see what driver is used and giving more information about the hardware is:
inxi -Gaz
But the Nvidia is mostlikely legacy and needs 470 or even 390 version of the nvidia drivers.

2 Likes

drm@dr-80qr ~ (main)> inxi -Gaz (base)
Graphics:
Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics
vendor: Lenovo driver: i915 v: kernel arch: Gen-6 process: Intel 32nm
built: 2011 ports: active: LVDS-1 empty: VGA-1 bus-ID: 00:02.0
chip-ID: 8086:0126 class-ID: 0300
Device-2: NVIDIA GF119M [Quadro NVS 4200M] vendor: Lenovo driver: N/A
alternate: nouveau, nvidia_drm, nvidia non-free: series: 390.xx+
status: legacy-active (EOL~late 2022) arch: Fermi code: GF1xx
process: 40/28nm built: 2010-16 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
bus-ID: 01:00.0 chip-ID: 10de:1057 class-ID: 0300
Device-3: Chicony integrated camera type: USB driver: uvcvideo
bus-ID: 1-1.6:4 chip-ID: 04f2:b221 class-ID: 0e02
Display: wayland server: X.org v: 1.21.1.7 with: Xwayland v: 22.1.7
compositor: sway v: 1.8 driver: X: loaded: intel unloaded: modesetting,vesa
alternate: fbdev dri: i965 gpu: i915 display-ID: 1
Monitor-1: LVDS-1 model: LG Display 0x40a0 built: 2010 res: 1366x768
hz: 60 dpi: 112 gamma: 1.2 scale: 1 size: 310x174mm (12.2x6.85")
diag: 355mm (14") ratio: 16:9 modes: 1366x768
API: OpenGL v: 3.3 Mesa 22.3.4 renderer: Mesa Intel HD Graphics 3000 (SNB
GT2) direct render: Yes

@joekamprad was right, it’s legacy GPU which needs 390.xx driver

That’s a bit of a problem now, since our friend @jonathon and AUR maintainer of those packages passed away :frowning_face:

https://bbs.archlinux.org/viewtopic.php?pid=2083610#p2083610

And also looks like 390 branch hits end of life soon…so only viable option for you is Nouveau, not sure how well it works with CUDA, if at all…
Freaking proprietary drivers with end of life for you, thx novidya.

I installed the old driver.

RuntimeError: The NVIDIA driver on your system is too old (found version 9010).
Please update your GPU driver by downloading and installing a new version from the URL: 
http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.
drm@dr-80qr ~/MakeItTalk (main) [1]>

F**ck
So end of life it is, right ?
my computer isn’t even “old”, it’s fast enough… but seems nothing is less recent than 3 years old today is too old for anything fancy…
What should I do now?
Is a version disponible here ? If so where ? This is over my head.

Computer could be new, but not GPU inside it :man_shrugging:
All thx to NoVidya stupid proprietary drivers.

  1. Remove all you nvidia drivers

  2. Try driver in AUR https://aur.archlinux.org/packages?O=0&SeB=nd&K=nvidia-390&outdated=&SB=p&SO=d&PP=50&submit=Go perhaps it works now and will somehow magically keep getting maintained by some superhero :man_shrugging:

  3. If no luck there - try Nouveau driver, it should be enough to do basic stuff, but not optimal for gaming and i assume CUDA won’t work, but not sure…

Oh sorry, i misunderstood you dilemma…Although for working GPU driver - points above are still valid.
Yeah than you can’t use CUDA accelerated GPU pytorch.

You need to try No CUDA pytorch, it’s performance will most likely be crap though.

I want MakeItTalk, I prefer a slow one than none at all.
how do I install “no cuda pytorch” ?
Btw, what does this mean ?

NVRM: The NVIDIA NVS 4200M GPU installed in this system is
NVRM: supported through the NVIDIA 390.xx Legacy drivers. Please
NVRM: visit http://www.nvidia.com/object/unix.html for more
NVRM: information. The 525.85.05 NVIDIA driver will ignore
NVRM: this GPU. Continuing probe…
[ 53.117118] NVRM: No NVIDIA GPU found.

That thing is 12 years old, in computer-terms, thats ancient.

This means that your current latest 525 drivers doesn’t work with your GPU at all.

Do those steps to fix the driver, coz that’s not good.

Not sure which one in AUR, but in pip they say:

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu

Or compile from source for CPU only.

Installing collected packages: torchaudio
Successfully installed torchaudio-0.13.1+cpu

Then ?

I’ve just copied line from the site you’ve given, no idea

you can always check supported drivers with our nvidia-inst tool:
nvidia-inst --drivers

This will check ID against official nvidia ID list and show supported drivers.
If it is not installed (command not found) install it… yay -S nvidia-inst

But both legacy drivers 3090 and 470 are unmaintained currently and if no one will take over the maintainment at the AUR they will be soon in an unworking state for sure… nvidia-390xx-settings is already not working anymore.

1 Like

So tell me, running this : https://github.com/NVIDIA/flownet2-pytorch
with this: https://github.com/lelechen63/Talking-head-Generation-with-Rhythmic-Head-Motion
or this: https://github.com/yzhou359/MakeItTalk
is impossible with my card ?
For now these are the (abridged) results:

drm@dr-80qr ~ (main) [9]> nvidia-smi                                                                                             (base) 
Wed Feb  8 18:03:30 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.157                Driver Version: 390.157                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  NVS 4200M           Off  | 00000000:01:00.0 N/A |                  N/A |
| N/A   62C    P0    N/A /  N/A |      0MiB /   964MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+
>~/flownet2-pytorch (master)> bash install.sh
[...]
File "/home/drm/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 658, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/home/drm/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1573, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/home/drm/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1916, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
~/MakeItTalk (main) [1]> python main_end2end.py --jpg examples/ci.jpg
[...]
File "/home/drm/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 987, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
File "/home/drm/.local/lib/python3.10/site-packages/torch/cuda/__init__.py", line 229, in _lazy_init torch._C._cuda_init()
RuntimeError: The NVIDIA driver on your system is too old (found version 9010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.