OpenGL version is forced to 1.4, but card can support 4.6.0

@azuresilent, I figured out what the issue was with trying to render via an NVidia GPU without X server access, and it works great now:

Basically, add the user you want to be able to have this access to the “video” group (in /etc/group).

The reason is, in order for the EGL+GL init to succeed for the NVidia path, the app must be able to open kernel special files associated with the NVidia driver which are owned by group “video”. Special files such as: /dev/nvidia0, /dev/nvidiactl, /dev/nvidia-modeset, /dev/dri/card0, and /dev/dri/renderD128.

On a hunch, I took that test app I was trying to run as a user which didn’t have X server access perms and captured an strace of it while running as this user. Sifting through this, it was pretty obvious that it was failing to open some key NVidia-driver related files, and then falling back to other EGL providers via libglvnd.

Once I added that user to group video (and logged that user out and back in to pick up the group change), then that user was able to create full OpenGL 4.6 capable GL contexts without a connection to the X server, all via EGL:

Created OpenGL 4.x context
EGL_VERSION     = 1.5
EGL_VENDOR      = NVIDIA
EGL_CLIENT_APIS = OpenGL_ES OpenGL
GL_VENDOR       = NVIDIA Corporation
GL_RENDERER     = GeForce GTX 1650/PCIe/SSE2
GL_VERSION      = 4.6.0 NVIDIA 430.14
GL_SHADING_LANGUAGE_VERSION = 4.60 NVIDIA
PBuffer Size    = 320 x 320
PBuffer Samples = 4

If you want some test code, just let me know. Though it’s pretty much just what’s described on: