Недавно я безуспешно пытался решить свою проблему: я не могу запустить pulseaudio
при загрузке. Что я сделал:
systemctl enable pulseadio
, которая выдавала следующую ошибку: Failed to enable unit: Unit file pulseadio.service does not exist.
Создал файл с именем pulseaduio.service
в каталоге /lib/systemd/system
со следующим содержимым.
[Unit]
Description=Pulseaudio bizzare service
[Service]
PIDFile=/run/pulseaudio.pid
ExecStartPre=/bin/rm -f /run/pulseaudio.pid
ExecStart=/usr/bin/pulseaudio --start
ExecReload=/bin/kill -s HUP $MAINPID
KillMode=process
KillSignal=SIGQUIT
TimeoutStopSec=5
[Install]
WantedBy=multi-user.target
После запуска systemctl status -l pulseaudio.service
я получаю это
pulseaudio.service - Pulseaudio bizzare service
Loaded: loaded (/lib/systemd/system/pulseaudio.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2018-06-22 21:54:00 +04; 34s ago
Process: 944 ExecStart=/usr/bin/pulseaudio --start (code=exited, status=0/SUCCESS)
Process: 930 ExecStartPre=/bin/rm -f /run/pulseaudio.pid (code=exited, status=0/SUCCESS)
Main PID: 944 (code=exited, status=0/SUCCESS)
Tasks: 4 (limit: 4915)
CGroup: /system.slice/pulseaudio.service
├─ 991 /usr/bin/pulseaudio --start
└─1032 /usr/lib/x86_64-linux-gnu/pulse/gconf-helper
Հնս 22 21:53:57 Moshniy systemd[1]: Starting Pulseaudio bizzare service...
Հնս 22 21:53:57 Moshniy systemd[1]: Started Pulseaudio bizzare service.
Հնս 22 21:53:58 Moshniy pulseaudio[944]: W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
Հնս 22 21:53:59 Moshniy pulseaudio[991]: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Հնս 22 21:53:59 Moshniy pulseaudio[991]: Failed to load module "module-jackdbus-detect" (argument: "channels=2"): initialization failed.
Հնս 22 21:54:00 Moshniy pulseaudio[991]: Module load failed.
Հնս 22 21:54:00 Moshniy pulseaudio[991]: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Հնս 22 21:54:00 Moshniy pulseaudio[991]: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Հնս 22 21:54:25 Moshniy pulseaudio[991]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
p.s. Моя система - Ubuntu18.04 Desktop.