I’ve installed the (hopefully) latest nvidia driver for my GPU over rpm fusion.
And tested the installation with “modinfo -F version nvidia” which shows me some 500. number like it’s installed.
Unfortunately i can not use my driver on the machine and it seems not to be “activated”. I’ve really done some research but did not find some solution.
So: What do I need to do to use my driver (and CUDA, installed) on my fedora machine? It seems to be installed already but not usable.
so guys. seems that secure boot blocked some things. i diabled secure boot and the command “nvidia-smi” shows somehow the actual version etc. also my nvidia xserver gui shows my quadro GPU now. (but used 0%…).
I’m not sure if it’s setup all correct now. but it seems to work.
Now I need to use CUDA to do some deep learning. but using cuda.is_available. in python shows me onyl my cpu.
so my question now is: is it installed and enabled correctly? and what do i need to do to use CUDA?
You needed to also install xorg-x11-drv-nvidia-cuda (sudo dnf install xorg-x11-drv-nvidia-cuda after which any app using cuda would be able to use the gpu. By default when installing akmod-nvidia it installs the cuda-libs but does not install cuda itself.
ok. i did both. installing akmod-nvidia and cuda stuff. but in pytorch i could not use it. (juypter lab). after that i tried the cuda stuff on rpm fusion, but did not change so much
i think the drivers are correctly installed but not really used.
Wed Nov 29 20:00:32 2023
±--------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.129.03 Driver Version: 535.129.03 CUDA Version: 12.2 |
|-----------------------------------------±---------------------±---------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 Quadro T1000 with Max-Q … Off | 00000000:01:00.0 Off | N/A |
| N/A 46C P8 3W / 35W | 0MiB / 4096MiB | 0% Default |
| | | N/A |
±----------------------------------------±---------------------±---------------------+
±--------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
±--------------------------------------------------------------------------------------+
Please use the preformatted text tags with the </> button on the toolbar to post text that you copy & paste. It retains on screen formatting that way and keeps the text readable.
see below.
$ nvidia-smi
Wed Nov 29 13:06:36 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.129.03 Driver Version: 535.129.03 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 3050 Off | 00000000:06:00.0 On | N/A |
| 30% 56C P2 85W / 130W | 2442MiB / 8192MiB | 91% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 3474 G /usr/libexec/Xorg 99MiB |
| 0 N/A N/A 3629 C+G ...libexec/gnome-remote-desktop-daemon 81MiB |
| 0 N/A N/A 3714 G /usr/bin/gnome-shell 76MiB |
| 0 N/A N/A 4838 G ...5493674,17065770251073051464,262144 65MiB |
| 0 N/A N/A 5305 C ...64-pc-linux-gnu__GW-opencl-nvidia-2 2104MiB |
+---------------------------------------------------------------------------------------+
Please post the output of lsmod | grep nvidia and dnf list installed \*nvidia\*
It also may be necessary to use the right-click menu from the icon and select ‘use discrete gpu’ when launching the app of concern so it properly uses the nvidia GPU.
When you left click on the icon for your app it immediately launches.
If you right click on the same icon it should give you a menu instead of an immediate launch. There you select to use the dedicated graphics card which for your laptop would be the nvidia GPU…
ok. i start my apps over the center or cli. don’t even know where these icons are.
anyway: i want to use my dedicated GPU all the time. I’ve no use for the internal graphics.
so i just wonder why the driver is installad but not used (nor the GPU).
another question ist: how could i test this over cli? i start my jupyter lab over cli because i use a custom conda env. so if i could start this process with GPU support i could test it.
I don’t understand your comment of “don’t even know where these icons are?”
How do you launch apps on your system. Most users with a desktop gui use the icons regularly to launch the apps they use. The icons I spoke of are those same icons.
The icons used to lauch installed apps are available with the ‘Super’ AKA ‘Windows’ key or with ‘Super+A’ while in the gui desktop.
This can be done by first following the instructions at [Fedora Docs] (How to Set Nvidia as Primary GPU on Optimus-based Laptops :: Fedora Docs) to set the machine to always use the nvidia gpu as primary. Then reboot and during login select the ‘gnome on xorg’ option with the gear at the lower right of the screen where you enter the password.
Since you already have the nvidia drivers loaded and functioning you can skip to step 8 and start from that point.
The nvidia GPU is not used by default since it is a laptop and the iGPU uses less power so the dGPU is left idle until the user decides it should be used.
Since most users wish the gui desktop environment very few even use a cli environment.
Do you boot with the desktop then use a terminal or do you immediately log into a cli environment with ctrl+alt+F3 or similar? It does make a difference in what is available.
If you only use the cli environment the nvidia can still be made primary, then log into the gui desktop.
Once there the ctrl+alt+F3 will still get you to the cli login but this time the nvidia gpu would be primary and used for all display on the screen.
thanks.
so first: icons: No i use the cli on gui mostly. what i meant: I use desktop icons (or in dolphin) only for app images. otherwise i press “super”, write the first few signs of the programm name and press enter. or i open applications over cli directly. but “Not by pressing with my mouse”. it was just that what i meant.
second:
thanks very much for the link. i did all above step 8 and reboot the system (two times). seems to be configured, but does not function as it should, i think.
could you give me the hint, how i can start the jupyter lab on dedicated GPU over cli once? so i could test it this functions, and perhaps it would be a workaround
since i do not play games and most of my apps are not graphics-intensive, i do not “need” to force the gpu to be used. if i would know how to use it when needed, for example in jupyter with pytorch etc. perhaps this would be sufficient.