Autostart pulseaudio after boot

This forum is for discussion about general software issues.

Autostart pulseaudio after boot

Postby michael123 » Tue Feb 28, 2017 10:49 am

Hej there,
I have a fresh installed arch on my Raspberry Pi Model B+ and want to use
it as a pulseaudio-server so I can stream my audio from my notebook to the pi/old school stereo.
Until here everythings works fine, if I log in on the Pi as a nonroot user and start pulseaudio manually I can stream the audio.
Therefor I folllowed the guide from the wiki https://wiki.archlinux.org/index.php/Pu … er_network
Now it would be nice if pulseaudio would start after boot of the Pi automatically.
In the Documentation of pulseaudio I found the Option
autospawn = no
in the file /etc/pulse/client.conf which is by default set to no. Changing it to "yes" doesn't make a difference.
Can anybody please explain this option?
There is apparently another way I found by research: Setting pulseaudio in system-mode which can be done by the option
$this->bbcode_second_pass_code('', 'system-instance = yes')
in the file /etc/pulse/daemon.conf
To start pulseaudio now after boot i tried to use systemd by creating the file /etc/systemd/system/pulseaudio.service
$this->bbcode_second_pass_code('', '
# systemd service spec for pulseaudio running in system mode -- not recommended though!
# on arch, put it under /etc/systemd/system/pulseaudio.service
# start with: systemctl start pulseaudio.service
# enable on boot: systemctl enable pulseaudio.service
[Unit]
Description=Pulseaudio sound server
After=avahi-daemon.service network.target

[Service]
ExecStart=/usr/bin/pulseaudio --system --disallow-exit --disallow-module-loading
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target')
see https://gist.github.com/awidegreen/6003640
But when I try to start the service by
$this->bbcode_second_pass_code('', '
systemctl start pulseaudio.service')
I got the following output
$this->bbcode_second_pass_code('', '
[michael@raspberry ~]$ systemctl status pulseaudio.service
* pulseaudio.service - Pulseaudio sound server
Loaded: loaded (/etc/systemd/system/pulseaudio.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2017-02-01 02:12:21 CET; 5s ago
Process: 276 ExecStart=/usr/bin/pulseaudio --system --disallow-exit --disallow-module-loading (code=exited, status=1/FAILURE)
Main PID: 276 (code=exited, status=1/FAILURE)

Feb 01 02:12:21 raspberry systemd[1]: Started Pulseaudio sound server.
Feb 01 02:12:21 raspberry pulseaudio[276]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
Feb 01 02:12:21 raspberry pulseaudio[276]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
Feb 01 02:12:21 raspberry pulseaudio[278]: Failed to find user 'pulse'
Feb 01 02:12:21 raspberry pulseaudio[276]: E: [pulseaudio] main.c: Daemon startup failed.
Feb 01 02:12:21 raspberry systemd[1]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Feb 01 02:12:21 raspberry systemd[1]: pulseaudio.service: Unit entered failed state.
Feb 01 02:12:21 raspberry systemd[1]: pulseaudio.service: Failed with result 'exit-code'.
[michael@raspberry ~]$
')
I read on the pulseaudio website that systemwide mode is not recommended. Is there some other way to start pulseaudio after boot without logging in and maybe not in systemwide mode since it's not recommended?
Thank in advance!
michael123
 
Posts: 1
Joined: Tue Feb 28, 2017 10:44 am

Re: Autostart pulseaudio after boot

Postby WarheadsSE » Tue Feb 28, 2017 3:29 pm

$this->bbcode_second_pass_code('', 'Feb 01 02:12:21 raspberry pulseaudio[278]: Failed to find user 'pulse'')
That's a fairly direct clue.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to General

Who is online

Users browsing this forum: No registered users and 10 guests