Неизвестная внешняя ошибка sound will be disconnected

На самом деле существует довольно простой, но нелогичный способ воспроизведения звука на любой виртуальной машине Linux, поддерживающей Pulseaudio. Он также будет работать на любой платформе виртуальных машин, а не только на Hyper-V.

И самое лучшее в этом то, что он не требует изменения каких-либо системных настроек ни на виртуальной машине, ни на хост-компьютере. Кроме того, вам не нужно запускать виртуальную машину в расширенном сеансе и совместно использовать с ней аудиодрайверы вашей хост-системы.

Короткий ответ:

Установите подходящую для ОС версию
ffmpegутилита как на вашем хост-компьютере, так и на виртуальной машине.

Запустите следующую команду на хост-компьютере:

      ffplay -nodisp -ac 2 -acodec pcm_s16le -ar 48000 -analyzeduration 0 -probesize 32 -f s16le -i udp://0.0.0.0:18181?listen=1

Выполните следующую команду на вашей виртуальной машине:

      ffmpeg -f pulse -i "remote.monitor" -ac 2 -acodec pcm_s16le -ar 48000 -f s16le "udp://IP.OF.YOUR.HOST:18181"

Подробный ответ:

В этой статье содержится более подробное руководство по процессу и объясняется, что на самом деле делают команды .

VMWare sound issues with Realtek HD Audio R2.71

Just a quick post for anyone getting a…

🔊
The default sound device cannot be opened:
A device ID has been used that is out of range for your system. Sound will be disconnected.

…error in VMWare with the latest Realtek drivers this is what fixed it for me. Unlike the older drivers which had a ‘disable jack detection’ button the new drivers hide it away. To solve it open the Realtek Sound Manager. (mine is ASUS branded but it should look similar on other systems)

  • You can open this from Control Panel > Realtek HD Audio Manager

Click the cog up in the top right and select Options, you should then get this window.

  • Select AC97 Front Panel to disable detection

Clicking the ‘AC97 Front Panel’ option will disable the jack detection. After that the next time you boot up a VM you should find the sound is working once more.

I had the same problem with a FC 8 VM running on VMWare Workstation 7.1.4 build-385536 and Windows 7 Professional, 64-bit 6.1.7601, Service Pack 1.  Prior to this, the FC 8 VM worked flawlessly on VMWare Workstation 6.x and Windows Vista for nearly 2 years.  It was when I bought a new PC (with an Ensoniq ES1371 [AudioPCI-97] (0x1371) sound device), installed Windows 7 and upgraded VMWare to 7.1.4 that the problem appeared.  So, the VM didn’t change but the VMWare and Windows OS and the PC hardware did change.  The error message was:

Error while initializing the sound driver:  device: default can’t be opened for playback (Connection refused).  The sound server will continue, using the null output device.

Next, I installed an entirely new VM, FC 15 (2.6.40.4-5.fc15.x86_64 #1 SMP Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux) on the same VMWare 7.1.4 with Windows 7 Professional SP1.  The installation was flawless except for audio.  This time the error message was as follows:

The default sound device cannot be opened:  The specified device is already in use.  Wait until it is free, and then try again.  Sound will be disconnected.

This happens whether or not I happen to be playing sound on Windows 7 prior to booting up FC 15.

NOTE:  The VMWare Workstation Sound Card setting is set to «Use default host sound card» (i.e. Auto Detect) prior to booting FC 15.

If I change the VMWare Sound Card setting from «Use default host sound card»  to «Specify host sound card» and then select «Speakers(High Definition Audio),» which *is* the default host sound card I get a different error message, as follows:

Error opening sound device 0: The specified format is not  supported or cannot be translated.  Use the Capabilities function to  determine the supported formats.  Sound will be disconnected.

Weird!  I would expect the same error message, not a different one!  After all it is the same sound device.

Next, I reset the sound card setting to Auto Detect and rebooted FC 15.  I then streamed music via Firefox in the VM (in FC 15) and watched the KDE Volume Control.  I could see the audio level meters moving back and forth as though music was playing i.e. the meters moved in cadence with the music that was playing and if I turned the volume down on the mixer the meter movement decreased to zero.

Next, while the music was still streaming I executed

> pulseaudio —kill

and restarted the Volume Control.  The output device audio level meters registered zero as would be expected.  If I restarted pulseaudio the audio meters began moving in cadence with the music again.

I don’t think this is a problem with the Linux sound system.  It seems to be working fine.  There is no problem with the Windows 7 sound system either.  The problem seems to be that VMWare cannot get Windows to relinquish control of the sound device.  I am an amateur user of Linux so my perception of the problem may be wrong.

Is there a Windows sound setting that needs to be adjusted to allow VMWare to share the sound device or take it over altogether?

There is actually a fairly easy, but a counterintuitive, way of playing audio on any Linux VM that supports Pulseaudio. It will also work on any VM platform, not just Hyper-V.

And the best thing about it is that it doesn’t require changing any system setting on either the VM or the host machine. And it doesn’t require you to run your VM in an enhanced session either and share your host system’s audio drivers with it.

Short answer:

Install OS-appropriate version of ffmpeg utility on both your host machine and the VM.

Run the following command on your host machine:

ffplay -nodisp -ac 2 -acodec pcm_s16le -ar 48000 -analyzeduration 0 -probesize 32 -f s16le -i udp://0.0.0.0:18181?listen=1

Run the following command on your VM:

ffmpeg -f pulse -i "remote.monitor" -ac 2 -acodec pcm_s16le -ar 48000 -f s16le "udp://IP.OF.YOUR.HOST:18181"

Detailed answer:

This article provides a more detailed guidance of the process and explains what the commands actually do: GETTING AUDIO WORKING ON UBUNTU VM ON HYPER-V

3 / 3 / 0

Регистрация: 04.04.2015

Сообщений: 141

1

Windows

14.05.2021, 19:31. Показов 2315. Ответов 1


Студворк — интернет-сервис помощи студентам

После загрузки Astra Linux (Orel) 2.12.42, установленной в VMware Workstation 16 Player, стало появляться сообщение:

The default sound device cannot be opened:
Указан код устройства, не используемого в системе.
Sound will be disconnected.

и пропал звук. В настройках виртуальной машины и гостевой ОС ничего не трогал. В чём может быть причина пропажи звука?



0



3 / 3 / 0

Регистрация: 04.04.2015

Сообщений: 141

30.10.2022, 13:44

 [ТС]

2

Звук был возвращён с помощью внесения в файл AstraLinux.vmx следующих строк:

sound.pcislotnumber = «34»
sound.present = «true»
sound.virtualDev = «hdaudio»
sound.autoDetect = «TRUE»
sound.fileName = «-1»
pciSound.useSoundLib = «FALSE»

и удалением соответствующих строк-дублей.



0



Понравилась статья? Поделить с друзьями:
  • Неизбежная победа ошибка
  • Неизбежная ошибка как пишется
  • Незначительные ошибки синоним
  • Незначительные ошибки при беге
  • Недокументированная серьезная ошибка 0x3fff nod32