Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting For com.valvesoftware.Steam To Default To Mesa-23.2.1 #1193

Closed
TeusLollo opened this issue Nov 2, 2023 · 14 comments
Closed

Requesting For com.valvesoftware.Steam To Default To Mesa-23.2.1 #1193

TeusLollo opened this issue Nov 2, 2023 · 14 comments

Comments

@TeusLollo
Copy link

We at Void were having the following non-distribution-specific error:

void-linux/void-packages#46649 quote for quote (Check the link for full description):

"
Relevant error log (Flatpak, but its steam-1.0.0.78_3 equivalent is largely identical) is as follows:

amdgpu_device_initialize: amdgpu_get_auth (1) failed (-1) amdgpu: amdgpu_device_initialize failed. libGL error: glx: failed to create dri3 screen libGL error: failed to load driver: radeonsi Steam Runtime Launch Service: starting steam-runtime-launcher-service Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 336 steam-runtime-launcher-service[336]: E: Unable to acquire bus name "com.steampowered.PressureVessel.LaunchAlongsideSteam" amdgpu_device_initialize: amdgpu_get_auth (1) failed (-1) amdgpu: amdgpu_device_initialize failed. libGL error: glx: failed to create dri3 screen libGL error: failed to load driver: radeonsi
"

Which was eventually solved by void-linux/void-packages#46649 (comment) (Update to mesa-23.2.1_2) at least on steam-for-linux native binary, confirming thus that mesa-23.1.9 indeed throws the aforementioned auth/libGL error.

com.valvesoftware.Steam still suffers from the aforementioned error, however, presumably due to defaulting to mesa-23.1.9.
Indeed, on my system:

flatpak list | grep "Mesa"
Mesa	        org.freedesktop.Platform.GL.default	23.1.9	22.08	        system
Mesa (Extra)	org.freedesktop.Platform.GL.default	23.1.9	22.08-extra	system
Mesa	        org.freedesktop.Platform.GL.default	23.2.1	23.08	        system
Mesa (Extra)	org.freedesktop.Platform.GL.default	23.2.1	23.08-extra	system
Mesa	        org.freedesktop.Platform.GL32.default	23.1.9	22.08	        system
Mesa (Extra)	org.freedesktop.Platform.GL32.default	23.1.9	22.08-extra	system
Mesa	        org.freedesktop.Platform.GL32.default	23.2.1	23.08	        system
Mesa (Extra)	org.freedesktop.Platform.GL32.default	23.2.1	23.08-extra	system

I presume thus that com.valvesoftware.Steam defaults to mesa-23.1.9, hence resulting in the aforementioned error.

Presumably, defaulting com.valvesoftware.Steam to mesa-23.2.1 would fix this error.

I thus formally request for maintainer(s) to try and verify if defaulting com.valvesoftware.Steam to mesa-23.2.1 would be possible in the near future.

Thanks to developers for all their efforts, regardless.

@nanonyme
Copy link
Collaborator

nanonyme commented Nov 7, 2023

Your assumption is incorrect. This app is using runtime version 23.08 and as such Mesa 23.2.1. Apps cannot choose which version of Mesa they use, they get whichever Mesa runtime ships.

@TeusLollo
Copy link
Author

TeusLollo commented Nov 7, 2023

Your assumption is incorrect. This app is using runtime version 23.08 and as such Mesa 23.2.1. Apps cannot choose which version of Mesa they use, they get whichever Mesa runtime ships.

Pardon. it's what we assumed on the Void repository. Me, I'm not familiar with flatpak development.

The error above still stands, however, and I know for certain that non-flatpak runtime version does not get such an error with mesa-23.2.1 (While it did on mesa-23.1.9), and also that com.valvesoftware.Steam still exhibits such an error despite me ensuring for com.valvesoftware.Steam to be updated to latest stable branch.

I may need to then close as not planned, but, before I do, any idea anyone what could be causing this error, otherwise?

@nanonyme
Copy link
Collaborator

nanonyme commented Nov 7, 2023

I'm not entirely fluent with what is happening here and whether pressure-vessel (subsandboxing) is related or not. It might be useful to have a simpler reproducer (without subsandbox)

@TeusLollo
Copy link
Author

TeusLollo commented Nov 8, 2023

Anything I can be of help with? Unfortunately, I'm not familiar enough with flatpak's inner workings.

Symptoms would point for the flatpak runtime to be calling for mesa-23.1.9, yet if it can only call mesa-23.2.1, why does this error (Which does not happen with the runtime running outside the sandbox) keep happening?

Maybe the sandbox has been breached, somehow?

EDIT: Clarified some things

@TeusLollo
Copy link
Author

TeusLollo commented Dec 5, 2023

Reddit user Z3roKelvin at https://reddit.com/r/voidlinux/comments/18b592n/steam_suddenly_not_working_on_flatpak/ has posted a very similar output:

I have been using the flatpak version of steam for about a month, and today it decided not to work. I looked at some other posts suggesting I should downgrade mesa, but that did nothing. I am using an AMD Radeon RX 6800 XT graphics card running the open source drivers on Xorg.

