Unable to use discrete card with optimus on linux
PCSX2 version: 1.5.0-20200414184025
Plugins used: libGSdx.so [GSdx (GCC 10.0.1 AVX2/AVX2) 1.2.0]
GSdx does not work with optimus under fedora32. It does work nicely using the integrated video-card, as well as using only the discrete card but it fails in an optimus setup.
More information: The machine is a dell laptop with integrated controller and discrete video card:
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06) 01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
I have recompiled pcsx2 from scratch and it works fine using the integrated (skylake) VGA. It also works if I use only the discrete card (NVIDIA), but there are other issues (unrelated to pcsx2) which make this not convenient for me.
If I try to run pcsx2 under the recommended setup with the providers set-up by xrandr as follows
Provider 0: id: 0x47 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 5 associated providers: 0 name:modesetting Provider 1: id: 0x266 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-G0
and offload the graphics to the nvidia card setting the environment variables
export __NV_PRIME_RENDER_OFFLOAD=1 export __GLX_VENDOR_LIBRARY_NAME=nvidia export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
then GSdx is unable to bind to the opengl driver.
The error message is
Opening plugins... Opening GS Error: GLLoader failed to get GL version Closing plugins... Closing GS Plugins closed successfully. Shutting down plugins... Plugins shutdown successfully. (p) GS plugin failed to open!(thread:MTGS)(thread:EE Core)
Actually, GSdx fails on const GLubyte* s = glGetString(GL_VERSION); in GLLoader.cpp and the returned string is null; I have no idea why, though.
This happens to me, I've noticed that in 1.4.0 version this doesn't happen and the game runs as expected, or at least on arch linux it runs well, but I've tested on various other distros that ship 1.5.0 or greater and it doesn't run, failing at the mentioned step.
I have a GTX 1050 4gb, configured with latest nvidia drivers and 32bit libraries.
Duplicate https://github.com/PCSX2/pcsx2/issues/2967