[systemd-devel] user unit blocking login shell from popping out because wanted by default target?

Reindl Harald h.reindl at thelounge.net
Sun Jan 10 09:30:01 PST 2016



Am 10.01.2016 um 18:15 schrieb Mantas Mikulėnas:
> I remember this discussed before, I think one suggestion was to split
> into two targets, and only hold the login until the first target. Nobody
> implemented it though.
>
> But yes, pulseaudio.socket would be a requirement of that. If you don't
> want to wait until it starts, *and* don't want to socket-activate it,
> the third option is to live in a world of race conditions.
>
> On Sun, Jan 10, 2016, 16:25 Tom Yan <tom.ty89 at gmail.com
> <mailto:tom.ty89 at gmail.com>> wrote:
>
>     So I am recently experiencing some issue with pulseaudio (which I
>     already filed a bug report:
>     https://bugs.freedesktop.org/show_bug.cgi?id=93651) that it takes a
>     long time to start.
>
>     The thing is, I am thinking whether it exposed a problem of systemd as
>     well. For example:
>
>     Jan 10 21:31:33 localhost systemd[257]: Starting Sound Service...
>     Jan 10 21:31:33 localhost systemd[257]: Started D-Bus User Message Bus.
>     Jan 10 21:31:39 localhost systemd[257]: Started Sound Service.
>     Jan 10 21:31:39 localhost systemd[257]: Reached target Default.
>     Jan 10 21:31:39 localhost systemd[257]: Startup finished in 5.830s.
>
>     As you can see, because of pulseaudio, it takes about 6 seconds to
>     reach the default target

no idea how you configured you pulseaudio.service

but i can assure you that i have systems with pulseaudio as systemwide 
daemons where the whol eboot inlcuding VMware, httpd, dbmail and two 
mysql-instances takes around 18 seconds

in fact with "type=simple" it can't delay boot at all

[root at srv-rhsoft:~]$ cat /usr/lib/systemd/system/pulsed.service
[Unit]
Description=Pulseaudio Daemon
After=rtkit-daemon.service systemd-udevd.service dbus.service sddm.service

[Service]
Type=simple
ExecStart=-/usr/bin/pulseaudio --daemonize=false --system=true 
--realtime=true --log-level=0 --log-target=stderr 
--disallow-module-loading=true --disallow-exit=true --exit-idle-time=0 
--disable-shm=true --no-cpu-limit=false --use-pid-file=false 
--resample-method=src-sinc-best-quality

Restart=always
RestartSec=30
TimeoutSec=15
Nice=-10

PrivateTmp=yes
PrivateNetwork=yes

CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_WRITE CAP_SYS_ADMIN 
CAP_SYS_BOOT CAP_SYS_MODULE CAP_SYS_PTRACE

ReadOnlyDirectories=/etc
ReadOnlyDirectories=/usr
ReadOnlyDirectories=/var
ReadWriteDirectories=/var/lib/pulse

InaccessibleDirectories=-/boot
InaccessibleDirectories=-/home
InaccessibleDirectories=-/media
InaccessibleDirectories=-/root


[Install]
WantedBy=multi-user.target


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20160110/1e561ab5/attachment.sig>


More information about the systemd-devel mailing list