Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#50122 - [fluidsynth] service doesn't work with user pulseaudio

Attached to Project: Arch Linux
Opened by Javier Domingo Cansino (txomon) - Thursday, 21 July 2016, 22:32 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 22 July 2016, 12:56 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Ray Rashif (schivmeister)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 3
Private No

Details

Description:

Nowadays, fluidsynth is being distributed with a service that gets installed in /usr/lib/systemd/system, with the idea of running it as a daemon. The problem when running it as part of the system is that pulseaudio driver won't work.

I would

Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:
Write the following in /etc/conf.d/fluidsynth:

SOUND_FONT=/usr/share/soundfonts/FluidR3_GM2-2.sf2
AUDIO_DRIVER=pulseaudio
OTHER_OPTS='-r 48000'

Start the service, and something like this will appear:

$ systemctl status fluidsynth
● fluidsynth.service - FluidSynth Daemon
Loaded: loaded (/usr/lib/systemd/system/fluidsynth.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Thu 2016-07-21 23:55:52 CEST; 13min ago
Process: 12017 ExecStart=/usr/bin/fluidsynth -is -a $AUDIO_DRIVER $OTHER_OPTS $SOUND_FONT (code=exited, status=0/SUCCESS)
Main PID: 12017 (code=exited, status=0/SUCCESS)

Jul 21 23:55:52 mymachine systemd[1]: Started FluidSynth Daemon.
Jul 21 23:55:52 mymachine fluidsynth[12017]: fluidsynth: error: Failed to create PulseAudio connection
Jul 21 23:55:52 mymachine fluidsynth[12017]: Failed to create the audio driver
Jul 21 23:55:52 mymachine fluidsynth[12017]: FluidSynth version 1.1.6
Jul 21 23:55:52 mymachine fluidsynth[12017]: Copyright (C) 2000-2012 Peter Hanappe and others.
Jul 21 23:55:52 mymachine fluidsynth[12017]: Distributed under the LGPL license.
Jul 21 23:55:52 mymachine fluidsynth[12017]: SoundFont(R) is a registered trademark of E-mu Systems, Inc.


Copying the file from /usr/lib/systemd/system to /usr/lib/systemd/user should solve the problem, and allow to start the service like systemctl --user start fluidsynth

With the following status output:

systemctl --user status fluidsynth
● fluidsynth.service - FluidSynth Daemon
Loaded: loaded (/usr/lib/systemd/user/fluidsynth.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2016-07-22 00:20:59 CEST; 4s ago
Main PID: 13990 (fluidsynth)
CGroup: /user.slice/user-1000.slice/user@1000.service/fluidsynth.service
└─13990 /usr/bin/fluidsynth -is -a pulseaudio -r 48000 /usr/share/soundfonts/FluidR3_GM2-2.sf2

Jul 22 00:20:59 mymachine systemd[8758]: Started FluidSynth Daemon.
Jul 22 00:20:59 mymachine fluidsynth[13990]: fluidsynth: Using PulseAudio driver


My guess would be to copy the file because you may want to have it as a system wide service with alsa, or user pulseaudio, so both services are required.
This task depends upon

Comment by Johannes Sasongko (sjohannes) - Thursday, 26 April 2018, 08:52 GMT
As of fluidsynth 1.1.10 (already in Arch), the service file has moved from system to user, and you can start it with "systemctl --user start fluidsynth". I think that sort of fixes this issue?

Both '-a alsa' and '-a pulseaudio' seem to work fine with this setup.

Loading...