How to install OpenGL in fedora?

How to install OpenGL in Fedora?

What do you want to achieve?

1 Like

Actually I am unable to hardware accelerate android emulator in optimus setup. Read more at : Google Issue Tracker

It seems I have OpenGL installed

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.1.5
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.1.5
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.1.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Somethings wrong

glxgears launch failed, but can run Firefox without any issues


  X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  155 (NV-GLX)
  Minor opcode of failed request:  6 ()
  Value in failed request:  0x0
  Serial number of failed request:  29
  Current serial number in output stream:  29

I installed the drivers as mentioned in How to Set Nvidia as Primary GPU on Optimus-based Laptops :: Fedora Docs

But according to this post It seems I should try .run file from NVidia website.
Is it okay to install drivers from .run file?

1 Like
set | grep -e ^XDG_; lspci | grep -i -e vga -e hdmi \
| while read -r DEV_ID SKIP; do lspci -k -n -n -s ${DEV_ID}; done

What is the output?

1 Like
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07)
	Subsystem: ASUSTeK Computer Inc. Device [1043:10d1]
	Kernel driver in use: i915
	Kernel modules: i915

I did not set dGPU as primary as mentioned in here, since it would drain battery.

But I set Option "PrimaryGPU" "yes" to test whether it makes a difference and it did.
I could launch glxgears without any issues. I can even launch emulator without being segfault.

But I would like to have flexibility of using dGPU for specific applications. @vgaetera any way I can achieve that without facing the previously mentioned issues?

@vgaetera thanks for the help so far

For the record, i have a Dell notebook with nvidia and fully functioning nvidia card, and i get the same error if I leave off the preceding “__” from the command you entered. Try “__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears”