Skip to content

Can't load the overlay over flatpak Steam #5951

Open
@carlocastoldi

Description

The issue

Flatpak does not allow to punch a hole in the sandbox for some directories such as /lib, /lib32, /usr. I tried to copy the required libraries in Steam flatpak's directory in order to load the overlay:

cp /usr/lib32/libGL.so.1.7.0 /home/$USER/.var/app/com.valvesoftware.Steam/.local/share/Steam/linux32
cp /usr/lib/mumble/libmumbleoverlay.x86.so /home/$USER/.var/app/com.valvesoftware.Steam/.local/share/Steam/linux32
cd /home/$USER/.var/app/com.valvesoftware.Steam/.local/share/Steam/linux32
ln -s libGL.so.1.7.0 libGL.so.1
ln -s libGL.so.1 libGL.so

I then proceeded by setting the game launch options to:
LD_PRELOAD=/home/user/.local/share/Steam/linux32/libmumbleoverlay.x86.so:/home/user/.local/share/Steam/linux32/libGL.so %command%

However, the game (TF2) still does not show the overlay if launched through flatpak Steam.

Full flatpak log [does not work]
/bin/sh\0-c\0LD_PRELOAD=/home/carlo/.local/share/Steam/linux32/libmumbleoverlay.x86.so:/home/carlo/.local/share/Steam/linux32/libGL.so  /home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=440 -- /home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Team Fortress 2/hl2.sh' -game tf -steam -novid -nojoy -nosteamcontroller -nohltv -particles 1 -precachefontchars\0
Game process added : AppID 440 "LD_PRELOAD=/home/carlo/.local/share/Steam/linux32/libmumbleoverlay.x86.so:/home/carlo/.local/share/Steam/linux32/libGL.so  /home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=440 -- /home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Team Fortress 2/hl2.sh' -game tf -steam -novid -nojoy -nosteamcontroller -nohltv -particles 1 -precachefontchars", ProcID 419, IP 0.0.0.0:0
chdir /home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Team Fortress 2
GameAction [AppID 440, ActionID 1] : LaunchApp changed task to WaitingGameWindow with ""
ERROR: ld.so: object '/home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/carlo/.local/share/Steam/linux32/libmumbleoverlay.x86.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/carlo/.local/share/Steam/linux32/libGL.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/carlo/.local/share/Steam/linux32/libmumbleoverlay.x86.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/carlo/.local/share/Steam/linux32/libGL.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/carlo/.local/share/Steam/linux32/libmumbleoverlay.x86.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/carlo/.local/share/Steam/linux32/libGL.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
GameAction [AppID 440, ActionID 1] : LaunchApp changed task to Completed with ""
SDL video target is 'x11'
SDL video target is 'x11'
This system supports the OpenGL extension GL_EXT_framebuffer_object.
This system supports the OpenGL extension GL_EXT_framebuffer_blit.
This system supports the OpenGL extension GL_EXT_framebuffer_multisample.
This system DOES NOT support the OpenGL extension GL_APPLE_fence.
This system DOES NOT support the OpenGL extension GL_NV_fence.
This system supports the OpenGL extension GL_ARB_sync.
This system supports the OpenGL extension GL_EXT_draw_buffers2.
This system DOES NOT support the OpenGL extension GL_EXT_bindable_uniform.
This system DOES NOT support the OpenGL extension GL_APPLE_flush_buffer_range.
This system supports the OpenGL extension GL_ARB_map_buffer_range.
This system supports the OpenGL extension GL_ARB_vertex_buffer_object.
This system supports the OpenGL extension GL_ARB_occlusion_query.
This system DOES NOT support the OpenGL extension GL_APPLE_texture_range.
This system DOES NOT support the OpenGL extension GL_APPLE_client_storage.
This system DOES NOT support the OpenGL extension GL_ARB_uniform_buffer.
This system supports the OpenGL extension GL_ARB_vertex_array_bgra.
This system supports the OpenGL extension GL_EXT_vertex_array_bgra.
This system supports the OpenGL extension GL_ARB_framebuffer_object.
This system DOES NOT support the OpenGL extension GL_GREMEDY_string_marker.
This system supports the OpenGL extension GL_ARB_debug_output.
This system supports the OpenGL extension GL_EXT_direct_state_access.
This system DOES NOT support the OpenGL extension GL_NV_bindless_texture.
This system supports the OpenGL extension GL_AMD_pinned_memory.
This system supports the OpenGL extension GL_EXT_framebuffer_multisample_blit_scaled.
This system supports the OpenGL extension GL_EXT_texture_sRGB_decode.
This system DOES NOT support the OpenGL extension GL_NVX_gpu_memory_info.
This system DOES NOT support the OpenGL extension GL_ATI_meminfo.
This system supports the OpenGL extension GL_EXT_texture_compression_s3tc.
This system supports the OpenGL extension GL_EXT_texture_compression_dxt1.
This system supports the OpenGL extension GL_ANGLE_texture_compression_dxt3.
This system supports the OpenGL extension GL_ANGLE_texture_compression_dxt5.
This system supports the OpenGL extension GL_ARB_buffer_storage.
This system supports the OpenGL extension GLX_EXT_swap_control_tear.
OpenGL: Mesa Intel(R) UHD Graphics 620 (KBL GT2) 4.6 (Compatibility Profile) Mesa 22.1.7 (git-7a3414c4bd) (4.6.0)
GL_NV_bindless_texture: DISABLED
GL_AMD_pinned_memory: DISABLED
GL_ARB_buffer_storage: AVAILABLE
GL_EXT_texture_sRGB_decode: AVAILABLE
Installing breakpad exception handler for appid(steam)/version(1666144119)
Using Breakpad minidump system. Version: 7638371 AppID: 440
Setting breakpad minidump AppID = 440
Using breakpad crash handler
[S_API] SteamAPI_Init(): Loaded '/home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/linux32/steamclient.so' OK.
Game process updated : AppID 440 "LD_PRELOAD=/home/carlo/.local/share/Steam/linux32/libmumbleoverlay.x86.so:/home/carlo/.local/share/Steam/linux32/libGL.so  /home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=440 -- /home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/carlo/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Team Fortress 2/hl2.sh' -game tf -steam -novid -nojoy -nosteamcontroller -nohltv -particles 1 -precachefontchars", ProcID 423, IP 0.0.0.0:0
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561198041836298 [API loaded yes]
SteamInternal_SetMinidumpSteamID:  Setting Steam ID:  76561198041836298
Installing breakpad exception handler for appid(steam)/version(1666144119)
Installing breakpad exception handler for appid(steam)/version(1666144119)
GL_NVX_gpu_memory_info: UNAVAILABLE
GL_ATI_meminfo: UNAVAILABLE
GL_MAX_SAMPLES_EXT: 16
CShaderDeviceMgrBase::GetRecommendedConfigurationInfo: CPU speed: 3600 MHz, Processor: GenuineIntel
GlobalMemoryStatus: 4294967295
CShaderDeviceMgrBase::GetRecommendedConfigurationInfo: CPU speed: 3600 MHz, Processor: GenuineIntel
GlobalMemoryStatus: 4294967295
IDirect3DDevice9::Create: BackBufWidth: 1280, BackBufHeight: 720, D3DFMT: 3, BackBufCount: 1, MultisampleType: 0, MultisampleQuality: 0
GL sampler object usage: DISABLED

 ##### swap interval = 0     swap limit = 1 #####
IDirect3DDevice9::CreatePixelShader: shaderapi's centroid mask (0x00000004) differs from mask derived from shader name (0x0000000C) for shader ps-file shatteredglass_ps20b ps-index 40 ps-combo 0
Loaded program cache file "glbaseshaders.cfg", total keyvalues: 2227, total successfully linked: 2227
Loaded program cache file "glshaders.cfg", total keyvalues: 2464, total successfully linked: 2464
Precache: Took 3152 ms, Vertex 225, Pixel 1445
server.so loaded for "Team Fortress"

It works as intended if I launch it from shell with the following commands:

cd /home/$USER/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/Team\ Fortress\ 2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/bin:/usr/lib:/usr/lib32
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/$USER/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-runtime/lib/i386-linux-gnu
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/$USER/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/i386-linux-gnu
LD_PRELOAD=/usr/lib/mumble/libmumbleoverlay.x86.so:/usr/lib32/libGL.so ./hl2.sh -game tf
Full shell log [works as intended]
ERROR: ld.so: object '/usr/lib/mumble/libmumbleoverlay.x86.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib32/libGL.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/mumble/libmumbleoverlay.x86.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib32/libGL.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
SDL video target is 'x11'
SDL video target is 'x11'
This system supports the OpenGL extension GL_EXT_framebuffer_object.
This system supports the OpenGL extension GL_EXT_framebuffer_blit.
This system supports the OpenGL extension GL_EXT_framebuffer_multisample.
This system DOES NOT support the OpenGL extension GL_APPLE_fence.
This system DOES NOT support the OpenGL extension GL_NV_fence.
This system supports the OpenGL extension GL_ARB_sync.
This system supports the OpenGL extension GL_EXT_draw_buffers2.
This system DOES NOT support the OpenGL extension GL_EXT_bindable_uniform.
This system DOES NOT support the OpenGL extension GL_APPLE_flush_buffer_range.
This system supports the OpenGL extension GL_ARB_map_buffer_range.
This system supports the OpenGL extension GL_ARB_vertex_buffer_object.
This system supports the OpenGL extension GL_ARB_occlusion_query.
This system DOES NOT support the OpenGL extension GL_APPLE_texture_range.
This system DOES NOT support the OpenGL extension GL_APPLE_client_storage.
This system DOES NOT support the OpenGL extension GL_ARB_uniform_buffer.
This system supports the OpenGL extension GL_ARB_vertex_array_bgra.
This system supports the OpenGL extension GL_EXT_vertex_array_bgra.
This system supports the OpenGL extension GL_ARB_framebuffer_object.
This system DOES NOT support the OpenGL extension GL_GREMEDY_string_marker.
This system supports the OpenGL extension GL_ARB_debug_output.
This system supports the OpenGL extension GL_EXT_direct_state_access.
This system DOES NOT support the OpenGL extension GL_NV_bindless_texture.
This system supports the OpenGL extension GL_AMD_pinned_memory.
This system supports the OpenGL extension GL_EXT_framebuffer_multisample_blit_scaled.
This system supports the OpenGL extension GL_EXT_texture_sRGB_decode.
This system DOES NOT support the OpenGL extension GL_NVX_gpu_memory_info.
This system DOES NOT support the OpenGL extension GL_ATI_meminfo.
This system supports the OpenGL extension GL_EXT_texture_compression_s3tc.
This system supports the OpenGL extension GL_EXT_texture_compression_dxt1.
This system supports the OpenGL extension GL_ANGLE_texture_compression_dxt3.
This system supports the OpenGL extension GL_ANGLE_texture_compression_dxt5.
This system supports the OpenGL extension GL_ARB_buffer_storage.
This system supports the OpenGL extension GLX_EXT_swap_control_tear.
OpenGL: Mesa Intel(R) UHD Graphics 620 (KBL GT2) 4.6 (Compatibility Profile) Mesa 22.2.1 (4.6.0)
GL_NV_bindless_texture: DISABLED
GL_AMD_pinned_memory: DISABLED
GL_ARB_buffer_storage: AVAILABLE
GL_EXT_texture_sRGB_decode: AVAILABLE
Using Breakpad minidump system. Version: 7638371 AppID: 440
Setting breakpad minidump AppID = 440
Using breakpad crash handler
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
dlopen failed trying to load:
/home/carlo/.steam/sdk32/steamclient.so
with error:
/home/carlo/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory
[S_API] SteamAPI_Init(): Sys_LoadModule failed to load: /home/carlo/.steam/sdk32/steamclient.so
No Steam interfaces - attempting to initialize SteamNetworkingSockets without steam support
[SteamNetworkingSockets] WARNING: No ISteamUtils: Using local time!
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
dlopen failed trying to load:
/home/carlo/.steam/sdk32/steamclient.so
with error:
/home/carlo/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory
[S_API] SteamAPI_Init(): Sys_LoadModule failed to load: /home/carlo/.steam/sdk32/steamclient.so
Did not detect any valid joysticks.
GL_NVX_gpu_memory_info: UNAVAILABLE
GL_ATI_meminfo: UNAVAILABLE
GL_MAX_SAMPLES_EXT: 16
CShaderDeviceMgrBase::GetRecommendedConfigurationInfo: CPU speed: 3600 MHz, Processor: GenuineIntel
GlobalMemoryStatus: 4294967295
CShaderDeviceMgrBase::GetRecommendedConfigurationInfo: CPU speed: 3600 MHz, Processor: GenuineIntel
GlobalMemoryStatus: 4294967295
IDirect3DDevice9::Create: BackBufWidth: 1280, BackBufHeight: 720, D3DFMT: 3, BackBufCount: 1, MultisampleType: 0, MultisampleQuality: 0
GL sampler object usage: DISABLED

 ##### swap interval = 0     swap limit = 1 #####
IDirect3DDevice9::CreatePixelShader: shaderapi's centroid mask (0x00000004) differs from mask derived from shader name (0x0000000C) for shader ps-file shatteredglass_ps20b ps-index 40 ps-combo 0
Loaded program cache file "glbaseshaders.cfg", total keyvalues: 2227, total successfully linked: 2227
Loaded program cache file "glshaders.cfg", total keyvalues: 2464, total successfully linked: 2464
Precache: Took 3123 ms, Vertex 224, Pixel 1444
server.so loaded for "Team Fortress"

Any idea of how I can set the flatpak correctly in order to be able to access the right (system) libraries so that I can have the overlay?

Mumble version

1.4.0 + #5949

Mumble component

Client

OS

Linux

Additional information

Twin flatapk Steam issue: 997

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions