Prime offloader (__NV... and __GLX... vars) gives error when trying to use it

Hello. New here.

System:
openSUSE Leap 15.4
GeForce 940M, driver version 515.76
Using X, with Xorg server version 21.1.4

Xorg server 21.1.4 (Leap 15.4 only ships 1.20.3 by default, so had to use Xorg repo to update)

First tried checking if things looked fine at first sight in both Intel and Nvidia modes:

Intel mode:

test1@suse:~> xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x46; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 5; associated providers: 0; name: modesetting
output eDP-1
output DP-1
output HDMI-1
output DP-2
output HDMI-2
test1@suse:~>
test1@suse:~> glxinfo | grep “OpenGL renderer”
OpenGL renderer string: Mesa Intel(R) HD Graphics 620 (KBL GT2)

Nvidia mode:

test1@suse:~> xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1b7; cap: 0x1 (Source Output); crtcs: 0; outputs: 0; associated providers: 1; name: NVIDIA-0
Provider 1: id: 0x1de; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 5; associated providers: 1; name: modesetting
output eDP-1-1
output DP-1-1
output HDMI-1-1
output DP-1-2
output HDMI-1-2
test1@suse:~>
test1@suse:~> glxinfo | grep “OpenGL renderer”
OpenGL renderer string: NVIDIA GeForce 940MX/PCIe/SSE2

Looked fine until now.

But when trying to actually use the Prime offloader while in Intel mode, I only get errors. Examples:

test1@suse:~> __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep “OpenGL renderer”; echo $?
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: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 50
Current serial number in output stream: 51
1
test1@suse:~>
test1@suse:~> __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears; echo $?
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: 26
Current serial number in output stream: 27
1

And this same type of error with any app or game (though currently I don’t have any Vulkan games to test…)

Could someone help?
Thanks.

Render off load also needs two providers. In the intel case, it’s missing. Do you use any kind of optimus manager? Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

For Leap 15.4 I use this, as per the distro’s documentation:
https://
en.opensuse
.org/SDB:NVIDIA_SUSE_Prime
https://
github
.com/openSUSE/SUSEPrime
(Sorry, as new user system doesn’t allow me to post any links…)

So I switch modes with “prime-select”.
Notice that, according to the first link in the “Verification” section, having just one provider in Intel mode is fine
As additional comment, this manager has one detail in particular: when using “prime-select” it demands to forcibly log out from X session and back in to apply changes; rebooting without logging out and in does not actually work…

Attached here the nvidia-bug-report as requested.

Thanks.
nvidia-bug-report.log.gz (315.7 KB)

You’re in “intel” mode, meaning bbswitch was used to power off the nvidia gpu. Please switch to “offload” mode as per the SUSEPrime docs.

Thanks sir! That was the detail.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.