LINUX.ORG.RU

Pulse нет звука при запуске в удаленной консоли

 


0

1

Уже неделю бьюсь не могу разобраться, что не так.

Есть компьютер, с установленной Lubuntu, видео встроенное AMD Kabini, подключен по HDMI к рессиверу. Звук из колонок рессивера есть, есть если запустить VLC или mplayer, есть так же и в локальной консоли!

Теперь подключаюcь к этому компьютеру по SSH делаю mplayer a.wav

Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 24000 Hz, 1 ch, s16le, 384.0 kbit/100.00% (ratio: 48000->48000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
[AO_ALSA] alsa-lib: pcm_hw.c:1715:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-2): No such file or directory
[AO_ALSA] alsa-lib: pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: No such file or directory
Failed to initialize audio driver 'alsa'
[AO SDL] Samplerate: 24000Hz Channels: Mono Format s16le
[AO SDL] using aalib audio driver.
[AO SDL] Unable to open audio: No available audio device
Failed to initialize audio driver 'sdl:aalib'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video
Звука соответственно нет, устройства /dev/snd/pcmC0D0p нет, есть /dev/snd/pcmC0D03p

 pacmd list-sinks | grep -e 'name:' -e 'index'
  * index: 0
	name: <alsa_output.pci-0000_00_01.1.hdmi-stereo>
    index: 1
	name: <alsa_output.pci-0000_00_14.2.iec958-stereo>
pacmd list-sources | grep -e device.string -e 'name:'
	name: <alsa_output.pci-0000_00_01.1.hdmi-stereo.monitor>
		device.string = "0"
	name: <alsa_output.pci-0000_00_14.2.iec958-stereo.monitor>
		device.string = "1"

Пробовал настраивать через asoundrc, pulse conf ничего не помогает. Несколшькими днями ранее пытался с ubuntu server тоже самое, психанул подумал что дело в кривых конфигах поставил Lubuntu тоже самое.

Проверил DISPLAY=:0 mplayer a.wav звук идет, разобрался в последних Ubuntu необходимо запускаться pulseaudio при запуске системы или вручную для каждого пользователя.

Должен помочь запуск pulseaudio system mode, но разработчики так не рекомендуют делать.

Timuridze ()
Ответ на: комментарий от Timuridze

1. Создал юнит pulseaudio для автозапуска

Type=forking
ExecStart=/usr/bin/pulseaudio --realtime --no-cpu-limit --system --disallow-exit --daemon
ExecReload=/bin/kill -HUP $MAINPID

2. /etc/pulse/client.conf:
default-server = /var/run/pulse/native 
autospawn = no

3. Пользователь в pulse-access


При запуске все равно
mplayer a.wav
MPlayer 1.3.0 (Debian), built with gcc-9 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing a.wav.
libavformat version 58.20.100 (external)
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 24000 Hz, 1 ch, s16le, 384.0 kbit/100.00% (ratio: 48000->48000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
[AO_ALSA] alsa-lib: pcm_hw.c:1715:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-2): No such file or directory
[AO_ALSA] alsa-lib: pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave


grep -a pulseaudio /var/log/syslog
Oct 15 00:06:24 server-home pulseaudio[894]: W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
Oct 15 00:06:24 server-home pulseaudio[894]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
Oct 15 00:06:24 server-home pulseaudio[894]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
Oct 15 00:06:24 server-home pulseaudio[940]: OK, so you are running PA in system mode. Please make sure that you actually do want to do that.
Oct 15 00:06:24 server-home pulseaudio[940]: Please read http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/ for an explanation why system mode is usually a bad idea.
Oct 15 00:06:39 server-home pulseaudio[940]: Failed to open cookie file '/var/run/pulse/.config/pulse/cookie': No such file or directory
Oct 15 00:06:39 server-home pulseaudio[940]: Failed to load authentication key '/var/run/pulse/.config/pulse/cookie': No such file or directory
Oct 15 00:06:39 server-home pulseaudio[940]: Failed to open cookie file '/var/run/pulse/.pulse-cookie': No such file or directory
Oct 15 00:06:39 server-home pulseaudio[940]: Failed to load authentication key '/var/run/pulse/.pulse-cookie': No such file or directory
Oct 15 00:06:40 server-home dbus-daemon[778]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service' requested by ':1.51' (uid=1000 pid=1168 comm="/usr/bin/pulseaudio --daemonize=no " label="unconfined")
Oct 15 00:07:02 server-home pulseaudio[1168]: E: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.104" (uid=1000 pid=1168 comm="/usr/bin/pulseaudio --daemonize=no " label="unconfined") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination="org.bluez" (bus)
Oct 15 00:07:55 server-home pulseaudio[940]: XOpenDisplay() failed
Oct 15 00:07:55 server-home pulseaudio[940]: Failed to load module "module-x11-publish" (argument: "display=:0"): initialization failed.
Timuridze ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.