Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Nvidia Optimus - Can't use OpenGL

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
-iak-
Posts: 27
Joined: 2017-10-16 17:02

Nvidia Optimus - Can't use OpenGL

#1 Post by -iak- »

Hello, I'm using Debian Stable with Sid repos (I need the Xfce HiDPI support). I tried Bumblebee and then switched back to Nvidia Prime render offload, and now I can't run apps in openGL.

Code: Select all

yak@yak:~$ nvidia-optimus-offload-glx glxgears
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  25
  Current serial number in output stream:  26
Some info:

Code: Select all

yak@yak:~$ lspci | egrep 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 02)
02:00.0 3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)

Code: Select all

yak@yak:~$ uname -r
5.9.0-1-amd64

Code: Select all

yak@yak:~$ apt policy nvidia-driver
nvidia-driver:
  Installato: 450.80.02-1
  Candidato:  450.80.02-1

Code: Select all

yak@yak:~$ glxinfo | grep render
direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_OML_swap_method, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_IBM_multimode_draw_arrays, GL_INTEL_blackhole_render, 
    GL_NV_conditional_render, GL_NV_copy_image, GL_NV_depth_clamp, 
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_INTEL_blackhole_render, GL_INTEL_performance_query, 
    GL_NV_compute_shader_derivatives, GL_NV_conditional_render, 
    GL_EXT_read_format_bgra, GL_EXT_render_snorm, GL_EXT_robustness, 
    GL_EXT_texture_view, GL_EXT_unpack_subimage, GL_INTEL_blackhole_render, 
    GL_NV_conditional_render, GL_NV_draw_buffers, GL_NV_fbo_color_attachments, 
    GL_OES_element_index_uint, GL_OES_fbo_render_mipmap,
Please note that if I run

Code: Select all

nvidia-optimus-offload-glx firefox
I got no errors and everything works like a charm.

Sorry if I provided incomplete information, I'm new to nvidia and hybrid graphics.
Is there a way to make thing work again without reinstalling the whole system?

User avatar
sunrat
Administrator
Administrator
Posts: 6458
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 472 times

Re: Nvidia Optimus - Can't use OpenGL

#2 Post by sunrat »

-iak- wrote:Debian Stable with Sid repos
That's totally unsupported and commonly called "Frankendebian". If you need Xfce from Sid it would be best to go completely with Sid and learn how to deal with eternal upgrades, or use a distro which supports a more recent Xfce such as MX-Linux.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

-iak-
Posts: 27
Joined: 2017-10-16 17:02

Re: Nvidia Optimus - Can't use OpenGL

#3 Post by -iak- »

Are you sure that the problem comes from the crossed packages and libraries?
I'll give another try to Sid when I will feel ready, I encountered boot problems several times with that, furthermore in this moment I can't reinstall. What can I do to investigate the causes of my problem?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Nvidia Optimus - Can't use OpenGL

#4 Post by stevepusser »

Telling us which packages you have installed from Sid would be just the start. Then you could become an expert on openGL to determine which of those packages is breaking your openGL.

You are in the first stage of coming to terms with FrankenDebian, which is denial. The next is anger.
MX Linux packager and developer

-iak-
Posts: 27
Joined: 2017-10-16 17:02

Re: Nvidia Optimus - Can't use OpenGL

#5 Post by -iak- »

stevepusser wrote:You are in the first stage of coming to terms with FrankenDebian, which is denial. The next is anger.
I did not mean to discuss with your experience, my apologies. I am thinking of switching to MX, will I be able to use nvidia prime render offload, since it gives better performances than bumblebee?

I tried it in live mode and I really like it, installed the proprietary drivers (nvidia-detect -> sudo apt intall nvidia-driver), blacklisted nouveau and tried again, and got the same error. Is it just because I'm in a live mode or am I missing something?

Code: Select all

demo@mx1:~
$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  25
  Current serial number in output stream:  26

frazatto
Posts: 34
Joined: 2018-06-21 11:48
Has thanked: 3 times

Re: Nvidia Optimus - Can't use OpenGL

#6 Post by frazatto »

Wooooww....I don't believe I can help with this subject.

Take a look at this: https://wiki.debian.org/NVIDIA%20Optimus
There are some options to get your setup to work, after a lot of trying I just gave up and I'm using the "Using only one GPU" option. Very bad for battery life, but it makes everything work.

The thing is, just using the backport driver doesn't make offloading to work, you need X.Org Server at least 1.20.6, and if you check buster https://packages.debian.org/buster/xserver-xorg-core is still 1.20.4.

And here is where I"m stuck, I don't seam to find a way to upgrade xserver-xorg-core (the package that matters) to a version that actually works with the offload commands.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Nvidia Optimus - Can't use OpenGL

#7 Post by stevepusser »

MX has its own Nvidia Installer applet which detects Optimus systems and sets up Bumblebee for those. Just installing nvidia-driver on an Optimus system won't do it, plus the usual reboot needed will reset the standard LiveUSB to the beginning. Setting up and using a persistent LiveUSB will work, though.

I've never tried it, but we have reports that using the Debian wiki method of setting up and using Prime rendering does work on MX. Maybe we can offer that as a choice in the future for the MX Nvidia Installer, with warnings that your machine will use a lot more juice and run hotter.
MX Linux packager and developer

Post Reply