Bug#1053245: fluidsynth: Fluidsynth starts at boot and blocks the sound device, no obvious way to disable it

2024-04-05 Thread Patrice Duroux
Package: fluidsynth
Version: 2.3.4-1+b3
Followup-For: Bug #1053245

Hi,

I am also having trouble with its systemd service.

1. it seems to fail when opening my user session:
avril 05 19:48:44 kos-moceratops systemd[2775]: Listening on pipewire-
pulse.socket - PipeWire PulseAudio.
avril 05 19:48:44 kos-moceratops systemd[2775]: Listening on pipewire.socket -
PipeWire Multimedia System Sockets.
avril 05 19:48:44 kos-moceratops systemd[2775]: Started pipewire.service -
PipeWire Multimedia Service.
avril 05 19:48:44 kos-moceratops systemd[2775]: Starting fluidsynth.service -
FluidSynth Daemon...
avril 05 19:48:44 kos-moceratops systemd[2775]: Started pipewire-pulse.service
- PipeWire PulseAudio.
avril 05 19:48:44 kos-moceratops (uidsynth)[2811]: fluidsynth.service:
Referenced but unset environment variable evaluates to an empty string:
OTHER_OPTS
avril 05 19:48:44 kos-moceratops pipewire[2810]: mod.jackdbus-detect: Failed to
receive jackdbus reply: org.freedesktop.DBus.Error.ServiceUnknown: The name
org.jackaudio.service was not provided by any .service files
avril 05 19:48:45 kos-moceratops fluidsynth[2811]: Failed to create secure
directory (/run/user/1001/pulse): Read-only file system
avril 05 19:48:45 kos-moceratops fluidsynth[2811]: fluidsynth: error: Failed to
bind server socket: 98
avril 05 19:48:45 kos-moceratops fluidsynth[2811]: Failed to create the server.
avril 05 19:48:45 kos-moceratops fluidsynth[2811]: Continuing without it.
avril 05 19:48:45 kos-moceratops fluidsynth[2811]: fluidsynth: warning: Failed
to set thread to high priority
avril 05 19:48:50 kos-moceratops pipewire[2810]: [0:00:55.151408076] [2810]
WARN IPAManager ipa_manager.cpp:154 No IPA found in '/usr/lib/x86_64-linux-
gnu/libcamera'
avril 05 19:48:50 kos-moceratops pipewire[2810]: [0:00:55.151454434] [2810]
INFO Camera camera_manager.cpp:284 libcamera v0.2.0
avril 05 19:48:50 kos-moceratops fluidsynth[2811]: fluidsynth: warning: Audio
device hardware configuration failed
avril 05 19:48:50 kos-moceratops fluidsynth[2811]: fluidsynth: warning: Audio
device hardware configuration failed
avril 05 19:48:50 kos-moceratops fluidsynth[2811]: fluidsynth: error: Failed to
find an audio format supported by alsa
avril 05 19:48:50 kos-moceratops fluidsynth[2811]: Failed to create the audio
driver. Giving up.
avril 05 19:48:50 kos-moceratops fluidsynth[2811]: FluidSynth runtime version
2.3.4
avril 05 19:48:50 kos-moceratops fluidsynth[2811]: Copyright (C) 2000-2023
Peter Hanappe and others.
avril 05 19:48:50 kos-moceratops fluidsynth[2811]: Distributed under the LGPL
license.
avril 05 19:48:50 kos-moceratops fluidsynth[2811]: SoundFont(R) is a registered
trademark of Creative Technology Ltd.
avril 05 19:48:50 kos-moceratops systemd[2775]: fluidsynth.service: Main
process exited, code=exited, status=255/EXCEPTION
avril 05 19:48:50 kos-moceratops systemd[2775]: fluidsynth.service: Failed with
result 'exit-code'.
avril 05 19:48:50 kos-moceratops systemd[2775]: Failed to start
fluidsynth.service - FluidSynth Daemon.
avril 05 19:48:53 kos-moceratops pipewire-pulse[2815]: default:
snap_get_audio_permissions: kernel lacks 'fine grained unix mediation'; snap
audio permissions won't be honored.
avril 05 19:48:56 kos-moceratops pipewire-pulse[2815]: default:
snap_get_audio_permissions: kernel lacks 'fine grained unix mediation'; snap
audio permissions won't be honored.
avril 05 19:49:08 kos-moceratops systemd[1271]: Stopping fluidsynth.service -
FluidSynth Daemon...


2. then starting it «by hand» works:

$ fluidsynth -is /usr/share/sounds/sf3/default-GM.sf3
FluidSynth runtime version 2.3.4
Copyright (C) 2000-2023 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of Creative Technology Ltd.

fluidsynth: warning: Failed to set thread to high priority
fluidsynth: warning: Failed to set thread to high priority
(wait)

3. its service is unreachable from my session nor is listed by systemd:

$ sudo systemctl list-units | grep -i fluid
(nothing)

