启动服务(pulseaudio)错误

启动服务(pulseaudio)错误

最近我一直在尝试解决我的问题,但没有成功:我无法pulseaudio在启动时启动。我做了以下事情:

  1. 浏览了有关此问题的帖子和问题并按照建议进行操作。
  2. 运行此命令(多次):systemctl enable pulseadio出现以下错误:Failed to enable unit: Unit file pulseadio.service does not exist.
  3. 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.

ps我的系统是Ubuntu18.04 Desktop。

相关内容