SystemD application without sound

I am trying to run a kiosk application thanks to some videos played in chromium launched by a systemd service. When I am launching manually the following script, I can hear the sound of the videos

#!/bin/bash
xset s noblank
xset s off
xset -dpms

unclutter -idle 0.5 -root &

LIBVA_DRIVER_NAME=i965 /usr/bin/chromium-browser --noerrdialogs --autoplay-policy=no-user-gesture-required --disable-accelerated-video-decode --start-fullscreen --kiosk --incognito --disable-translate --no-first-run --fast --fast-start --disable-infobars --disable-features=TranslateUI --disk-cache-dir=/dev/null  --password-store=basic http://127.0.0.1

Unfortunately, when the script is launched by my kiosk.service, there isn’t sound (I found some similar cases on the forum but none seems to fix my issue)

cat /lib/systemd/system/kiosk.service
[Unit]
Description=Chromium Kiosk
Wants=graphical.target
After=graphical.target

[Service]
User=user1
Group=user1
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/user1/.Xauthority
Type=simple
ExecStart=/bin/bash /home/user1/kiosk.sh
Restart=on-abort

[Install]
WantedBy=graphical.target

Status :

user1@user1-nuc:~$ sudo systemctl status kiosk.service 
● kiosk.service - Chromium Kiosk
     Loaded: loaded (/lib/systemd/system/kiosk.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2020-09-06 17:52:11 CEST; 10s ago
   Main PID: 2822 (bash)
      Tasks: 102 (limit: 4523)
     Memory: 424.4M
     CGroup: /system.slice/kiosk.service
             ├─2822 /bin/bash /home/user1/kiosk.sh
             ├─2840 unclutter -idle 0.5 -root
             ├─2841 /usr/lib/chromium-browser/chromium-browser --enable-pinch --noerrdialogs --autoplay-policy=no-user-gesture-required --disable-accelerated-video-decode --start-fullscreen --kiosk --incognito >
             ├─2849 /usr/lib/chromium-browser/chromium-browser --type=zygote --no-zygote-sandbox --noerrdialogs
             ├─2850 /usr/lib/chromium-browser/chromium-browser --type=zygote --noerrdialogs
             ├─2852 /usr/lib/chromium-browser/chromium-browser --type=zygote --noerrdialogs
             ├─2872 /usr/lib/chromium-browser/chromium-browser --type=gpu-process --field-trial-handle=12499335857368612092,12890752898176720314,131072 --disable-features=TranslateUI --noerrdialogs --gpu-prefer>
             ├─2874 /usr/lib/chromium-browser/chromium-browser --type=utility --field-trial-handle=12499335857368612092,12890752898176720314,131072 --disable-features=TranslateUI --lang=en-US --service-sandbox->
             ├─2899 /usr/lib/chromium-browser/chromium-browser --type=renderer --autoplay-policy=no-user-gesture-required --disable-accelerated-video-decode --disable-webrtc-apm-in-audio-service --field-trial-h>
             ├─2926 /usr/lib/chromium-browser/chromium-browser --type=renderer --autoplay-policy=no-user-gesture-required --disable-accelerated-video-decode --disable-webrtc-apm-in-audio-service --field-trial-h>
             ├─2969 /usr/lib/chromium-browser/chromium-browser --type=renderer --autoplay-policy=no-user-gesture-required --disable-accelerated-video-decode --disable-webrtc-apm-in-audio-service --field-trial-h>
             └─2983 /usr/lib/chromium-browser/chromium-browser --type=utility --field-trial-handle=12499335857368612092,12890752898176720314,131072 --disable-features=TranslateUI --lang=en-US --service-sandbox->

sept. 06 17:52:13 user1-nuc bash[2841]: [2841:2871:0906/175213.315275:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>
sept. 06 17:52:13 user1-nuc bash[2841]: [2841:2871:0906/175213.315295:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>
sept. 06 17:52:13 user1-nuc bash[2841]: [2841:2871:0906/175213.315317:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>
sept. 06 17:52:13 user1-nuc bash[2841]: [2841:2871:0906/175213.315336:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>
sept. 06 17:52:13 user1-nuc bash[2841]: [2841:2871:0906/175213.315370:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>
sept. 06 17:52:19 user1-nuc bash[2841]: [2841:2871:0906/175219.534878:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>
sept. 06 17:52:19 user1-nuc bash[2841]: [2841:2871:0906/175219.534969:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>
sept. 06 17:52:19 user1-nuc bash[2841]: [2841:2871:0906/175219.535020:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>
sept. 06 17:52:19 user1-nuc bash[2841]: [2841:2871:0906/175219.535098:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>
sept. 06 17:52:19 user1-nuc bash[2841]: [2841:2871:0906/175219.535135:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp>

Have you an idea about this ?

Go to Source
Author: Rom D