$ systemctl status fluidsynth.service
Unit fluidsynth.service could not be found.

$ ls -l /usr/lib/systemd/user/fluidsynth.service
-rw-r--r-- 1 root root 735 24 mars  11:09
/usr/lib/systemd/user/fluidsynth.service

I have purged and installed again the package and no change.

Regards,
Patrice


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'oldstable-updates'), (500, 
'oldstable-security'), (500, 'unstable'), (500, 'oldstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.7.9-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages fluidsynth depends on:
ii  init-system-helpers   1.66
ii  libc6 2.37-15.1
ii  libflui

Bug#1053245: fluidsynth: Fluidsynth starts at boot and blocks the sound device, no obvious way to disable it

2024-04-03 Thread Alban Browaeys
On Thu, 2 Nov 2023 23:05:28 +0100 at46  wrote:
> I had the same problem and it took me quite some time to find that 
> fluidsynth was the root cause of this. Fluidsynth was installed as
new 
> dependency from lutris 0.5.14 and blocked my sound device each
~second 
> boot.
> 
> @Patrick I could check the status with "systemctl --user status 
> fluidsynth" and disable it with "sudo systemctl --global disable 
> fluidsynth.service"
> 

fluidsynth and pulseaudio are both user session services. They are
started at login (ie not at boot).

>From /usr/lib/systemd/user/fluidsynth.service, it seems only pipewire
is handled, ie not pulseaudio:
"
[Unit]
Description=FluidSynth Daemon
Documentation=man:fluidsynth(1)
After=sound.target
After=pipewire.service

[Service]
# added automatically, for details please see
#
https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=read-only
ProtectHostname=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
# end of automatic additions
# required in order for the above sandboxing options to work on a user
unit
PrivateUsers=yes
Type=notify
NotifyAccess=main
EnvironmentFile=/etc/default/fluidsynth
EnvironmentFile=-%h/.config/fluidsynth
ExecStart=/usr/bin/fluidsynth -is $OTHER_OPTS $SOUND_FONT

[Install]
WantedBy=default.target
"

Seems you are running native pulseaudio and not pipewire-pulse.

Could you try adding pulseaudio.service "pulseaudio.service" to the
"After" directive of fluidsynth.service, via systemctl --user edit
fluidsynth.service by writing in the editor that will open:
"
[Unit]
After=pipewire.service pulseaudio.service
"
then running:
systemctl --user daemon-reload
and logout/login, then check that pulseaudio see your audio device?

Still, fluidsynth should be running, so the issue might be otherwise.
At least with pipewire/pipewire-pulse/fluidsynth I have all of them up
simultaneously for the whole user session.

Best regards,
Alban



Bug#1053245: fluidsynth: Fluidsynth starts at boot and blocks the sound device, no obvious way to disable it

2023-11-02 Thread at46
I had the same problem and it took me quite some time to find that 
fluidsynth was the root cause of this. Fluidsynth was installed as new 
dependency from lutris 0.5.14 and blocked my sound device each ~second 
boot.


@Patrick I could check the status with "systemctl --user status 
fluidsynth" and disable it with "sudo systemctl --global disable 
fluidsynth.service"


Regards,
Axel



Bug#1053245: fluidsynth: Fluidsynth starts at boot and blocks the sound device, no obvious way to disable it

2023-09-29 Thread Patrick May
Package: fluidsynth
Version: 2.3.1-2
Severity: critical
Justification: breaks unrelated software
X-Debbugs-Cc: dusthillresid...@gmail.com

Dear Maintainer,

I installed rosegarden, lmms, and the fluidsynth package. (I'm not sure which 
of these did it but presumably it's fluidsynth.)

Upon reboot, I noticed a fluidsynth process was running in the background and 
pulseaudio reported my audio device is "Dummy output", apparently because 
fluidsynth is starting before pulseaudio and claiming full control over the 
sound device.

So I ran this command as root:
 systemctl list-unit-files --state=enabled
expecting to find the name of the fluidsynth service in the list, so I could 
disable it.
It does not appear in the list at all.
So, looking further, I tried this command as root:
 systemctl | grep fluid
No mention of fluidsynth appears. But somehow it's starting itself at boot. And 
I have no obvious way of disabling it. 

I would say that this is pretty serious because it starts itself, you have no 
reasonable way of knowing how to stop it, and it takes full control of your 
audio device so you can't play any audio from any other apps.


-- System Information:
Debian Release: 12.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-12-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages fluidsynth depends on:
ii  init-system-helpers  1.65.2
ii  libc62.36-9+deb12u1
ii  libfluidsynth3   2.3.1-2
ii  libglib2.0-0 2.74.6-2
ii  libsdl2-2.0-02.26.5+dfsg-1
ii  libsystemd0  252.12-1~deb12u1

Versions of packages fluidsynth recommends:
pn  qsynth  

fluidsynth suggests no packages.

-- no debconf information