You are not logged in.

#1 2023-01-30 16:06:19

evren320
Member
Registered: 2022-11-22
Posts: 9

fluidsynth stopped working after system update

I have fluidsynth user daemon, it has /etc/conf.d/fluidsynth config, file content is:

SOUND_FONT=/usr/share/soundfonts/default.sf2
OTHER_OPTS='-a pulseaudio -m alsa_seq -r 48000'

It was working perfectly until last system update, now i check systemctl --user status fluidsynth

Jan 30 18:48:30 arch fluidsynth[12749]: Cannot connect to server socket err = No such file or directory
Jan 30 18:48:30 arch fluidsynth[12749]: Cannot connect to server request channel
Jan 30 18:48:30 arch fluidsynth[12749]: jack server is not running or cannot be started
Jan 30 18:48:30 arch fluidsynth[12749]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Jan 30 18:48:30 arch fluidsynth[12749]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Jan 30 18:48:30 arch fluidsynth[12749]: Failed to create secure directory (/run/user/1000/pulse): Read-only file system
Jan 30 18:48:30 arch fluidsynth[12749]: fluidsynth: error: Failed to create PulseAudio connection, because pa_simple_new() failed with error: Connection refused
Jan 30 18:48:30 arch fluidsynth[12749]: Failed to create the audio driver. Giving up.
Jan 30 18:48:30 arch fluidsynth[12749]: fluidsynth: warning: Failed to set thread to high priority
Jan 30 18:48:30 arch systemd[12457]: Started FluidSynth Daemon.

It appears like daemon is active but it has no output driver created.
I tried to change value in config from pulseaudio to alsa, sdl2, pipewire, jack none of them worked.
I discovered restarting fluidsynth daemon makes it work, but restarting compputer breaks it back.
Same config was working in my second computer, then i decided system update it too, then same problem now occur on that computer too.
Seems something new in arch repository makes fluidsynth break.

Offline

#2 2023-01-30 16:27:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,093

Re: fluidsynth stopped working after system update

Reads like it's starting before the sound server you're using is ready. Easy fix is to adjust the service file to depend and wait for the relevant server implementation to be there. The "current" default fluidsynth service waits for pipewire to be ready, if you are using pulse or that one not being sufficient, update the After= line to pulseaudio.service or pipewire-pulse.service. https://wiki.archlinux.org/title/Systemd#Drop-in_files -- note since this is an user service you'd need to opt for --user when using the edit command directly.

Also on a general note "last system update" means something else for everyone and is meaningless without context, if you want to add relevant context, post the pacman.log containing the system update introducing the issue.

Last edited by V1del (2023-01-30 16:28:31)

Offline

#3 2023-02-04 21:33:40

evren320
Member
Registered: 2022-11-22
Posts: 9

Re: fluidsynth stopped working after system update

Thanks for suggestions, thought i already tried to change After=pipewire.service line to After=pulseaudio.service it doesn't change result, i didn't try pipewire-pulse.service because it is not installed.
Using "systemd --user restart fluidsynth" command after system is booted up, makes it work, it seems indeed starts before pulseaudio is initialized, and it may be ignoring "After=" line.
I workaround this issue by adding a sleep on exec line like this:

ExecStart=/usr/bin/bash -c "sleep 10 && /usr/bin/fluidsynth -is $OTHER_OPTS $SOUND_FONT"

Eventhought system update may be too broad to inspect what would be the problem, i just wanted to say problem occur after system update, it didn't occur without any reason or something like an user interaction or settings, it happened like automatic way, updated, restarted, then midi was not working, it was fine previous day of update.

Offline

Board footer

Powered by FluxBB