Facepunch / garrysmod-issues

Garry's Mod issue tracker
147 stars 56 forks source link

[Linux] The x86-64 version of the game does not run without additional libraries #5166

Open comminux opened 2 years ago

comminux commented 2 years ago

Details

OS: Linux Distribution: Arch Linux x86-64 Enabled Steam Runtime: No, used native. (steam.sh[9866]: STEAM_RUNTIME is disabled by the user)

The x86-64 version (branch) of the game does not start when completely reinstalling. In the process of launching the game, you may encounter the problem of missing some libraries:

[S_API] SteamAPI_Init(): Loaded '/home/rea/.local/share/Steam/linux64/steamclient.so' OK.
Game process updated : AppID 4000 "/home/rea/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=4000 -- '/home/rea/.local/share/Steam/steamapps/common/GarrysMod/hl2.sh' -steam -game garrysmod -condebug", ProcID 11195, IP 0.0.0.0:0
Setting breakpad minidump AppID = 4000
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561198163616095 [API loaded no]
FileSystem_LoadSearchPaths
Installing breakpad exception handler for appid(steam)/version(1644890991)
Did not detect any valid joysticks.
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/stdshader_dx6_client.so: (null)
Failed to load stdshader_dx6_client.so: (null)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/stdshader_dx7_client.so: (null)
Failed to load stdshader_dx7_client.so: (null)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/stdshader_dx8_client.so: (null)
Failed to load stdshader_dx8_client.so: (null)
Convar mat_monitorgamma has conflicting FCVAR_ARCHIVE flags (child: has FCVAR_ARCHIVE, parent: no FCVAR_ARCHIVE, parent wins)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/game_shader_dx6_client.so: (null)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/garrysmod/bin/game_shader_dx6_client.so: (null)
Failed to load game_shader_dx6_client.so: (null)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/game_shader_dx7_client.so: (null)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/garrysmod/bin/game_shader_dx7_client.so: (null)
Failed to load game_shader_dx7_client.so: (null)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/game_shader_dx8_client.so: (null)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/garrysmod/bin/game_shader_dx8_client.so: (null)
Failed to load game_shader_dx8_client.so: (null)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/game_shader_dx9_client.so: (null)
Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/garrysmod/bin/game_shader_dx9_client.so: (null)
Failed to load game_shader_dx9_client.so: (null)

 ##### swap interval = 0     swap limit = 1 #####
Could not load program cache file glbaseshaders.cfg
Could not find base GL shader cache file
CGLMShaderPair::SetProgramPair: Centroid masks differ at link time of vertex shader lightmappedgeneric_vs20 and pixel shader decalbasetimeslightmapalphablendselfillum2_ps20b!
CGLMShaderPair::SetProgramPair: Centroid masks differ at link time of vertex shader lightmappedgeneric_vs20 and pixel shader decalbasetimeslightmapalphablendselfillum2_ps20b!
Loaded program cache file "glshaders.cfg", total keyvalues: 1999, total successfully linked: 1999
Precache: Took 3750 ms, Vertex 3437, Pixel 5696
ConVarRef mat_dxlevel doesn't point to an existing ConVar
Game_client.so loaded for "Garry's Mod"
Installing breakpad exception handler for appid(steam)/version(1644890991)
[0215/234155.574471:INFO:cpu_info.cc(53)] Available number of cores: 12
[0215/234155.574534:VERBOSE1:zygote_main_linux.cc(215)] ZygoteMain: initializing 0 fork delegates
[0215/234155.577501:VERBOSE1:pref_proxy_config_tracker_impl.cc(184)] 0x7f87fc05cc10: set chrome proxy config service to 0x7f87fc05d420
[0215/234155.578168:VERBOSE1:webrtc_internals.cc(120)] Could not get the download directory.
[0215/234155.607995:ERROR:gl_implementation.cc(277)] Failed to load /home/rea/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/swiftshader/libGLESv2.so: /home/rea/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory
[0215/234155.608043:VERBOSE1:gpu_init.cc(308)] gl::init::InitializeStaticGLBindingsOneOff failed
[0215/234155.608688:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
[0215/234155.641249:VERBOSE1:sandbox_linux.cc(69)] Activated seccomp-bpf sandbox for process type: gpu-process.
[0215/234155.752320:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 1 time(s)
[0215/234155.779906:VERBOSE1:sandbox_linux.cc(69)] Activated seccomp-bpf sandbox for process type: gpu-process.
[0215/234155.893544:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 2 time(s)
[0215/234155.920039:VERBOSE1:sandbox_linux.cc(69)] Activated seccomp-bpf sandbox for process type: gpu-process.
[0215/234156.034147:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 3 time(s)
[0215/234156.034176:FATAL:gpu_data_manager_impl_private.cc(1034)] The display compositor is frequently crashing. Goodbye.
Installing breakpad exception handler for appid(steam)/version(1644890991)
Game process removed: AppID 4000 "/home/rea/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=4000 -- '/home/rea/.local/share/Steam/steamapps/common/GarrysMod/hl2.sh' -steam -game garrysmod -condebug", ProcID 11195
ThreadGetProcessExitCode: no such process 11195

The crash dump has been sent to the required email address.

Workaround

Copy the required libraries (libEGL.so and libGLESv2.so) from your system to the game folder. (For the Arch Linux distribution, use the contents of the libglvnd package, because installing this package into the system is not enough to run the game. Just copy the 2 libraries (/usr/lib/libEGL.so.1.1.0 and /usr/lib/libGLESv2.so.2.1.0) to the GarrysMod/bin/linux64/swiftshader and rename them, removing the version from the name.) However, a few weeks ago, this workaround stopped providing full functionality of the game. The game starts, but all graphical elements of the main menu are no longer displayed.

Summary

Please add the required libraries to the x86-64 branch and solve the problem with displaying the graphical elements of the main menu.

2022-02-16-003529_scrot

SilverMight commented 2 years ago

This does get you somewhere, but I think there is an additional problem with glibc that is making Chromium misbehave. Arch recently updated their whole toolchain, jumping glibc from version 2.32 to 2.35. Downgrading seems to fix Chromium crashing.

[0215/234155.608043:VERBOSE1:gpu_init.cc(308)] gl::init::InitializeStaticGLBindingsOneOff failed [0215/234155.608688:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization [0215/234155.641249:VERBOSE1:sandbox_linux.cc(69)] Activated seccomp-bpf sandbox for process type: gpu-process. [0215/234155.752320:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 1 time(s) [0215/234155.779906:VERBOSE1:sandbox_linux.cc(69)] Activated seccomp-bpf sandbox for process type: gpu-process. [0215/234155.893544:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 2 time(s) [0215/234155.920039:VERBOSE1:sandbox_linux.cc(69)] Activated seccomp-bpf sandbox for process type: gpu-process. [0215/234156.034147:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 3 time(s) [0215/234156.034176:FATAL:gpu_data_manager_impl_private.cc(1034)] The display compositor is frequently crashing. Goodbye.

It seems like there is a sandbox related issue, and just anecdotally, I can confirm that some Electron applications broke and using --no-sandbox restored their functionality (in a poor way of course).

Seems like this issue may be related.

suwakoshat commented 2 years ago

Same thing for me. I can no longer play Garry's Mod on the chromium branch

ghost commented 2 years ago

The game starts, but all graphical elements of the main menu are no longer displayed.

Here's a workaround for this: echo -n "\xB8\x00\x00\x00\x00\x5D\xC3" | dd of=libcef.so oflag=seek_bytes seek=89138564 conv=notrunc. It patches this function to return false.

WinterPhoenix commented 2 years ago

Could you guys try GModCEFCodecFix on GMod's x86-64 branch and let us know if that fixes it?

ghost commented 2 years ago

Could you guys try GModCEFCodecFix on GMod's x86-64 branch and let us know if that fixes it?

@WinterPhoenix Yea it works. I did it + Rubat Lua Menu days ago and it works.

WinterPhoenix commented 2 years ago

@WinterPhoenix Yea it works. I did it + Rubat Lua Menu days ago and it works.

You shouldn't need Rubat's Lua Menu anymore with this, unless that's just your preference

ghost commented 2 years ago

Could you guys try GModCEFCodecFix on GMod's x86-64 branch and let us know if that fixes it?

Thanks, this is much better than my workaround.

comminux commented 2 years ago

I confirm that using https://github.com/solsticegamestudios/GModCEFCodecFix fixes problems with starting the game and displaying the main menu.

ghost commented 2 years ago

Had an error where it couldn't find ~/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/swiftshader/libGLES.so and ~/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/swiftshader/libGLESv2.so, i just made a folder called swiftshader and made a copy of both files and put them in there. Fixed it for me!

gmod64bit commented 2 years ago

Copying those .so files worked for me too, if only the developers could fix their own game and not rely on the users to do it for them

(8 months of broken 64bit part 2)

ElectricPrism commented 2 years ago

Thanks @ghost and @gmod64bit -- that worked. I documented my process here to help others:

# Install Garry's Mod native for Linux

# In Steam, set Garry's Mod to use "Channel":
# "[ x86_64 - Chromium + 64 bit binaries ]"

# Make sure Chromium is installed
sudo pacman -S chromium

# As seen in `https://github.com/Facepunch/garrysmod-issues/issues/5166#issuecomment-1199925475`

# CREATE DIRECTORY
mkdir -p $HOME/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/swiftshader/

# Symlink to the Chromium Library ( I don't have a v1 so I just link both to v2)
ln -s /usr/lib/chromium/libGLESv2.so $HOME/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/swiftshader/libGLES.so

# Symlink to the Chromium Library
ln -s /usr/lib/chromium/libGLESv2.so $HOME/.local/share/Steam/steamapps/common/GarrysMod/bin/linux64/swiftshader/libGLESv2.so

# Download & Unpack to $HOME ~/
# https://github.com/solsticegamestudios/GModCEFCodecFix/releases

# Change Permissions
chmod +x $HOME/GModCEFCodecFix-Linux

# Launch
$HOME/GModCEFCodecFix-Linux

# !!!!! !!!!! !!!!! !!!!! !!!!!
# !! WORKS, Tested 2022-10-15
# !!!!! !!!!! !!!!! !!!!! !!!!!
hideki2k02 commented 1 year ago

Over an year and the problem still persists... https://github.com/solsticegamestudios/GModCEFCodecFix still fixes the problem.

KarlOfDuty commented 1 year ago

Will this issue get fixed at some point? Or at least have some official comment on it?

LethalManBoob commented 9 months ago

Still broken