I have Horizon Agent 2111 installed on a RHEL 7.9 VM and I'm having issues with audio. It sounds very garbled and it stutters. I have disabled SELinux and the Firewalld service. I have also made sure that FIPS mode is off and there is no anti-virus installed.
I'm running ESXi 6.7 Update 2 with Horizon View Version 8.4.0.1944. The Virtual Machine is Hardware 15 and it is running Open VM Tools Version 11269. I'm using the Windows View Client version 8.4.0 (18968194)
I don't see any audio devices in RHEL when I run "lspci". I also don't see any audio devices when I run "aplay -l". I only see a "Dummy Output" listed in the Audio Output section in the Gnome desktop.
I have never setup Linux VDI , so I don't know if I am doing something wrong. Do I need to add a HD Audio device using the VMX ?
Hi Robot
We use the virtual output of pulseaudio module, so you don't find the device with lspci. What the Linux desktop type do you use, gnome? What application do you use to play audio in Linux desktop? What the horizon client type do you use, windows ? It look like you can hear the sound but the sound quality is bad? Could you show the result of "pactl list" in the linux desktop? I suggest you to install the pavucontrol tool via "sudo yum install pavucontrol" and launch pavucontrol to monitor the sound status.
Hello songkai,
The audio issue I am having is the beginning of audio files are getting clipped off. I don't notice it with long audio files, but I do with short audio files like system sounds. This seems to be an issue with PulseAudio and the View Agent Virtual Sound Device.
If I run the command: paplay -v /usr/share/sounds/alsa/Front_Left.wav. This command is a PulseAudio utility and the beginning of the audio is clipped off.
If I run the command: aplay /usr/share/sounds/alsa/Front_Left.wav. This command is a ALSA utility and I hear the whole audio file.
If I start the pavucontrol utility and leaving it running, I don't get the audio clipping. I came across a PulseAudio Git issue talking about an issue like this, but it seems to have been fixed. https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/593
I logged into a ESXi host and I installed a HD Audio sound card into the RHEL 7.9. After I rebooted the system, I logged into the system using the Windows View Client and I didn’t have any audio issues with PulseAudio. PulseAudio was using the HD Audio device instead of the View Virtual Sound Device. I don’t plan on using the HD Audio device, but it shows that sound is working in the RHEL 7.9. I also installed the same RHEL 7.9 image on physical workstations and I don't have any audio clipping.
I'm currently using RHEL 7.9 with the Gnome Desktop and Agent 2203 installed. Plus, I'm seeing the same issue with RHEL 8.5 (Gnome Desktop) and Agent 2203.
Hi robot_runner,
I'm running into similar issues to you and I'm trying to implement the steps you took later in the post. I found online to install HD audio sound card into my rhel vm by editing the .vmx file and adding
sound.present = "true" sound.allowGuestConnectionControl = "false" sound.virtualDev = "hdaudio" sound.fileName = "-1" sound.autodetect = "true"
But after saving the file and starting up the VM, it looks like it doesn't save the changes. How did you install a HD sound card into your rhel VM?
Also a question to you or for VMware assistance, when I launch my RHEL VM through Horizon client on my Windows machine, I can hear distorted audio when logging into GNOME, but I can't hear any audio when logging into MWM. I've tried starting pulseaudio while in MWM with no change. Is there anything else I can check to make audio work in MWM?
Hello konhuynh,
You can add a HD Audio device to your virtual machine by logging directly into the ESXi host that is running the VM.
1: Click Virtual Machines in the VMware Host Client inventory.
2: Right-click a virtual machine in the list and select Edit settings from the pop-up menu.
3: On the Virtual Hardware tab, select Add other device and select Sound controller from the drop-down menu. The sound controller appears in the list of available hardware devices for the virtual machine.
4:From the Sound card drop-down menu, select which sound controller to connect to the virtual machine.
5:Click Save.
I found this in the VMware Docs Here:
There is a issue with adding an audio device to virtual machines. You will NOT be able to vMotion the VM to another ESXi host without powering it down first.
I don't have the sound controller option in the edit settings. I'll have to research to see why, I'm using vSphere 7.
It should work in vSphere 7. Make sure you are logging into the ESXi host and not the vSphere server. Also make sure to select "Add other device" and select the Sound controller.
Here is the vSphere 7 Docs:
https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.hostclient.doc/GUID-0AAAA4CA-31ED-49A1-8A4B-335B5482A57E.html
Thank you, I was able to add the sound controller and sound works perfect when logged in GNOME, but my software needs to run in MWM and I don't have any sound in that. Not sure if you are able to help, but I will probably research it more or open a ticket with Red Hat.
The default configured latency of dummy audio device is 2000000 usec in pluseaudio, this is too long and will cause the sound delayed or missed. Unfortunately, there is no way to change this default configured latency directly now. But the sound player application can reset this value in their audio play stream. Most of player applications reset this value automatic, but some other applications use the default value and need to set the latency in the launch params, such as speaker-test use "-b" option and paplay use "--latency-msec" option
Could you try the command "paplay --latency-msec=100 [test audio file]" or "speaker-test -b 100000 -c 2 -t wav" for the test? Thank you very much!
