Bug 2098484
| Summary: | Add systemd user service | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Daniel Rusek <drusek> | ||||||
| Component: | fluidsynth | Assignee: | Christoph Karl <pampelmuse> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | rawhide | CC: | green, mail, pampelmuse, walter.pete | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | fluidsynth-2.2.7-2.fc36 fluidsynth-2.2.7-2.fc35 fluidsynth-2.2.7-2.el9 | Doc Type: | If docs needed, set a value | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2022-07-02 01:48:04 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
Hmm, interesting idea. I always used qsynth for starting up fluidsynth and qjack to connecting it. I will take a look. Thanks! You will probably also need to add "fluid-soundfont-gm" package to the fluidsynth Recommends/Requires to make the fluidsynth daemon work out-of-box after installing the fluidsynth package. :-) I am also including the default /etc/default/fluidsynth file from Ubuntu/Debian. Created attachment 1892816 [details]
/etc/default/fluidsynth from the Ubuntu fluidsynth package
FEDORA-2022-d98f665b76 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-d98f665b76 FEDORA-2022-9665396a4a has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9665396a4a FEDORA-EPEL-2022-cb471b2af4 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-cb471b2af4 The systemd user service does not seem to be enabled by default:
$ systemctl status sound.target
● sound.target - Sound Card
Loaded: loaded (/usr/lib/systemd/system/sound.target; static)
Active: active since Wed 2022-06-29 15:12:52 CEST; 17min ago
Until: Wed 2022-06-29 15:12:52 CEST; 17min ago
Docs: man:systemd.special(7)
čen 29 15:12:52 desktop systemd[1]: Reached target sound.target - Sound Card.
$ systemctl --user status fluidsynth.service
○ fluidsynth.service - FluidSynth Daemon
Loaded: loaded (/usr/lib/systemd/user/fluidsynth.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:fluidsynth(1)
$ ps aux|grep fluidsynth
asciiwo+ 13070 0.0 0.0 222184 2236 pts/0 S+ 15:37 0:00 grep --color=auto fluidsynth
$
It works fine* after starting it manually:
$ systemctl --user start fluidsynth.service
$ systemctl --user status fluidsynth.service
● fluidsynth.service - FluidSynth Daemon
Loaded: loaded (/usr/lib/systemd/user/fluidsynth.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2022-06-29 16:02:27 CEST; 950ms ago
Docs: man:fluidsynth(1)
Main PID: 17014 (fluidsynth)
Tasks: 17 (limit: 38226)
Memory: 301.3M
CPU: 184ms
CGroup: /user.slice/user-1000.slice/user/app.slice/fluidsynth.service
└─ 17014 /usr/bin/fluidsynth -is /usr/share/soundfonts/default.sf2
čen 29 16:02:27 desktop systemd[2180]: Starting fluidsynth.service - FluidSynth Daemon...
čen 29 16:02:27 desktop systemd[2180]: Started fluidsynth.service - FluidSynth Daemon.
čen 29 16:02:27 desktop fluidsynth[17014]: fluidsynth: warning: Failed to set thread to high priority
čen 29 16:02:27 desktop fluidsynth[17014]: fluidsynth: warning: Failed to set thread to high priority
* I have tried some applications that use MIDI synth and everything was working properly.
The systemd service seems to work only when running "systemctl --user start fluidsynth.service" manually. It does not seem to work when started automatically during system boot/login after enabling it using "systemctl --user enable fluidsynth.service":
systemctl --user status fluidsynth.service
● fluidsynth.service - FluidSynth Daemon
Loaded: loaded (/usr/lib/systemd/user/fluidsynth.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2022-06-29 16:24:03 CEST; 42s ago
Docs: man:fluidsynth(1)
Main PID: 2258 (fluidsynth)
Tasks: 16 (limit: 38226)
Memory: 303.0M
CPU: 868ms
CGroup: /user.slice/user-1000.slice/user/app.slice/fluidsynth.service
└─ 2258 /usr/bin/fluidsynth -is /usr/share/soundfonts/default.sf2
čen 29 16:24:03 desktop systemd[2239]: Starting fluidsynth.service - FluidSynth Daemon...
čen 29 16:24:03 desktop fluidsynth[2258]: ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied
čen 29 16:24:03 desktop fluidsynth[2258]: fluidsynth: error: Error opening ALSA sequencer
čen 29 16:24:03 desktop fluidsynth[2258]: Failed to create the MIDI thread; no MIDI input
čen 29 16:24:03 desktop fluidsynth[2258]: will be available. You can access the synthesizer
čen 29 16:24:03 desktop fluidsynth[2258]: through the console.
čen 29 16:24:03 desktop systemd[2239]: Started fluidsynth.service - FluidSynth Daemon.
čen 29 16:24:03 desktop fluidsynth[2258]: fluidsynth: warning: Failed to set thread to high priority
This may be a PipeWire/WirePlumber issue. We could probably workaround it by setting a delay (something like "ExecStartPre=/bin/sleep 15" in the systemd service file) before starting the service. Or maybe rather "ExecStartPre=/usr/bin/sleep 15" since we are on Fedora. :-) Oops, I am dumb. I did not notice the "Type=notify" service type. Anyway, none of the MIDI apps I tried sent a correct notification message that could start the systemd service and I had to start it manually. Anyway, I am taking everything that I said back. The update seems to work fine and the problems I described are application (or PipeWire/WirePlumber) problems, not Fluidsynth/this update ones. FEDORA-2022-d98f665b76 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-d98f665b76` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-d98f665b76 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2022-9665396a4a has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-9665396a4a` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-9665396a4a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-EPEL-2022-cb471b2af4 has been pushed to the Fedora EPEL 9 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-cb471b2af4 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2022-9665396a4a has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2022-d98f665b76 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-EPEL-2022-cb471b2af4 has been pushed to the Fedora EPEL 9 stable repository. If problem still persists, please make note of it in this bug report. |
Created attachment 1891216 [details] /usr/lib/systemd/user/fluidsynth.service from the Ubuntu fluidsynth package Please, consider adding a systemd user service for FluidSynth. I am including a systemd service file from the fluidsynth Debian/Ubuntu package. The included service file will most likely work fine in Fedora as well (the only thing I am not sure about is "EnvironmentFile=/etc/default/fluidsynth" since the Fedora package does not seem to contain this default config file).