Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Gamers & Players
  • Search

ld.so (...) LD_PRELOAD cannot be preloaded using optirun

Having problems getting your favorite Linux game to work? Want to discuss strategies? This is the place!
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
Author
Message
edjorqs
n00b
n00b
User avatar
Posts: 6
Joined: Sun Mar 22, 2020 1:23 am

ld.so (...) LD_PRELOAD cannot be preloaded using optirun

  • Quote

Post by edjorqs » Wed Apr 01, 2020 12:15 am

Hi, my sytem has these this hardware:

Code: Select all

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
01:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX150] (rev a1)
When I launch a Game on lutris, for example, the output in terminal is the following

Code: Select all

Running optirun -b virtualgl /home/user/.local/share/Steam/steamapps/common/Proton 4.11/dist/bin/wine /home/user/Games/wine-prefix-nba2k13/drive_c/Program Files (x86)/2K Sports/NBA 2K13/nba2k13.exe
xauth: (argv):1:  unable to read any entries from file "/var/lib/VirtualGL/vgl_xauth_key"
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
And my Nvidia card isn't in use, when I look for nvtop, for example, the output is this:

Code: Select all

  PID USER GPU    TYPE        GPU MEM    CPU  HOST MEM Command
12017 root   0 Graphic      5MiB   0%     0%     44MiB Xorg :8 -config /etc/bumblebee/xorg.conf
29023 user   0 Graphic      2MiB   0%     0%    126MiB ./steamwebhelper -lang=en_US -cachedir=/
And the new process keeps using 0% of the GPU.

I have tried to figure out, most of people get this solved by running

Code: Select all

LD_PRELOAD=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6  [(optirun -b virtualgl) or (primusrun)] /path/to/some/game
but I have no success with this, the output is almost the same:

Code: Select all

xauth: (argv):1:  unable to read any entries from file "/var/lib/VirtualGL/vgl_xauth_key"
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
What could I do to get the GPU working with optirun? I appreciate any help :)

Edit:
I forgot to add this: when I run optirun glxgears, this uses perfectly the GPU, which I can see in nvtop, but I don't know why running games this down't work.
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

Re: ld.so (...) LD_PRELOAD cannot be preloaded using optirun

  • Quote

Post by GDH-gentoo » Wed Apr 01, 2020 3:38 pm

edjorqs wrote:

Code: Select all

xauth: (argv):1:  unable to read any entries from file "/var/lib/VirtualGL/vgl_xauth_key"
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
32-bit / 64-bit mismatch? At least in libstdc++'s case, on amd64 Gentoo with a multilib profile, the 32-bit shared library from GCC 9.2.0 is in /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32:

Code: Select all

$ file /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6.0.27 
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6.0.27: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, stripped
$ file /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6.0.27 
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6.0.27: ELF 32-bit LSB shared object, Intel 80386, version 1 (GNU/Linux), dynamically linked, stripped
Top
edjorqs
n00b
n00b
User avatar
Posts: 6
Joined: Sun Mar 22, 2020 1:23 am

  • Quote

Post by edjorqs » Wed Apr 01, 2020 5:26 pm

Thanks for your response!
I'm kind of newbie (n00b, as you can see below my name), I'm not familiarized about 32-bit / 64-bit mismatch, but when I do the same as you, the output is this

Code: Select all

~ $ file /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6.0.27
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6.0.27: ELF 64-bit LSB shared object, x86-64, version
1 (GNU/Linux), dynamically linked, stripped
~ $ file /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6.0.27
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6.0.27: ELF 32-bit LSB shared object, Intel 80386,
version 1 (GNU/Linux), dynamically linked, stripped
Then two questions arrived to me: What does it mean and what can I do?
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Thu Apr 02, 2020 1:00 am

I don't know about optirun, primusrun or Lutris, but what I meant is that the "wrong ELF class: ELFCLASS64" message suggests that you are trying to run a 32-bit program, but the libraries you specify as the value of LD_PRELOAD are 64-bit libraries. The output of the file command, which you can use with programs and shared libraries, tells you whether it is 32-bit or 64-bit ("ELF 32-bit" vs "ELF 64-bit").
Top
edjorqs
n00b
n00b
User avatar
Posts: 6
Joined: Sun Mar 22, 2020 1:23 am

  • Quote

Post by edjorqs » Thu Apr 02, 2020 4:48 pm

How can I specify ELF 32-bit?
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Thu Apr 02, 2020 5:20 pm

What's the exact command that gives those errors about libdlfaker.so and libvglfaker.so?
Top
edjorqs
n00b
n00b
User avatar
Posts: 6
Joined: Sun Mar 22, 2020 1:23 am

  • Quote

Post by edjorqs » Thu Apr 02, 2020 8:49 pm

This code:

Code: Select all

optirun -b virtualgl "/home/user/.local/share/Steam/steamapps/common/Proton 4.11/dist/bin/wine" "/home/user/Games/wine-prefix-nba2k13/drive_c/Program Files (x86)/2K Sports/NBA 2K13/nba2k13.exe"
Also, if I run

Code: Select all

LD_PRELOAD=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6  optirun -b virtualgl "/home/lalo/.local/share/Steam/steamapps/common/Proton 4.11/dist/bin/wine" "/home/lalo/Games/wine-prefix-nba2k13/drive_c/Program Files (x86)/2K Sports/NBA 2K13/nba2k13.exe"
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
xauth: (argv):1:  unable to read any entries from file "/var/lib/VirtualGL/vgl_xauth_key"
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
wineserver: using server-side synchronization.
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
000b:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 5/04/2020, dlt (d/m/y): 6/09/2020
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
000b:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2).
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
000f:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 5/04/2020, dlt (d/m/y): 6/09/2020
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
0012:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 5/04/2020, dlt (d/m/y): 6/09/2020
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
0019:fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for -03, bias 240, std (d/m/y): 5/04/2020, dlt (d/m/y): 6/09/2020
001b:err:module:load_so_dll failed to load .so lib "/home/lalo/.local/share/Steam/steamapps/common/Proton 4.11/dist/bin/../lib64/wine/winebus.sys.so": libudev.so.0: cannot open shared object file: No such file or directory
001b:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\WineBus": c0000142
000f:fixme:service:scmdatabase_autostart_services Auto-start service L"WineBus" failed to start: 1114
ERROR: ld.so: object '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/32/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
^C[45905.548205] [WARN]Received Interrupt signal.
0009:err:seh:raise_exception Unhandled exception code c000013a flags 0 addr 0xf7f17bd9
...
The game starts, but without using the dedicated graphic card
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Thu Apr 02, 2020 10:25 pm

I see. I'm sorry, I'm not familiar enough with optirun to help any further.
Top
Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Gamers & Players”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic