glxinfo | grep OpenGL not showing nvidia

I just installed Ubuntu 19.10, ran sudo apt-get update && sudo apt-get upgrade, already have nvidia drivers installed, but I don't know why when I run glxinfo | grep OpenGL it doesn't show nothing about nvidia.

victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ sudo prime-select query
nvidia
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: AMD RAVEN (DRM 3.33.0, 5.3.0-24-generic, LLVM 9.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.1
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.2.1
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.2.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
3

1 Answer

It seems that prime-select feature is it doesn't work for amd/nvidia but only for intel/nvidia, so I had to manually config some files.

Basically I had to edit 2 files

  1. /usr/share/X11/xorg.conf.d/10-amdgpu.conf

    In this one, I replaced the line with Driver "amdgpu" with Driver "modesetting"

  2. /usr/share/X11/xorg.conf.d/10-nvidia.conf

    I added a new line inside OutputClass: Option "PrimaryGPU" "Yes"

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1660 Ti with Max-Q Design/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 435.21
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 435.21
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 435.21
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

These instructions were given here. So now I was able to see the correct output of glxinfo.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like