flathub / flathub/io.github.sharkwouter.Minigalaxy
OpenTTD can't play music (Can't reach any soundfont)
- Dominant language
- Python
- Stars
- 2
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
This is an issue that [I reported to the official Minigalaxy bug tracker](https://github.com/sharkwouter/minigalaxy/issues/707), but before some time and testing, It was a two part issue, one with Fluidsynth not working properly before, but I fixed, and other part that It is only happening with the Flatpak version.
Basically, [OpenTTD](https://www.gog.com/en/game/openttd) can't can't play music with Minigalaxy Flatpak version. It uses MIDI, so I need Fluidsynth daemon working to make it work. But the game can't reach Fluidsynth:
```
$ flatpak run --branch=stable --arch=x86_64 --command=minigalaxy io.github.sharkwouter.Minigalaxy
Running OpenTTD
[2026-06-17 22:41:40] dbg: [driver:1] Successfully loaded blitter '32bpp-anim'
[2026-06-17 22:41:40] dbg: [driver:2] Resolution for display: 1600x900
[2026-06-17 22:41:40] dbg: [driver:1] SDL2: Mouse is at (943, 729), use display 0 (0, 0, 1920, 1080)
[2026-06-17 22:41:40] dbg: [driver:1] SDL2: using mode 1600x900
[2026-06-17 22:41:41] dbg: [driver:1] SDL2: using driver 'x11'
[2026-06-17 22:41:41] dbg: [driver:1] OpenGL driver: AMD - AMD Radeon Vega 10 Graphics (radeonsi, raven, ACO, DRM 3.64, 7.0.0-22-generic) (4.6 (Compatibility Profile) Mesa 26.0.6 (git-0e095aab43))
[2026-06-17 22:41:41] dbg: [driver:3] OpenGL: Using persistent buffer mapping
[2026-06-17 22:41:41] dbg: [driver:2] OpenGL shading language version: 4.60, texture units = 160
[2026-06-17 22:41:41] dbg: [driver:1] Successfully probed video driver 'sdl-opengl'
[2026-06-17 22:41:41] dbg: [driver:1] Successfully probed sound driver 'sdl'
[2026-06-17 22:41:41] dbg: [driver:1] Fluidsynth: sf (null)
[2026-06-17 22:41:41] dbg: [driver:1] Fluidsynth: Failed to load config file '/etc/fluidsynth.conf' - file doesn't exist
[2026-06-17 22:41:41] dbg: [driver:1] Fluidsynth: Failed to load config file '/home//.fluidsynth' - file doesn't exist
[2026-06-17 22:41:41] dbg: [driver:1] Fluidsynth: samplerate 44100
[2026-06-17 22:41:41] dbg: [driver:1] Probing music driver 'fluidsynth' failed with error: Could not open any sound font
[2026-06-17 22:41:41] dbg: [driver:1] Successfully probed music driver 'extmidi'
[2026-06-17 22:41:41] dbg: [driver:1] using thread for game-loop
[2026-06-17 22:41:41] dbg: [driver:1] Switching blitter from '32bpp-anim' to '40bpp-anim'...
[2026-06-17 22:41:41] dbg: [driver:1] Successfully loaded blitter '40bpp-anim'
[2026-06-17 22:41:41] dbg: [driver:1] Successfully switched to 40bpp-anim.
[2026-06-17 22:41:41] dbg: [driver:1] SDL2: using mode 1600x900
[2026-06-17 22:41:41] dbg: [driver:1] extmidi: set volume not implemented
```
With normal Minigalaxy (The non-flatpak version), the music works.
```
$ minigalaxy
Running OpenTTD
[2026-06-17 22:43:27] dbg: [driver:1] Successfully loaded blitter '32bpp-anim'
[2026-06-17 22:43:27] dbg: [driver:2] Resolution for display: 1600x900
[2026-06-17 22:43:27] dbg: [driver:1] SDL2: Mouse is at (975, 736), use display 0 (0, 0, 1920, 1080)
[2026-06-17 22:43:27] dbg: [driver:1] SDL2: using mode 1600x900
[2026-06-17 22:43:27] dbg: [driver:1] SDL2: using driver 'x11'
[2026-06-17 22:43:27] dbg: [driver:1] OpenGL driver: AMD - AMD Radeon Vega 10 Graphics (radeonsi, raven, ACO, DRM 3.64, 7.0.0-22-generic) (4.6 (Compatibility Profile) Mesa 26.0.3-1ubuntu1)
[2026-06-17 22:43:27] dbg: [driver:3] OpenGL: Using persistent buffer mapping
[2026-06-17 22:43:27] dbg: [driver:2] OpenGL shading language version: 4.60, texture units = 160
[2026-06-17 22:43:27] dbg: [driver:1] Successfully probed video driver 'sdl-opengl'
[2026-06-17 22:43:27] dbg: [driver:1] Successfully probed sound driver 'sdl'
[2026-06-17 22:43:27] dbg: [driver:1] Fluidsynth: sf (null)
[2026-06-17 22:43:27] dbg: [driver:1] Fluidsynth: Failed to load config file '/etc/fluidsynth.conf' - file doesn't exist
[2026-06-17 22:43:27] dbg: [driver:1] Fluidsynth: Failed to load config file '/home//.fluidsynth' - file doesn't exist
[2026-06-17 22:43:27] dbg: [driver:1] Fluidsynth: samplerate 44100
[2026-06-17 22:43:27] dbg: [driver:1] Successfully probed music driver 'fluidsynth'
[2026-06-17 22:43:28] dbg: [driver:1] using thread for game-loop
[2026-06-17 22:43:28] dbg: [driver:1] Switching blitter from '32bpp-anim' to '40bpp-anim'...
[2026-06-17 22:43:28] dbg: [driver:1] Successfully loaded blitter '40bpp-anim'
[2026-06-17 22:43:28] dbg: [driver:1] Successfully switched to 40bpp-anim.
[2026-06-17 22:43:28] dbg: [driver:1] SDL2: using mode 1600x900
fluidsynth: Ignoring unrecognized meta event type 0x21
fluidsynth: Ignoring unrecognized meta event type 0x21
fluidsynth: Ignoring unrecognized meta event type 0x21
fluidsynth: Ignoring unrecognized meta event type 0x21
fluidsynth: Ignoring unrecognized meta event type 0x21
fluidsynth: Ignoring unrecognized meta event type 0x21
fluidsynth: Ignoring unrecognized meta event type 0x21
fluidsynth: Ignoring unrecognized meta event type 0x21
fluidsynth: Ignoring unrecognized meta event type 0x21
```
Both Minigalaxy game installs are in fact the same, as they point to the same folder.
At first, with some research, one culprit can be that It seems that OpenTTD [has hardcoded the paths of the soundfonts](https://github.com/OpenTTD/OpenTTD/blob/ae917cb8c61aea7fe1bd0738f52354f59654aa48/src/music/fluidsynth.cpp#L32-L52) as I realised It wasn't using the one that I have configured, and It can't find the fluidsynth config file (It looks for `/etc/fluidsynth` or `~/fluidsynth`, but they are in `/etc/default/fluidsynth` and `~/.config/fluidsynth` in my system, but that's their issue, although any of the fallbacks maybe should work and they don't in the flatpak environment).
Thanks in advance!
-----
**Update**: It's seems, in fact, the issue is OpenTTD can't find any soundfont, even the ones hardcoded. The only way to have music is create a `~/.fluidsynth` but using the new config file format introduced in 2.5.0 (System fluidsynth is 2.4.8, so those config files don't work):
```
set synth.default-soundfont /home/user/.local/share/soundfonts/default.sf2
```
And then allow to Minigalaxy flatpak (with Flatseal, for example) to access `~/.fluidsynth` and wherever is the Soundfont (can't be `/usr/`, is not allowed). With _that_, there is music in OpenTTD GOG version with the Minigalaxy Flatpak.
So, unless It's added a valid Soundfont in Minigalaxy that can use OpenTTD (one from the hardcoded paths, for example), there is not gonna have music, unless you customized one in this way.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.