Here is what happens when I try to start steam:

INFO:root:https://github.com/flathub/com.valvesoftware.Steam/wiki
INFO:root:Will set XDG dirs prefix to /home/z3rokelvin/.var/app/com.valvesoftware.Steam
DEBUG:root:Checking input devices permissions
INFO:root:Overriding TZ to America/Los_Angeles
steam.sh[2]: Running Steam on org.freedesktop.platform 23.08 64-bit
steam.sh[2]: STEAM_RUNTIME is enabled automatically
setup.sh[74]: Steam runtime environment up-to-date!
steam.sh[2]: Steam client's requirements are satisfied
[2023-12-04 21:51:25] Startup - updater built Nov 29 2023 19:58:56
[2023-12-04 21:51:25] Startup - Steam Client launched with: '/home/z3rokelvin/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam' '-no-cef-sandbox'
12/04 21:51:25 Init: Installing breakpad exception handler for appid(steam)/version(1701289036)/tid(108)
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: radeonsi
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: radeonsi
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
SteamUpdateUI: An X Error occurred
X Error of failed request:  BadValue (integer parameter out of range for operation)
Major opcode of failed request:  152 (GLX)
Minor opcode of failed request:  3 (X_GLXCreateContext)
Value in failed request:  0x0
Serial number of failed request:  53
xerror_handler: X failed, continuing
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[2023-12-04 21:51:25] Loading cached metrics from disk (/home/z3rokelvin/.var/app/com.valvesoftware.Steam/.local/share/Steam/package/steam_client_metrics.bin)
[2023-12-04 21:51:25] Using the following download hosts for Public, Realm steamglobal
[2023-12-04 21:51:25] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2023-12-04 21:51:25] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2023-12-04 21:51:25] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2023-12-04 21:51:25] Checking for update on startup
[2023-12-04 21:51:25] Checking for available updates...
[2023-12-04 21:51:25] Downloading manifest: https://client-update.akamai.steamstatic.com/steam_client_ubuntu12
[2023-12-04 21:51:25] Manifest download: send request
[2023-12-04 21:51:25] Manifest download: waiting for download to finish
[2023-12-04 21:51:25] Manifest download: finished
[2023-12-04 21:51:25] Download skipped: /steam_client_ubuntu12 version 1701289036, installed version 1701289036, existing pending version 0
[2023-12-04 21:51:25] Nothing to do
[2023-12-04 21:51:25] Verifying installation...
[2023-12-04 21:51:25] Performing checksum verification of executable files
[2023-12-04 21:51:26] Verification complete

Steam logging initialized: directory: /home/z3rokelvin/.var/app/com.valvesoftware.Steam/.local/share/Steam/logs

XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xf61db8f0
XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xf61da1c0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: radeonsi
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: radeonsi
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
crash_20231204215126_5.dmp[133]: Uploading dump (out-of-process)
/tmp/dumps/crash_20231204215126_5.dmp
/home/z3rokelvin/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam.sh: line 798:   108 Segmentation fault      "$STEAMROOT/$STEAMEXEPATH" "$@"
[z3rokelvin@zkdesktop ~]$ crash_20231204215126_5.dmp[133]: Finished uploading minidump (out-of-process): success = yes
crash_20231204215126_5.dmp[133]: response: CrashID=bp-274edb55-cbc0-4949-9e31-8cef12231204
crash_20231204215126_5.dmp[133]: file ''/tmp/dumps/crash_20231204215126_5.dmp'', upload yes: ''CrashID=bp-274edb55-cbc0-4949-9e31-8cef12231204''

I can also confirm that the OP error persists even given updates of org.freedesktop.Platform.GL.default to 23.08

@TeusLollo
Copy link
Author

Given the following output of flatpak list as by the recent update:

Steam com.valvesoftware.Steam 1.0.0.78 stable system

The above issue still persists.

@nanonyme
Copy link
Collaborator

I assume everyone here has flatpak 1.12 or newer, right?

@TeusLollo
Copy link
Author

I assume everyone here has flatpak 1.12 or newer, right?

Output of flatpak --version:

Flatpak 1.15.6

@nanonyme
Copy link
Collaborator

If you run the app with flatpak run --env=LIBGL_DEBUG=verbose com.valvesoftware.Steam, it might possibly provide more information why exactly the drivers cannot be loaded.

@TeusLollo
Copy link
Author

TeusLollo commented Dec 22, 2023

This is getting weirder.
I did not install/remove any packages on my system except for regular rolling release updates.

Now I get this:

flatpak run --env=LIBGL_DEBUG=verbose com.valvesoftware.Steam

INFO:root:https://github.com/flathub/com.valvesoftware.Steam/wiki
INFO:root:Will set XDG dirs prefix to /home/josh/.var/app/com.valvesoftware.Steam
DEBUG:root:Checking input devices permissions
INFO:root:Overriding TZ to Europe/London
steam.sh[2]: Running Steam on org.freedesktop.platform 23.08 64-bit
steam.sh[2]: STEAM_RUNTIME is enabled automatically
setup.sh[73]: Steam runtime environment up-to-date!
steam.sh[2]: Error: You are missing the following 32-bit libraries, and Steam may not run:
libc.so.6
steam.sh[2]: Can't find 'steam-runtime-check-requirements', continuing anyway
/home/josh/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam.sh: line 798:   129 Bad system call         "$STEAMROOT/$STEAMEXEPATH" "$@"

Output is the same even without --env=LIBGL_DEBUG=verbose

This error is even picked up by the WM (sway)
Error: You are missing the following 32-bit libraries, and Steam may not run: libc.so.6

Yet:

ls -R /usr/lib | grep "libc.so.6"
libc.so.6

I don't understand the following:

  1. Why this error showed up all of a sudden since I did not remove/install any packages (But I did do updates). I even attempted to clear /home/josh/.var/app/com.valvesoftware.Steam but, if I do, after updating the runtime, it just throws me to the same error.

  2. I'm not really sure if libc.so.6 should be installed into the sandbox or not, but it is present into usr/lib if required system-wise, and otherwise it should come with com.valvesoftware.Steam instead.

  3. I do have another libc.so.6 sitting into $HOME/gitwork/ as it's used by a bootstrapping system I'm working on, but it shouldn't matter, right?

@nanonyme
Copy link
Collaborator

Do you have beta or stable version of the app installed? The error sounds like you are missing i386 compat extensions. You should be getting those automatically when you install stable version of app.

@TeusLollo
Copy link
Author

TeusLollo commented Dec 23, 2023

Given the following output of flatpak list as by the recent update:

Steam com.valvesoftware.Steam 1.0.0.78 stable system

The above issue still persists.

As I said here, I'm on stable.

BUT, nevermind, I solved this.

It actually was a device permission problem, brought both by a rather counter-intuitive conflict with my apparmor setup, and, after disabling it, I presume some degree of distro-specific standards on my system.

If anyone comes across this error, remember to check your apparmor setup to ensure that any calls by steam to individual devices are properly allowed.

Even then, it may still not work, as the user on reddit cited above mentioned, and as it happened to me, depending on your OS defaults (I presume any non-standard device loading ruleset may contribute).

Thus, the easiest way is to then install also flatseal and ensure that allow=multiarch (So you don't get my other libc.so.6 error) and device=all (Without it, we get my libGL error: failed to load driver: radeonsi) to be enabled.

Indeed, my apparmor setup was only partially responsible, since it still wouldn't work after disabling it fully, due to I presume various device defaults. It was the flatseal trick with allow=multiarch and device=all enabled to finally cause steam to launch adequately.

Not really sure why a device (The GPU in this case, even though GPU accelleration was for sure working and accessible) that can't be accessed was being reported as a libGL error: failed to load driver: radeonsi error, but I digress.

At best, maybe flatseal would require a somewhat more detailed error reporting routine, although I realize the diffuculties of working with a sandbox make such an endeavour secondary.

Sorry for wasting your time, but the error was very counter-intuitive, and error reporting routines (On the terminal, developers were very helpful on github) didn't help at all.

Could anyone close this as "not a bug"?

@nanonyme
Copy link
Collaborator

It is truly strange that the allow=multiarch wasn't there to begin with. The app recipe sets it here https://github.com/flathub/com.valvesoftware.Steam/blob/beta/com.valvesoftware.Steam.yml#L38 and it's mandatory.

I have the recollection Mesa in general gives very bad output when device loading fails unless you explicitly request better output through LIBGL_DEBUG=verbose. This gives typically good enough output that you can figure out why loading fails.

I suggest closing the issue yourself, there is no specific not a bug way to close the issue. I have stepped down as maintainer but thought to try to help troubleshoot this one since I was involved earlier.

@TeusLollo
Copy link
Author

TeusLollo commented Dec 23, 2023

Yet, even disabling device=all and running flatpak run --env=LIBGL_DEBUG=verbose com.valvesoftware.Steam outputted (I filtered a bunch of output noise):

libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/josh/.drirc: No such file or directory.
using driver amdgpu for 14
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/josh/.drirc: No such file or directory.
pci id for fd 14: 1002:67df, driver radeonsi
MESA-LOADER: dlopen(/usr/lib/x86_64-linux-gnu/GL/default/lib/dri/radeonsi_dri.so)
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/josh/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/josh/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/josh/.drirc: No such file or directory.
amdgpu_device_initialize: amdgpu_get_auth (1) failed (-1)
amdgpu: amdgpu_device_initialize failed.
glx: failed to create dri3 screen
failed to load driver: radeonsi

I guess you may connect the dots and realize it's actually a device access error, but you may also think something went missing during libGL installation, or some driver woes, or some filesystem corruption.
It's not a very explicit "Couldn't find this device", "Couldn't assign this device to an index", "Unknown device", "System call not authorized for this device", or anything of the sort.

The allow=multiarch thing showed up later, so it may have been some update system-wide, it wasn't there before, probably some configuration on my side along with recent updates, but it was necessary to explain how I solved it.

Thanks for the help @nanonyme

Closing this as completed

EDIT: Forgot to close with comment, closed manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants