Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia driver could not be loaded from '/usr/lib/libGLX_nvidia.so.0'. #85

Open
LichGirl opened this issue Dec 6, 2020 · 8 comments
Open

Comments

@LichGirl
Copy link

LichGirl commented Dec 6, 2020

PrimusVK: ERROR! Nvidia driver could not be loaded from '/usr/lib/libGLX_nvidia.so.0'.

Problem occurs when launching steam games with pvkrun, full log from start to finish is here.

archlinux 5.9.11-arch2-1

Using arch packages here and here.

vkcube runs with pvkrun but oddly will not on intel:

INTEL-MESA: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Can't find our preferred formats... Falling back to first exposed format. Rendering may be incorrect.
Segmentation fault (core dumped)

Note that the file does exist as a link to a shared library (application/x-sharedlib)

Can someone advise fix

@felixdoerre
Copy link
Owner

felixdoerre commented Dec 6, 2020

I am not using archlinux so I don't really know/can experiment with the way graphics drivers are installed on archlinux. Therefore the best I can do is start guessing a bit in the hope that it might help.
/usr/lib/libGLX_nvidia.so.0 is the path that the 64-bit primus_vk-package configures on arch: https://github.com/archlinux/svntogit-community/blob/packages/primus_vk/trunk/PKGBUILD#L43, so you are trying to launch a 64-bit application through steam.
You say that /usr/lib/libGLX_nvidia.so.0 exists and is a symlink of which the target also exists, right?
The error message is caused by dlopen failing to load the shared library:

nvDriver = dlopen(this_driver.c_str(), RTLD_LOCAL | RTLD_LAZY);

So if the file exists, ld.so probably fails to find all the necessary dependencies and fails because of that.
I am not sure why the non-pvkrun of vkcube crashes, because primus_vk should not influence such a run at all.

My best guess is that the steam environment is breaking primus_vk. You could try the following:
Set the steam-launch command of the target-game to pvkrun vkcube # %command% and try to launch vkcube from within the steam environment for that game. I guess that this will fail as well, but it would be good to try out.

If this command also fails, we need to identify which library is really missing/can not be resolved. I would suggest that you set the steam-launch-command to LD_DEBUG=libs pvkrun vkcube # %command% and post the output. That way we should be able to observe the library that is not fitting.

@LichGirl LichGirl reopened this Dec 10, 2020
@LichGirl
Copy link
Author

LichGirl commented Dec 10, 2020

@felixdoerre vkcube actually will run in steam on the game, but the game will still throw the same error message. Vkcube not running on intel gpu was resolved because there was a rogue amd vulkan package on my system. Here's a full log of pvkrun vkcube # %command%: https://pastebin.com/h9XAN9fU

@felixdoerre
Copy link
Owner

It is interesting that the error that you opened the ticket for also appears in the vkcube-output, line 145:

PrimusVK: ERROR! Nvidia driver could not be loaded from '/usr/lib/libGLX_nvidia.so.0'.

So this does not seem to be caused by the game but by something that runs before the game. The actual output from the game starts in line 228 after this error message, so I begin to suspect that the reason the game does not start is something else. Does the game launch when you start it without pvkrun?

@LichGirl
Copy link
Author

@felixdoerre Yes, it will open without pvkrun. Additionally, pvkrun functions on everything except steam, dolphin-emu with vulkan shaders, etc, will run with pvkrun. It's possible the error is not related or perhaps only steam causes a fatal error because of the error. Not sure how to diagnose further.

@felixdoerre
Copy link
Owner

felixdoerre commented Dec 12, 2020

I suppose this game runs with proton, so the usual proton-debugging hints can be used. So here is a suggestion how we might get more output from the game:

  • run the game with PROTON_DUMP_DEBUG_COMMANDS=1 so it will write commands to directly start the game to /tmp/proton_$USER/
  • patch the run file to include LD_DEBUG=libs pvkrun directly before the path to the wine executable (in the last line)
  • run tine run executable and see what happens/post the output.

(I don't own the game, so I can't say if its a problem with the game or just setup on your system, but as you say pvkrun runs with with other games, it might be something specific to this game)

@heyrict
Copy link

heyrict commented Mar 5, 2021

Pardon here. I'm having a similar problem on another game.
Using the patched run file described in #85 (comment) works for me, while starting directly from steam play don't.

Another thing I noticed is that, I started the game with LD_DEBUG=libs pvkrun %command%, but /proc/acpi/bbswitch equals to OFF when the game starts.

It seems that steam calls /bin/sh -c LD_DEBUG=libs pvkrun '~/.steam/steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --deploy=soldier --suite=soldier --verb=waitforexitandrun -- /path/to/game.exe rather than starting the game directly, which does not pass pvkrun to the run command.

Should we report it to the proton developers?

@felixdoerre
Copy link
Owner

From that commandline it seems that you are using pressure vessels, the new isolated steam runtime. In this runtime the games are launched in a new mount namespace, where steam automatically tries to copy all graphics drivers into manually. Naturally it misses all the config that is required for primus (including the bumblebee socket and others). I've discussed this already on the steam runtime repository: ValveSoftware/steam-runtime#274 (comment) and currently there seems to be little interest to invest much effort into making primus and/or primus_vk working inside those pressure vessels. So I guess this would count as "reported" and there is not much that you can do except from going back to the older, scout, runtime.

@felixdoerre
Copy link
Owner

Hi, @heyrict @fxthomas

In case you still want to run games with modern proton inside pressure vessels. It seems the steam runtime increased compatibility in the meantime and I was able to run a game with primus_vk with Proton 6.3-7 inside a pressure vessel.

It seems that the primus_vk layer and its corresponding libraries are now correctly copied into the container. We just need to start bumblebee outside and only enable primus_vk and skip initializing primus (for which I still don't see an easy solution).

So the command/configuration that I used inside steam:

ENABLE_PRIMUS_LAYER=1 optirun -b none %command%

This command activates bumblebee outside, without enabling primus (optirun -b none) and activates the primus_vk layer (ENABLE_PRIMUS_LAYER=1). With this command I was able to run a game with primus_vk inside a pressure vessel!
Note that launching this way does not accelerate OpenGL graphics calls, as we don't activate primus. For that we would need to link more libraries and fiddle around with LD_LIBRARY_PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants