Open carlocastoldi opened 1 year ago
@davidebeatrici any ideas?
Could you pass the MUMBLE_OVERLAY_DEBUG
environment variable and check the output again, please?
I always forget, sorry. Here it is: mumble-overlay-flatpak.log
I see many MumbleOverlay: connect() failure /run/user/1000/MumbleOverlayPipe
:[]
The usual problem: "sandbox" containers generally allow the bare minimum required in order for the application to work.
In this case the overlay library cannot access the socket that is created by Mumble, see https://docs.flatpak.org/en/latest/sandbox-permissions.html.
Do you know any way to punch a whole in the sandbox to allow system libraries to access a flatpak application?
currently steam has the following socket permissions:
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;
devices=all;
filesystem=xdg-run/MumbleOverlayPipe
I think.
That improved the logs, yes! But it is still not completely fixed: mumble-overlay-flatpak.log
I see a couple of MumbleOverlay: Failed to map memory
. Could be relevant: they are not present in un-sendboxed execution
As there has been no activity on this issue for a couple of days, we assume that your issue has been fixed in the meantime. Should this not be the case, please let us know.
If no further activity happens, this issue will be closed within 3 days.
it is not fixed!
As this is a flatpak-specific issue, it should be reported to https://github.com/flathub/info.mumble.Mumble/issues
well this is about using native Mumble with flatpak'd Steam. It should not be reported to flatpak Mumble.
But I guess that if atm @davidebeatrici can't figure it out from the log file, no one else can. In that case this issue remains unsolved
Then I misunderstood - but it remains a flatpak issue as it does not appear in unsandboxed environment.
I am trying to investigate on my own, then.
I'm no C++/Qt developer, tho. Could you please tell me how to properly compile /src/tests/OverlayTest.cpp
?
If it is not built when using -Dtests=ON
, I don't know. Perhaps @davidebeatrici knows?
Tests that don't have their own subdirectory have never been enabled. I personally never ran them.
Okay, me neither :shrug:
I discovered that --device=all
most probably does not include --device=shm
. I assumed that it did and lost a day investigating on the issue :sweat_smile:
Setting --device=shm
to Steam's flatpak solved it completely!
On the plus side: I managed to build OverlayTest.cpp
. I can share it but it's quite unorthodox: I couldn't manage to link mumble/SharedMemory.cpp
and mumble/SharedMemory_unix.cpp
, so I ended up doing a bad trick to make it work regardless
also: flatpak steam must be run after mumble. Don't know why: I thought it was a matter of preloading the overlay library when running the game...
Great to hear you got it working :+1:
Thanks!
However, do you have any idea why Mumble must be running before flatpak steam is launched? It otherwise cannot connect (error: connection refused
) to the local socket.
regarding Mumble having to be launched before flatpak Steam:
it seems like Steam can't see the connect to the local socket if Mumble is run after Steam (error: connection refused
).
If I go into flatpak's bash (flatpak run --command=bash com.valvesoftware.Steam
) I notice that permissions on the Mumble's local socket change:
[📦 com.valvesoftware.Steam ~]$ ls -l /run/user/1000/MumbleOverlayPipe
-r--r--r-- 1 carlo carlo 0 13 nov 10.24 /run/user/1000/MumbleOverlayPipe
❯ ls -l /run/user/1000/MumbleOverlayPipe
srwxrwxrwx 1 carlo carlo 0 13 nov 11.58 /run/user/1000/MumbleOverlayPipe
flatpak bash:
[📦 com.valvesoftware.Steam ~]$ ls -l /run/user/1000/MumbleOverlayPipe
srwxrwxrwx 1 carlo carlo 0 13 nov 12.00 /run/user/1000/MumbleOverlayPipe
host bash:
❯ ls -l /run/user/1000/MumbleOverlayPipe
srwxrwxrwx 1 carlo carlo 0 13 nov 12.00 /run/user/1000/MumbleOverlayPipe
#### Mumble _restarted_ with flapak Steam running. Doesn't work. Full permissions.
The number of hard links of the socket changes to `0`. I think this means that the socket was deleted. Date/time is wrong: indeed confirming that it points to the "old" socket and does not update the old one.
* flatpak bash:
```bash
[📦 com.valvesoftware.Steam ~]$ ls -l /run/user/1000/MumbleOverlayPipe
srwxrwxrwx 0 carlo carlo 0 13 nov 12.00 /run/user/1000/MumbleOverlayPipe
❯ ls -l /run/user/1000/MumbleOverlayPipe
srwxrwxrwx 1 carlo carlo 0 13 nov 12.10 /run/user/1000/MumbleOverlayPipe
on a similar note Discord, which also communicates with Steam through a local socket, doesn't have this problem. They create links to sockets that do not (yet) exist if Discord isn't running:
[📦 com.valvesoftware.Steam ~]$ ls -l /run/user/1000/
totale 0
-r--r--r-- 1 carlo carlo 0 13 nov 10.24 MumbleOverlayPipe
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-0 -> app/com.discordapp.Discord/discord-ipc-0
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-1 -> app/com.discordapp.Discord/discord-ipc-1
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-2 -> app/com.discordapp.Discord/discord-ipc-2
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-3 -> app/com.discordapp.Discord/discord-ipc-3
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-4 -> app/com.discordapp.Discord/discord-ipc-4
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-5 -> app/com.discordapp.Discord/discord-ipc-5
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-6 -> app/com.discordapp.Discord/discord-ipc-6
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-7 -> app/com.discordapp.Discord/discord-ipc-7
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-8 -> app/com.discordapp.Discord/discord-ipc-8
lrwxrwxrwx 1 carlo carlo 40 13 nov 10.24 discord-ipc-9 -> app/com.discordapp.Discord/discord-ipc-9
...
[📦 com.valvesoftware.Steam ~]$ ls -l /run/user/1000/app/com.discordapp.Discord/
totale 0
P.S. the following settings are set:
filesystem=xdg-run/MumbleOverlayPipe
filesystem=xdg-run/app/com.discordapp.Discord:create
https://github.com/flathub/com.valvesoftware.Steam/pull/273 is relevant. I'll try to make flatpak Steam maintainers aware of it. If they propose to do something similar to what they did to Discord, I'll come back to this issue
I have no idea about any of this, unfortunately :shrug:
I managed to make it work regardless if Mumble was running before Steam or not.
In order to make it work for everyone we should put all named pipes and local socket inside a subdir in $XDG_RUNTIME_DIR/
. Can I proceed working on a PR for that?
@davidebeatrici ?
Can we also change default runtime path, if $XDG_RUNTIME_DIR
is not set, to /run/user/<UID>
?
(can we re-open this issue, btw?)
I actually noticed that this was discussed in #1660, but @mkrautz asked to use $XDG_RUNTIME_DIR/MumbleSocket
and $XDG_RUNTIME_DIR/MumbleOverlayPipe
instead of creating a sub-directory $XDG_RUNTIME_DIR/mumble
. Don't know why, tho.
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: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:
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