Fluidsynth Process Mysteriously (Sometimes) Starting at Boot

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

Post Reply
User avatar
RyanH
Established Member
Posts: 206
Joined: Fri Jul 08, 2022 7:58 am
Has thanked: 137 times
Been thanked: 43 times

Fluidsynth Process Mysteriously (Sometimes) Starting at Boot

Post by RyanH »

I have been trying to figure out this issue where, sometimes, fluidsynth process starts automatically at boot. When it does, I can't end the process in System Monitor. I have to pull a killall -9 fluidsynth in the terminal.

Some time ago I left this post (viewtopic.php?t=25032) on LinuxMusicans about QSynth not shutting down after I had used it. At that time, what I was seeing was that, after closing QSynth, the QSynth entries in QjackCtl weren't disappearing. I hadn't yet realized that this fluidsynth process was auto-starting and couldn't be closed normally. So I think what I thought was QSynth not closing was actually this fluidsynth-auto-start issue.

This issue started with Ubuntu Studio 22.04 and didn't occur in Kubuntu 20.04 (which used the Ubuntu Studio wrapper over it).

I posted a very long post about the issue here (https://askubuntu.com/questions/1446116 ... -how-to-so) at AskUbuntu, which explains everything in detail and contains some system outputs, but I'm wondering if any Linux Musicians might know what's happening. It's obviously pretty strange to have one out of a dozen synths (or any synth) auto-start at boot - stranger still that it doesn't always happen. Nowhere that I can see - in the system settings or in systemd - is fluidsynth marked to be auto-started. And as I mentioned, it only happens on some boots.

After leaving that post at AskUbuntu I noticed something else: in the post, I point out that the auto-started fluidsynth seems to be using /usr/share/sounds/sf3/default-GM.sf3. So I took a look at that soundfont file... or what I thought was a soundfont file. This is actually a link, which points to

/etc/alternatives/default-GM.sf3

This, in turn, is also a link, which points to

/usr/share/sounds/sf3/MuseScore_General_Lite.sf3

Notice that following the links brings me back full circle to a different soundfont file in the original folder. Another interesting thing is that, when I use QSynth, I don't actually use a .sf3 soundfont. I load a .sf2 soundfont of the same name. So this file which fluidsynth is opening when it auto-starts is not one I have ever used. I have also never opened MuseScore.

Does anyone have an idea what might be the cause of this and how to stop it? As I said, there are more details in the post I linked to, but I can post additional info here is anyone wants.

Last edited by RyanH on Sun Feb 19, 2023 6:42 am, edited 1 time in total.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: Fluidsynth Process Mysteriously (Sometimes) Starting at Boot

Post by j_e_f_f_g »

Sounds like there's some "Jack Session Manager" (ie, NSM, Cadence, etc) set to launch at boot, and load fluidsynth (most likely to be prepared to play GM MIDI files). I'm also guessing that MuseScore is being used as the MIDI FIle player.

When you double-click on some GM MIDI file, does it automatically start playing in MuseScore (using what sounds like that sf3 soundfont)? If so, it's undoubtably what I've concluded. You have to figure out what session manager is being referenced in your startup configuration. (There are so many possibilities -- bashrc, some systemd unit file, etc). Then delete that "profile" in your session manager.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
RyanH
Established Member
Posts: 206
Joined: Fri Jul 08, 2022 7:58 am
Has thanked: 137 times
Been thanked: 43 times

Re: Fluidsynth Process Mysteriously (Sometimes) Starting at Boot

Post by RyanH »

j_e_f_f_g wrote: Sun Feb 19, 2023 3:25 am

Sounds like there's some "Jack Session Manager" (ie, NSM, Cadence, etc) set to launch at boot, and load fluidsynth (most likely to be prepared to play GM MIDI files). I'm also guessing that MuseScore is being used as the MIDI FIle player.

When you double-click on some GM MIDI file, does it automatically start playing in MuseScore (using what sounds like that sf3 soundfont)? If so, it's undoubtably what I've concluded. You have to figure out what session manager is being referenced in your startup configuration. (There are so many possibilities -- bashrc, some systemd unit file, etc). Then delete that "profile" in your session manager.

Actually - and strangely - .mid files open in SMPlayer by default. :lol: It's funny because a) SMPlayer can't actually play the midi file, just open it and freeze, and b) I've only ever used QTractor for midi. Also, it's interesting that fluidsynth only sometimes auto-starts at boot. I would think that it would do so either always or never.

But there are definitely jack-related processes which start at every boot. I was thinking of uninstalling MuseScore, fluidsynth and QSynth, cleaning out whatever files remain, and then re-installing fluidsynth/QSynth. Not sure if this will end up creating some unexpected hassle. This new Ubuntu Studio install has been a lot of hassle. No offence to the people that put it together... for the most part it's awesome, and certainly better than I could do.

User avatar
RyanH
Established Member
Posts: 206
Joined: Fri Jul 08, 2022 7:58 am
Has thanked: 137 times
Been thanked: 43 times

Re: Fluidsynth Process Mysteriously (Sometimes) Starting at Boot

Post by RyanH »

This is interesting. I just compared the situations between this Ubuntu Studio install and Kubuntu.

Looking at sf2 soundfonts this time, which is what I load in QSynth, and specifically default-GM, in both distros this default-GM brings me from a /usr folder to an /etc folder, back to the /usr folder. In Kubuntu, it points to TimGM6mb soundfont, which I would have sworn was slightly different from the default - to the extent that I always load both. They both have the same basic GM sounds, but the first 3 pianos are even named differently! In Ubuntu Studio, default-GM brings me around to FluidR3_GM.

I started this journey thinking that it must be easy enough to just figure out what starts fluidynth and stop it. I only get more confused at every step. :?

hjhmusic
Established Member
Posts: 18
Joined: Mon Nov 07, 2016 3:24 am
Been thanked: 1 time

Re: Fluidsynth Process Mysteriously (Sometimes) Starting at Boot

Post by hjhmusic »

FWIW, I recently noticed this (again) and decided... bye bye, "sudo apt-get remove fluidsynth"

hjh

User avatar
sysrqer
Established Member
Posts: 2520
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Fluidsynth Process Mysteriously (Sometimes) Starting at Boot

Post by sysrqer »

It can be disabled from starting at boot by typing in 3 words. I have no idea why it's a service though or why it would be needed to run in the background. Always used to be one of the first things I disabled on a fresh ubuntu install.

jean-emmanuel
Established Member
Posts: 28
Joined: Tue Sep 21, 2021 4:47 pm
Has thanked: 1 time
Been thanked: 13 times

Re: Fluidsynth Process Mysteriously (Sometimes) Starting at Boot

Post by jean-emmanuel »

We had the same problem that caused issues with our live setup and it took a while to figure out what was going on. Turns out it was lightdm that starts fluidsynth to be able to play sounds (when login in I guess). I don't remember the exact steps it took to prevent that but it was indeed systemd related.

Post Reply