Audio issues when running in systemd unit/service... #42
-
Have revisited docker-kodi after some time and have managed to get it all working perfectly!
However, when I try to run it from a systemd unit, I get no audio. Unit file is as follows:
From the container logs I can see some errors relating to jack server. Any ideas how I might fix, or what changes when running as a service vs running from command line?
Thanks in advance for any pointers and help! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 17 replies
-
Normally the pulseaudio server is started after a user login and does not run system wide. But when systemd starts the services there is no pulseaudio that x11docker could connect to. About jack and how it interferes with pulseaudio or ALSA I cannot tell anything. |
Beta Was this translation helpful? Give feedback.
-
If the x11docker service is a system service and that user logs in later, I don't see a straightforward way. Some hacky solution might be possible, though. After all, why do you want to run x11docker+kodi as a systemd service at all? There are two sorts of systemd services: the system services (the common use case) and user services.
This setup is at the border of my knowledge, too. :-)
docker needs root privileges to run, or the user must be in group |
Beta Was this translation helpful? Give feedback.
-
Great!
For rootless containers I recommend
The concerns of systemwide pulseaudio are a different thing than concerns about group docker.
Hopefully that helps. Edit: Arrgh, confused the answer boxes again. |
Beta Was this translation helpful? Give feedback.
-
Ok, good.
No. You could remove kodi from group
This was just for the purpose to start the pulseaudio damon, too. Without this there is no benefit. |
Beta Was this translation helpful? Give feedback.
Normally the pulseaudio server is started after a user login and does not run system wide.
If you run x11docker from cli, there is normally a pulseaudio server already running.
But when systemd starts the services there is no pulseaudio that x11docker could connect to.
It might help to use option
--alsa
instead of--pulseaudio
.About jack and how it interferes with pulseaudio or ALSA I cannot tell anything.