gamemode: PlayOnLinux: wrong ELF class: ELFCLASS64
Describe the bug My goal was to run League of Legends on Linux Mint 19.1 Cinnamon via PlayOnLinux + Wine 3.21-staging. The default install script of play on linux uses winxp + x86 arch as wine base but I also tried amd64 as the error (in my eyes) sais it needs x32 lib. During startup the following error happens
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
To Reproduce
- Linux Mint 19.1 Cinnamon + PlayOnLinux 4.x
- Install gamemode from git (1.2 or master) (will be installed into /usr/lib/x86_64-linux-gnu)
- Run POL
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgamemodeauto.so.0 playonlinux
- The error mentioned above will appear
Expected behavior I would not see any error and game mode would work properly.
System Info (please complete the following information):
- Linux Mint 19.1
- GameMode 1.2 or master
Additional context If using gimp instead of playonlinux it works.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 3
- Comments: 15 (3 by maintainers)
Pretty much the same issue here, with Linux Mint 21.1 Cinnamon (based on Ubuntu 22.04). The games won’t start because of the following:
I’m unsure exactly how PlayOnLinux works, but it may be that it ends up running a mix of 32-bit and 64-bit processes. Setting LD_PRELOAD will attempt to load that library into any process, and it will only succeed for processes that match the bit-ness of the library set in LD_PRELOAD. Any others will error.
Using this (note the slash before $LIB is needed):
LD_PRELOAD="/usr/\$LIB/libgamemodeauto.so.0"
should make ld.so pick the appropriate 32- or 64-bit library path for each process.If that doesn’t work, as long as the library path you’re using for preload is the right one for whether the game itself is 32- or 64-bit, things should still work. You can check that GameMode is active while you have the game running with:
systemctl --user status gamemoded
See the “Status” line, it should tell you whether or not it’s active.