install Nvidia dirver for openGL3.3

Issues related to applications and software problems and general support
Post Reply
toostgunter
Posts: 5
Joined: 2019/11/12 19:25:56

install Nvidia dirver for openGL3.3

Post by toostgunter » 2019/11/12 20:09:06

Hey

So I wanted to install Nvidia driver, as me being a novice I decided to download it from the Nvidia site (after selecting the correct one according to my driver). Did “bash nvidia-xxx.run” via remote ssh and was “succesful”. rebooted and was able to see my Gnome desktop, so success?
But then the guide said to run ’nvidia-settings’ which resulted in: ‘Error: unable to load info from any available system’

I started to look around online and ’nvidia-smi’ gave:

Code: Select all

# nvidia-smi
Tue Nov 12 20:31:49 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.31       Driver Version: 440.31       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro P620         Off  | 00000000:65:00.0 Off |                  N/A |
| 34%   26C    P8    N/A /  N/A |     14MiB /  1998MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1986      G   /usr/libexec/Xorg                              6MiB |
|    0      2807      G   /usr/bin/gnome-shell                           5MiB |
+-----------------------------------------------------------------------------+
So can I conclude that my GPU is running correctly? but then why isn't ’nvidia-settings’ showing me anything…

the main reason I wanted to update my driver is so that I could run my simple (for now) python script that uses openGL3.3. the script gave an error

Code: Select all

raise NoOpenGLException("Unable to create an OpenGL 3.3+ context. "
arcade.application.NoOpenGLException: Unable to create an OpenGL 3.3+ context. Check to make sure your system supports OpenGL 3.3 or higher.
And according to the wiki etc my GPU (PNY quadro p620) supports it. So my instinct told me to update the driver. And I did, but unsuccessful?

After reading some more about installing drivers on centos8 I saw that it is recommended to use ELrepo for driver stuff. So followed the official site and got it but when I want to “yum install nvidia-detect’ I get a “no match for argument: nvidia-detect”…

Code: Select all

# yum install nvidia-detect
Last metadata expiration check: 0:02:43 ago on Tue 12 Nov 2019 20:20:19 CET.
No match for argument: nvidia-detect
Error: Unable to find a match
 
# yum repolist
Last metadata expiration check: 0:02:49 ago on Tue 12 Nov 2019 20:20:19 CET.
repo id                         repo name                                                                 status
AppStream                       CentOS-8 - AppStream                                                      5,089
BaseOS                          CentOS-8 - Base                                                           2,843
code                            Visual Studio Code                                                           73
elrepo                          ELRepo.org Community Enterprise Linux Repository - el8                       25
*epel                           Extra Packages for Enterprise Linux 8 - x86_64                            3,108
extras                          CentOS-8 - Extras                                                             3
google-chrome                   google-chrome                                                                 3
nux-dextop                      Nux.Ro RPMs for general desktop use                                       2,711
So my question: Did I do something wrong trying to install the nvidia driver, or has it been successful and is there most likely something wrong with my setup so that I can’t run openGl3.3? (Won’t bother you yet with my full setup as that would be off-topic)

Maybe some other useful commands + output for those who would like to help:

Code: Select all

# systemctl get-default
graphical.target

Code: Select all

# lsmod | egrep -i "nvidia|nouveau"
nvidia_drm             49152  3
nvidia_modeset       1110016  5 nvidia_drm
nvidia              19927040  186 nvidia_modeset
ipmi_msghandler       110592  2 ipmi_devintf,nvidia
nouveau              2187264  0
video                  45056  2 asus_wmi,nouveau
drm_kms_helper        200704  2 nvidia_drm,nouveau
ttm                   131072  1 nouveau
mxm_wmi                16384  1 nouveau
drm                   520192  8 drm_kms_helper,nvidia_drm,ttm,nouveau
i2c_algo_bit           16384  2 igb,nouveau
wmi                    32768  5 intel_wmi_thunderbolt,asus_wmi,wmi_bmof,mxm_wmi,nouveau

Code: Select all

# rpm -qa | grep -i nvidia
pcp-pmda-nvidia-gpu-4.3.0-3.el8.x86_64

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: install Nvidia dirver for openGL3.3

Post by TrevorH » 2019/11/12 20:56:22

ELRepo don't currently have a kmod-nvidia package available for CentOS/RHEL 8
nouveau 2187264 0
That shouldn't be loaded if you're using the nvidia driver. I think you forgot to blacklist it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

toostgunter
Posts: 5
Joined: 2019/11/12 19:25:56

Re: install Nvidia dirver for openGL3.3

Post by toostgunter » 2019/11/13 19:32:47

Thanks for the reply.

I followed this obvious guide: https://linuxconfig.org/how-to-install- ... n-centos-8
where the disable nouveau command was:

Code: Select all

grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) nouveau.modeset=0"
But that didn't seem to do his job as I kept seeing “nouveau 2187264 0”
but then the following command shows that it has been set (twice?)

Code: Select all

sudo grub2-editenv - list | grep kernelopts
kernelopts=root=/dev/mapper/cl_xxxx-root ro crashkernel=auto resume=/dev/mapper/cl_xxxx-swap rd.lvm.lv=cl_xxx/root rd.lvm.lv=cl_xxx/swap rhgb quiet  nouveau.modeset=0 nouveau.modeset=0
Then I found this topic: viewtopic.php?f=47&t=68800 where I followed Mike his 5 steps:

Code: Select all

grubby ––update-kernel=ALL ––args="rd.driver.blacklist=nouveau nouveau.modeset=0"
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
echo "blacklist nouveau" > /etc/modprobe.d/nouveau-blacklist.conf 
dracut /boot/initramfs-$(uname -r).img $(uname -r)

reboot
Now I get:

Code: Select all

lsmod | egrep -i "nvidia|nouveau"
nvidia_drm             49152  3
nvidia_modeset       1110016  5 nvidia_drm
nvidia              19927040  186 nvidia_modeset
ipmi_msghandler       110592  1 nvidia
drm_kms_helper        200704  1 nvidia_drm
drm                   520192  6 drm_kms_helper,nvidia_drm
which seems better (I think?).
But "nvidia-settings” still gives me a: "Unable to load info from any available system”. (And the python script still fails because of OpenGL3.3)

Is there something else that I’m missing?

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: install Nvidia dirver for openGL3.3

Post by chemal » 2019/11/13 21:06:58

You still need a minimal /etc/X11/xorg.conf:

Code: Select all

Section "Device"
        Identifier  "Videocard0"
        Driver      "nvidia"
EndSection
and you have to edit /etc/gdm/custom.conf:

Code: Select all

...
[daemon]
# Uncoment the line below to force the login screen to use Xorg
#WaylandEnable=false
...

toostgunter
Posts: 5
Joined: 2019/11/12 19:25:56

Re: install Nvidia dirver for openGL3.3

Post by toostgunter » 2019/11/14 22:20:17

Okay so I got some more insights in my issue…

It might be worth noting that im using tigervnc to connect with my server, and I just read that vnc and nvidia aren’t best friends..

@chemal: my xorg.conf file looks a bit bigger:

Code: Select all

Section "Files"
	ModulePath	"/opt/nvidia/xorg/modules"
	ModulePath	"/usr/lib64/xorg/modules"
EndSection

## avoid glamor that prevent nvidia driver to load correctly
Section "Module"
	Disable	"glamoregl"
EndSection

## ABI config
Section "ServerFlags"
	Option	"IgnoreABI" "1"
EndSection

Section "ServerLayout"
	Identifier	"layout"
	Screen	0	"nvidia_screen"
	Inactive		"intel"
	Option		"Xinerama" "0"
EndSection

## nvidia xorg conf
Section "Device"
	Identifier	"nvidia"
	Driver		"nvidia"
	BusID			"PCI:5:0:0"
EndSection

Section "Screen"
	Identifier	"nvidia_screen"
	Device		"nvidia"
EndSection

## intel xorg conf
Section "Device"
	Identifier	"intel"
	Driver		"modesetting"
	BusID			"PCI:"
EndSection

Section "Screen"
	Identifier	"intel_screen"
	Device		"intel"
	Option		"AccelMethod"  "sna"
EndSection
Can I just ‘delete’ the intel part? or do I have to put it in separate files?
Oh btw in /etc/X11/xorg.conf.d I have 3 files 00-kebyoard.conf, 10-libvnc.conf and 11-nvidia.conf.
That last one I added manually (seen in some forum can’t remember where):

Code: Select all

Section "OutputClass"
	Identifier "nvidia"
	MatchDriver "nvidia-drm"
	Driver "nvidia"
	Option "AllowEmptyInitialConfiguration" "true"
	Option "PrimaryGPU" "true"
EndSection
But tbh I have no idea how sensitive these files are and if I can just edit/delete them.



And before i do any drastic changes to my setup:
Is there a place where I can ask what os (centos / ubuntu /…) + desktop environment (GNOME, ….) + remote desktop works best for what I try to accomplish?
(basically I just want to start with creating a simple game in python and then by step by step till some deep learning/ AI stuff)
Any tips are welcome ;)

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: install Nvidia dirver for openGL3.3

Post by chemal » 2019/11/15 16:31:02

toostgunter wrote:
2019/11/14 22:20:17
... for what I try to accomplish?
Explain in more detail what you are trying to set up. A remote rendering solution?

toostgunter
Posts: 5
Joined: 2019/11/12 19:25:56

Re: install Nvidia dirver for openGL3.3

Post by toostgunter » 2019/11/15 20:06:30

chemal wrote:
2019/11/15 16:31:02
A remote rendering solution?
yep thats basically what I want to do.

I have my server downstairs connected with ethernet, and I want to be able to work (write code and execute it) on my laptop anywhere in the house (and even when im not home), remote connect with the server and let it do all the hard work.
(+ lots more but thats not related to this topic)

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: install Nvidia dirver for openGL3.3

Post by chemal » 2019/11/15 23:01:45

TurboVNC + VirtualGL is a nice combination for such setups.

Anyway, you first have to setup X with the Nvidia driver on the server.

toostgunter
Posts: 5
Joined: 2019/11/12 19:25:56

Re: install Nvidia dirver for openGL3.3

Post by toostgunter » 2019/11/17 20:15:27

Small update:
So I did a clean re-install of centos 8 (minimal server with only GNOME gui enabled). I enabled remote ssh, tried to update the nvidia-drivers and all went well, even my simple python script that required openGL3.3 worked when using a monitor connected to my server (so no remote connecting or anything yet).

As that went well I tried to install VirtualGL and TurboVNC, but that didn’t go according to plan.
Followed the official VirtualGL documentation to install it https://cdn.rawgit.com/VirtualGL/virtua ... html#hd005
But couldn’t get past the sanity check point where I got errors that the file didn’t exist etc etc… (don’t remember the exact error messages). But all of these 3 commandos gave me errors

Code: Select all

xauth merge /etc/opt/VirtualGL/vgl_xauth_key
xdpyinfo -display :0
/opt/VirtualGL/bin/glxinfo -display :0 -c
TurboVnc didn’t work either, installed just fine on my server, but could never connect to it from my laptop.
So I went on a wild search and somehow found that Gnome (gdm) isn’t the best option and lightdm could be a better solution.
As I had nothing to lose yet I did a clean re-install of centos 8, but this time only a minimal server with no extra options enabled.
Again enabled remote ssh and when I wanted to install lightdm from command line I found that centos8 doesnt have any packages for it yet... (atleast not the greeter one).

So that was my weekend and I’m here again :)
Bit disappointed in how everything is going, as I heard/read a lot of nice things about using centos for a server. but at this time centos8 is just not fun to work with :(
Now I have to consider to switch to centos7 or wait for centos 8.1 to come out as that would probably fix a lot of stuff:viewtopic.php?f=54&t=72509

User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: install Nvidia dirver for openGL3.3

Post by KernelOops » 2019/11/17 22:02:33

To be honest, I love CentOS for being a server operating system, meaning that I never have to install a GUI or anything related to graphics. My understanding of a server, is something that has absolutely nothing to do with graphics, has the absolute minimum amount of packages installed. Thus, I use ansible over ssh to work on my servers.

While you seem to need a system that does something different, that requires a GUI and you need to remotely use that GUI. CentOS may not be the right choice, why not try Fedora Server instead? It is more compatible with graphical applications.
--
R.I.P. CentOS :cry:
--

Post Reply