Page 1 of 1

[tuto],openSUSE 15.3, Tumbleweed, Nvidia,opencl,cuda installation(complete or headless)

Posted: Mon Nov 15, 2021 5:18 pm
by promeneur
0. Add the openSUSE NVIDIA repo

Code: Select all

sudo zypper addrepo --refresh 'https://download.nvidia.com/opensuse/leap/$releasever' NVIDIA
In case of Tumbleweed

Code: Select all

sudo zypper addrepo --refresh https://download.nvidia.com/opensuse/leap/tumbleweed NVIDIA
Shutdown your PC

1. install your card in your PC

Restart the PC.

Automatically, the "nouveau" driver is installed. (which will not fold)

Open a session.

2 Installation of all about OpenCL and CUDA (you have not the choice)

Launch the Yast software manager.

Automatically, you get a window showing all necessary packages to install the "NVIDIA" driver and all about computing with CUDA and OpenCL for your NVIDIA card.

You have no choice between OpenCL and CUDA because all about OpenCL and CUDA is in only one package.

If you get an IGP (integrated GPU) with your MB, then 2 packages about PRIME technology are also selected. These packages are only required if your laptop is able to switch between an IGP and an NVIDIA card to optimize energy.

This is not the case of my desktop, then I unselect them.

If you want to monitor temperatures and other things, then select "kernel-firmware-nvidia"

Launch the package installation.

Restart the PC.

3. open a session

Wait a moment.

Suddenly, you hear your PC chassis fan roaring. Computing with the NVIDIA card has just started.

You can check this with fah-control.

SOME NEWS

I replace my old NVIDIA card not enough powerful by a GT 1030. I installed the 510.x driver.
This time, automatically in Gkrellm i get temperature sensors about my Nvidia card :
- NVIDIA GPU core, the Nvidia card temperature
- NVIDIA smi GPU current (?)

This time, "Nvidia X server settings" software runs well.

4. in case of only the graphical driver is installed

you need to install the following packages:

nvidiacompute-G04 for nvidia Geforce 400 series or newer -> 390 series driver.
nvidiacompute-G05 for nvidia Geforce 600 series or newer -> 470 series driver.
nvidiacompute-G06 for nvidia Geforce 700 series or newer -> 515 series driver

In case of :
- x11-video-nvidiaG04 is already installed, then install nvidiacompute-G04
- x11-video-nvidiaG05 is already installed, then install nvidiacompute-G05
- x11-video-nvidiaG06 is already installed, then install nvidiacompute-G06

Selecting the package triggers the selection of all the packages of dependencies.

5. In case of nothing is installed about your nvidia card for any reason

To auto-detect and install the right driver for your hardware, run:

Code: Select all

sudo zypper install-new-recommends --repo <name of the nvidia repo>
If you want to know <name of the nvidia repo> then run

Code: Select all

sudo zypper repos
One way to determine the appropriate driver is to input your hardware information into Nvidia's driver search engine

https://www.nvidia.com/Download/index.aspx

6 HEADLESS Installation

(with the advices of the openSUSE team member Stefan Dirsch)

I uninstalled and forbid the installation of :
libnvidia-egl-wayland1
nvidia-glG06
x11-video-nvidiaG06

Only stay installed :

kernel-firmware-nvidia
nvidia-computeG06
nvidia-gfxG06-kmp-default
and
all about nouveau driver.

It works well :)

Only one minor problem : there is no more temperature sensor.
If you want to know the temperature use "nvidia-smi" command.

7. WARNING
7.1.

If
you get a desktop PC (not a laptop)
and
you use the nvidia card only for computing and there is no connected monitor.

DON'T INSTALL all packages about PRIME (PRIME is for Laptop using hybrid graphical card)

If you install PRIME packages then X consumes from 1 % to 15 % of CPU power, then you get a slow GUI !

To forbid the installation during driver update, you must ask to YAST software manager to forbid the installation of the PRIME packages.

7.2.
7.2.1

If after an update of the NVIDIA packages, you restart your PC then you get a text console
then
log in as root
launch "yast2"
in yast2, launch "software manager"
delete all packages about NVIDIA
restart the PC
install again NVIDIA compute package. This triggers the installation of all the necessary packages.

A simpler way, execute :

Code: Select all

sudo rpm -e nvidia-gfxG06-kmp-default --nodeps
sudo zypper in nvidia-gfxG06-kmp-default
7.2.2

if after an update of the NVIDIA packages, you restart your PC then you get a black screen with a cursor in the top left corner and the mouse cursor
then
execute CTRL__Backspace_Bacspace
then
you get KDE GUI
then
uninstall all NVIDIA packages
install all NVIDIA packages
or
a simple way, in a text console, execute :

Code: Select all

sudo rpm -e nvidia-gfxG06-kmp-default --nodeps
sudo zypper in nvidia-gfxG06-kmp-default
7.3 Locked package

With Yast software manager, if you forbid the installation of some packages, then the tool (packagekit) for updating the OS does not honor zypper package locks. See my bug report https://github.com/PackageKit/PackageKit/issues/325

Thus, lock packages are installed when updating occurs !

After 3 years waiting for packagekit team, the openSUSE team is solving the problem but till now the problem is not fixed. See my bug report.
http://bugzilla.opensuse.org/show_bug.cgi?id=1199895



SOME NEWS

I replace my old NVIDIA card not enough powerful by a GT 1030. I installed the 510.x driver.
This time, no more problem with installed PRIME Packets !


8. If you want to get a silent and cold PC

see the topic viewtopic.php?f=89&t=37572

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 5:25 pm
by promeneur
In fah-control you can see that CUDA and OpenCL are installed for the NVIDIA card

16:04:47: GPUs: 2
16:04:47: GPU 0: Bus:0 Slot:2 Func:0 INTEL:1 KBL GT2 [HD Graphics 630]
16:04:47: GPU 1: Bus:1 Slot:0 Func:0 NVIDIA:3 GK208B [GeForce GT 730] 692.7
16:04:47: CUDA Device 0: Platform:0 Device:0 Bus:1 Slot:0 Compute:3.5 Driver:11.4
16:04:47:OpenCL Device 0: Platform:0 Device:0 Bus:NA Slot:NA Compute:2.0 Driver:1.3
16:04:47:OpenCL Device 1: Platform:1 Device:0 Bus:1 Slot:0 Compute:3.0 Driver:470.86

I assume CUDA is used and not OpenCL to compute with the NVIDIA card.

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 5:33 pm
by Joe_H
promeneur wrote:I assume CUDA is used and not OpenCL to compute with the NVIDIA card.
On a new enough card it will be. There are limitations in the CUDA support libraries on what range of cards can be supported by a single one. Also see this announcement related to the Core_22 support - viewtopic.php?f=24&t=37545

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 5:47 pm
by promeneur
On a new enough card it will be
My card is an old Asus GT730 SL. At least 5 to 10 years old.

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 5:53 pm
by Neil-B
Check the startup of a wu in the log as it will show what it is using

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 5:56 pm
by promeneur
It seems that CUDA driver 11.4 is installed for my card, thus CUDA 3.5. Then CUDA is used, if I understand well.
OpenCL driver 470.86 is installed for my card, thus opencl 3.0.

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 6:01 pm
by promeneur
It is not obvious to for me to know if opencl or cuda is used.

16:04:47:WU01:FS02:Starting
16:04:47:WU01:FS02:Running FahCore: /usr/bin/FAHCoreWrapper /var/lib/fahclient/cores/cores.foldingathome.org/lin/64bit/22-0.0.13/Core_22.fah/FahCore_22 -dir 01 -suffix 01 -version 706 -lifeline 1804 -checkpoint 15 -opencl-platform 1 -opencl-device 0 -cuda-device 0 -gpu-vendor nvidia -gpu 0 -gpu-usage 100
16:04:47:WU01:FS02:Started FahCore on PID 1905
16:04:47:WU01:FS02:Core PID:1909
16:04:47:WU01:FS02:FahCore 0x22 started

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 6:09 pm
by Joe_H
You didn't show enough of the log for the WU startup. The messages about using CUDA or OpenCL come later in the sequence than what you have posted.

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 6:20 pm
by promeneur

Code: Select all

16:04:48:WU01:FS02:0x22:*************************** Core22 Folding@home Core ***************************
16:04:48:WU01:FS02:0x22:       Core: Core22
16:04:48:WU01:FS02:0x22:       Type: 0x22
16:04:48:WU01:FS02:0x22:    Version: 0.0.13
16:04:48:WU01:FS02:0x22:     Author: Joseph Coffland <joseph@cauldrondevelopment.com>
16:04:48:WU01:FS02:0x22:  Copyright: 2020 foldingathome.org
16:04:48:WU01:FS02:0x22:   Homepage: https://foldingathome.org/
16:04:48:WU01:FS02:0x22:       Date: Sep 19 2020
16:04:48:WU01:FS02:0x22:       Time: 01:10:35
16:04:48:WU01:FS02:0x22:   Revision: 571cf95de6de2c592c7c3ed48fcfb2e33e9ea7d3
16:04:48:WU01:FS02:0x22:     Branch: core22-0.0.13
16:04:48:WU01:FS02:0x22:   Compiler: GNU 4.8.2 20140120 (Red Hat 4.8.2-15)
16:04:48:WU01:FS02:0x22:    Options: -std=c++11 -fsigned-char -ffunction-sections -fdata-sections -O3
16:04:48:WU01:FS02:0x22:             -funroll-loops -DOPENMM_GIT_HASH="\"189320d0\""
16:04:48:WU01:FS02:0x22:   Platform: linux2 4.19.76-linuxkit
16:04:48:WU01:FS02:0x22:       Bits: 64
16:04:48:WU01:FS02:0x22:       Mode: Release
16:04:48:WU01:FS02:0x22:Maintainers: John Chodera <john.chodera@choderalab.org> and Peter Eastman
16:04:48:WU01:FS02:0x22:             <peastman@stanford.edu>
16:04:48:WU01:FS02:0x22:       Args: -dir 01 -suffix 01 -version 706 -lifeline 1905 -checkpoint 15
16:04:48:WU01:FS02:0x22:             -opencl-platform 1 -opencl-device 0 -cuda-device 0 -gpu-vendor
16:04:48:WU01:FS02:0x22:             nvidia -gpu 0 -gpu-usage 100
16:04:48:WU01:FS02:0x22:************************************ libFAH ************************************
16:04:48:WU01:FS02:0x22:       Date: Sep 15 2020
16:04:48:WU01:FS02:0x22:       Time: 05:14:43
16:04:48:WU01:FS02:0x22:   Revision: 44301ed97b996b63fe736bb8073f22209cb2b603
16:04:48:WU01:FS02:0x22:     Branch: HEAD
16:04:48:WU01:FS02:0x22:   Compiler: GNU 4.8.2 20140120 (Red Hat 4.8.2-15)
16:04:48:WU01:FS02:0x22:    Options: -std=c++11 -fsigned-char -ffunction-sections -fdata-sections -O3
16:04:48:WU01:FS02:0x22:             -funroll-loops
16:04:48:WU01:FS02:0x22:   Platform: linux2 4.19.76-linuxkit
16:04:48:WU01:FS02:0x22:       Bits: 64
16:04:48:WU01:FS02:0x22:       Mode: Release
16:04:48:WU01:FS02:0x22:************************************ CBang *************************************
16:04:48:WU01:FS02:0x22:       Date: Sep 15 2020
16:04:48:WU01:FS02:0x22:       Time: 05:11:04
16:04:48:WU01:FS02:0x22:   Revision: 33fcfc2b3ed2195a423606a264718e31e6b3903f
16:04:48:WU01:FS02:0x22:     Branch: HEAD
16:04:48:WU01:FS02:0x22:   Compiler: GNU 4.8.2 20140120 (Red Hat 4.8.2-15)
16:04:48:WU01:FS02:0x22:    Options: -std=c++11 -fsigned-char -ffunction-sections -fdata-sections -O3
16:04:48:WU01:FS02:0x22:             -funroll-loops -fPIC
16:04:48:WU01:FS02:0x22:   Platform: linux2 4.19.76-linuxkit
16:04:48:WU01:FS02:0x22:       Bits: 64
16:04:48:WU01:FS02:0x22:       Mode: Release
16:04:48:WU01:FS02:0x22:************************************ System ************************************
16:04:48:WU01:FS02:0x22:        CPU: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
16:04:48:WU01:FS02:0x22:     CPU ID: GenuineIntel Family 6 Model 158 Stepping 9
16:04:48:WU01:FS02:0x22:       CPUs: 4
16:04:48:WU01:FS02:0x22:     Memory: 15.50GiB
16:04:48:WU01:FS02:0x22:Free Memory: 14.45GiB
16:04:48:WU01:FS02:0x22:    Threads: POSIX_THREADS
16:04:48:WU01:FS02:0x22: OS Version: 5.3
16:04:48:WU01:FS02:0x22:Has Battery: false
16:04:48:WU01:FS02:0x22: On Battery: false
16:04:48:WU01:FS02:0x22: UTC Offset: 1
16:04:48:WU01:FS02:0x22:        PID: 1909
16:04:48:WU01:FS02:0x22:        CWD: /var/lib/fahclient/work
16:04:48:WU01:FS02:0x22:************************************ OpenMM ************************************
16:04:48:WU01:FS02:0x22:   Revision: 189320d0
16:04:48:WU01:FS02:0x22:********************************************************************************
16:04:48:WU01:FS02:0x22:Project: 18431 (Run 10, Clone 117, Gen 73)
16:04:48:WU01:FS02:0x22:Unit: 0x00000000000000000000000000000000
16:04:48:WU01:FS02:0x22:Digital signatures verified
16:04:48:WU01:FS02:0x22:Folding@home GPU Core22 Folding@home Core
16:04:48:WU01:FS02:0x22:Version 0.0.13
16:04:48:WU01:FS02:0x22:  Checkpoint write interval: 100000 steps (2%) [50 total]
16:04:48:WU01:FS02:0x22:  JSON viewer frame write interval: 50000 steps (1%) [100 total]
16:04:48:WU01:FS02:0x22:  XTC frame write interval: 250000 steps (5%) [20 total]
16:04:48:WU01:FS02:0x22:  Global context and integrator variables write interval: disabled
16:04:48:WU01:FS02:0x22:There are 4 platforms available.
16:04:48:WU01:FS02:0x22:Platform 0: Reference
16:04:48:WU01:FS02:0x22:Platform 1: CPU
16:04:48:WU01:FS02:0x22:Platform 2: OpenCL
16:04:48:WU01:FS02:0x22:  opencl-device 0 specified
16:04:48:WU01:FS02:0x22:Platform 3: CUDA
16:04:48:WU01:FS02:0x22:  cuda-device 0 specifie

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 7:04 pm
by Neil-B
We need the next few lines !! ... for instance on mine ...

Code: Select all

18:06:55:WU01:FS01:0x22:  opencl-device 0 specified
18:06:55:WU01:FS01:0x22:Platform 3: CUDA
18:06:55:WU01:FS01:0x22:  cuda-device 0 specified
18:07:06:WU01:FS01:0x22:Attempting to create CUDA context:
18:07:06:WU01:FS01:0x22:  Configuring platform CUDA
18:07:11:WU01:FS01:0x22:  Using CUDA and gpu 0 <<<<<<<<<<<<<<<<<<<<<<<<<<< This bit Here :)
18:07:12:WU01:FS01:0x22:Completed 0 out of 1250000 steps (0%)
18:07:12:WU01:FS01:0x22:Checkpoint completed at step 0
18:08:35:WU01:FS01:0x22:Completed 12500 out of 1250000 steps (1%)
18:09:58:WU01:FS01:0x22:Completed 25000 out of 1250000 steps (2%)

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Mon Nov 15, 2021 7:07 pm
by Neil-B
Neil-B wrote:We need the next few lines !! ... for instance on mine ...

Code: Select all

18:06:55:WU01:FS01:0x22:  opencl-device 0 specified
18:06:55:WU01:FS01:0x22:Platform 3: CUDA
18:06:55:WU01:FS01:0x22:  cuda-device 0 specified
18:07:06:WU01:FS01:0x22:Attempting to create CUDA context:
18:07:06:WU01:FS01:0x22:  Configuring platform CUDA
18:07:11:WU01:FS01:0x22:  Using CUDA and gpu 0 <<<<<<<<<<<<<<<<<<<<<<<<<<< This bit Here :)
18:07:12:WU01:FS01:0x22:Completed 0 out of 1250000 steps (0%)
18:07:12:WU01:FS01:0x22:Checkpoint completed at step 0
18:08:35:WU01:FS01:0x22:Completed 12500 out of 1250000 steps (1%)
18:09:58:WU01:FS01:0x22:Completed 25000 out of 1250000 steps (2%)
... and btw if you edit your post, select all the log and then click on the code button above the window pane it makes posts easier to read ... when creating a new post just use the full editor option :)

Re: [tuto],openSUSE 15.3,Nvidia,opencl,cuda installation

Posted: Wed Nov 17, 2021 11:06 am
by promeneur
CUDA is used

thanks

Re: [tuto],openSUSE 15.3, Tumbleweed, Nvidia,opencl,cuda installation(complete or headless)

Posted: Tue Dec 27, 2022 1:41 pm
by promeneur
Headless install (continued)

to get again GPU temperature in gkrellm

you can install gkrellm-nvidia plugin (it uses the output of "nvidia-smi" tool)

With openSUSE, you don't need to install nvml library. It is installed when doing the nvidia headless install.

Download the source code zip file at https://github.com/carcass82/gkrellm-nvidia

Unzip it.

Open a text console in the folder containing the source code

execute the command

Code: Select all

make
copy the .o and .so files to ~/gkrellm2/plugins/

Relaunch gkrellm

In gkrellm-nvidia settings you can set where to display the temperature in the gkrellm window.

I choose "Proc" to display it with the other temperatures.

Re: [tuto],openSUSE 15.3, Tumbleweed, Nvidia,opencl,cuda installation(complete or headless)

Posted: Sat Jan 21, 2023 10:54 am
by promeneur
Headless install (continued)

with nvidia 525.85
you must forbid the installation of the following packets:
libnvidia-egl-wayland1
libnvidia-egl-wayland1-32bit
nvidia-video-G06
nvidia-video-G06-32bit
suse-prime
plasma5-applet-suse-prime

Good news : forbidding the installation runs well. The Yast software manager bug is solved.

Re: [tuto],openSUSE 15.3, Tumbleweed, Nvidia,opencl,cuda installation(complete or headless)

Posted: Mon Mar 06, 2023 8:32 am
by promeneur
Some news.

Today I discover two news packages :

Meta package for full installations (X, GL, etc.)
nvidia-drivers-G06

Meta package for compute only installations
nvidia-drivers-minimal-G06

It is strange because one year ago I asked for an easy way to do a headless (ubuntu vocabulary) installation of the nvidia card for only computing. The openSUSE team answered, “it is a corner case, no time for this”.
Anyway, it is good news.

But nvidia-drivers-minimal-G06 is only for the last generation cards. It uses the open driver for Nvidia card. More, if you use it for a non last generation card it does not detect that the card is not compliant then it does a wrong installation. It's a bug.