protonscr

Differentiate Flatpak installs in the Hardware Survey

steamclosed
ValveSoftware/steam-for-linux#12654 · opened 2026-01-18 by Tiagoquix · updated 2026-01-19 · 3 comments · github
TTiagoquix 2026-01-18 github

Currently, in the Steam Flatpak package (which is unofficial), the Flatpak package format gets reported as "Freedesktop SDK" in the HW survey.

However, that is because the /etc/os-release file inside the Flatpak reports that information.
The host's /etc/os-release file is available for all Flatpaks; see here.

My request is to detect the underlying distribution using the Flatpak to be shown in the stats, and not the Flatpak itself.

"But the underlying distribution doesn't matter, since the libraries used are those from the Flatpak."

That is correct, but knowing the distro would also be useful in terms of popularity. For example: are Fedora and OpenSUSE Atomic variants getting popular within gamers? We can't know what if we only have the basic info from the Flatpak.

What could be done is the following:

Distribution Total percentage of users Percentage of users using Flatpak
SteamOS Holo 64 bit 26.32% 0%
Arch Linux 64 bit 9.54% 2%
Linux Mint 22.2 64 bit 7.85% 3%
CachyOS 64 bit 7.20% 0,2%
Freedesktop SDK 25.08 (Flatpak) 6.29% 100%
Bazzite 64 bit 5.89% 0%
Ubuntu 24.04.3 LTS 64 bit 3.93% 0,1%
Ubuntu Core 24 64 bit 3.23% 0%
Manjaro Linux 64 bit 1.73% 0,1%
Fedora Linux 43 (KDE Plasma Desktop Edition) 64 bit 1.91% 6%
Pop!_OS 22.04 LTS 64 bit 1.64% 3%
Debian GNU/Linux 13 (trixie) 64 bit 1.72% 15%
Linux Mint 22.1 64 bit 1.42% 3%
Fedora Linux 43 (Workstation Edition) 64 bit 1.54 6%
Other 17.67% 10%

The numbers are made-up; it's just an idea of how it could be done.

Then, the Freedesktop list item (as if it was a normal distribution) would be removed, and its percentages would be distributed according to the base operating system.

This way we can know more of which distributions are being used rather than if such distros are just using the Flatpak.

For this to work, work would have to be done in the Steam side, but it should be pretty simple:

  1. Detect /etc/os-release.
  2. Check if NAME="Freedesktop SDK" is reported.
  3. If it is, check /run/host/os-release.
  4. Report the latter to Steam HW survey (the PRETTY_NAME, as that's how it works now).
  5. Take the number of people from distro X that report "Freedesktop SDK", and the number of people that don't, and differentiate them in the HW survey.

From what I could gather, this isn't something the Steam Flatpak could do. Even if something was done in the Steam Flatpak's side, what would result is the /etc/os-release from Flatpak getting overriden by /run/host/os-release, which would simply remove the percentage of users using Flatpak altogether, which is not desirable, since we want to know that information, in addition to the base distro.

Thanks.

Oorowith2os 2026-01-18 github

You can also check environment variables and the .flatpak-info file in the root fs of the container to determine if it's a flatpak. Other sandboxing engines may use the same runtime as flatpak.

Additionally, the os-release may change if the underlying runtime changes from, say, freedesktop to KDE or GNOME for whatever reason.

It's a bit more involved than just parsing os-release, but likely only an extra three lines of code of insignificance.

TTiagoquix 2026-01-19 github

You can also check environment variables and the .flatpak-info file in the root fs of the container to determine if it's a flatpak. Other sandboxing engines may use the same runtime as flatpak.

I don't know if the container has access to the .flatpak-info file. If it does, then that's fine too.

Additionally, the os-release may change if the underlying runtime changes from, say, freedesktop to KDE or GNOME for whatever reason.

I think it's unlikely, but if that happens, we could also check for the presence of ID_LIKE in the same file:

Image
Kkisak-valve maintainer 2026-01-19 github

From a software development and support perspective, using Flatpak is a replacement of the underlying distro with no considerations to what that might be. This statistic is not a valuable addition.

Nothing extracted yet.