Page 1 of 1

[Solved] No audio on Centos 7 guest

Posted: 31. Dec 2017, 12:59
by mooredan
Audio works on High Sierra host,

Host Driver: CoreAudio
Controller: ICH AC97

Guest: Centos 7

Code: Select all

$ cat /proc/asound/cards
 0 [I82801AAICH    ]: ICH - Intel 82801AA-ICH
                      Intel 82801AA-ICH with STAC9700,83,84 at irq 21

$ lsmod | grep snd
snd_intel8x0           38225  5 
snd_ac97_codec        130556  1 snd_intel8x0
ac97_bus               12730  1 snd_ac97_codec
snd_seq                62699  0 
snd_seq_device         14356  1 snd_seq
snd_pcm               106416  3 snd_ac97_codec,snd_intel8x0
snd_timer              29822  3 snd_pcm,snd_seq
snd                    83383  14 snd_ac97_codec,snd_intel8x0,snd_timer,snd_pcm,snd_seq,snd_seq_device
soundcore              15047  1 snd

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: I82801AAICH [Intel 82801AA-ICH], device 0: Intel ICH [Intel 82801AA-ICH]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

$ lspci -nnk | grep -i -A7 audio
00:05.0 Multimedia audio controller [0401]: Intel Corporation 82801AA AC'97 Audio Controller [8086:2415] (rev 01)
        Subsystem: Intel Corporation Device [8086:0000]
        Kernel driver in use: snd_intel8x0
        Kernel modules: snd_intel8x0
00:06.0 USB controller [0c03]: Apple Inc. KeyLargo/Intrepid USB [106b:003f]
        Kernel driver in use: ohci-pci
00:07.0 Bridge [0680]: Intel Corporation 82371AB/EB/MB PIIX4 ACPI [8086:7113] (rev 08)
        Kernel driver in use: piix4_smbus
...and things are turned up and not muted in alsamixer.

Just no audio, testing with:

Code: Select all

$ aplay /usr/share/sounds/alsa/Front_Center.wav                                                             
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono           
I've tried a bunch of different things along the way, rebooting the guest many times, changing the host driver. Any help will be appreciated, thank you.

Dan

Re: No audio on Centos 7 guest

Posted: 1. Jan 2018, 19:04
by socratis
The closest to a CentOS guest that I have is a Fedora 26. I tried it with the latest test build and I have no issues. The command output is almost identical to yours. Please try with the latest 5.2.x test build...

Re: No audio on Centos 7 guest

Posted: 3. Jan 2018, 07:45
by mooredan
Thank you socratis,

I have downloaded and installed VirtualBox-5.2.5-119921-OSX.dmg

VirtualBox -> About shows: Version 5.2.5r119921 (Qt5.6.3)

Unfortunately, the same results - no audio.

So I copied over all of the .wav files from /usr/share/sounds/alsa to the Mac host and all played just fine.

I have an interesing observation though. I think that aplay (and other players) will just play the .wav file and then exit. Not so in this case on the Centos 7 guest -- aplay just hangs until ctrl-c Those alsa test .wav files are all a couple of seconds or less. I tested these and a longer .wav file in the Rythmbox music player and the same thing: hit the play button and the progress indicator just sits there. Even sliding the bar over on a longer .wav file gives the same thing, it just sits there (and doesn't go back to pause). I can pause-play-pause-play toggle, but no progress when in play mode.

This might be a clue as to what is going on. I checked in /var/log/messages for more clues, but didn't see anything.

Re: No audio on Centos 7 guest

Posted: 3. Jan 2018, 07:54
by mooredan
Here's the output of alsa-info

Re: No audio on Centos 7 guest

Posted: 3. Jan 2018, 08:04
by mooredan
...and a bit more info:

aplay -v -v -v a2002011001-e02.wav
Playing WAVE 'a2002011001-e02.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:

Code: Select all

  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 22050
  period_size  : 5512
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 5512
  period_event : 0
  start_threshold  : 22050
  stop_threshold   : 22050
  silence_threshold: 0
  silence_size : 0
  boundary     : 6206523236469964800
Max peak (11024 samples): 0x0000015c #                    1%
Max peak (11024 samples): 0x00003e4f ##########           48%
Max peak (11024 samples): 0x00003b75 ##########           46%
Max peak (11024 samples): 0x00001dbb #####                23%

Re: No audio on Centos 7 guest

Posted: 3. Jan 2018, 13:35
by ChipMcK
try gnome instead of xfce

Re: No audio on Centos 7 guest

Posted: 3. Jan 2018, 20:42
by socratis
I tried with "CentOS-7-x86_64-DVD-1708.iso", default installation, Gnome desktop. No problems. So, I tend to agree with ChipMcK, although I really don't know why that could happen.
ChipMcK wrote:try gnome instead of xfce
Out of curiosity... Why? Why would the desktop environment would have anything to do with it?

Re: No audio on Centos 7 guest

Posted: 3. Jan 2018, 23:11
by ChipMcK
search no audio in Centos 7

though better search no audio in Centos 7 xfce

some desktop components support gnome only

Re: No audio on Centos 7 guest

Posted: 4. Jan 2018, 01:50
by socratis
ChipMcK wrote:though better search no audio in Centos 7 xfce
Wow!!! Impressive...

Re: No audio on Centos 7 guest

Posted: 4. Jan 2018, 05:16
by mooredan
OK, I give it a try (going back to gnome). Actually, I'm using KDE.

I'm somewhat apprehensive though, I remember seeing something about when I switched from Gnome to KDE that it would be a PITA to go back. ....we'll see....

Re: No audio on Centos 7 guest

Posted: 4. Jan 2018, 05:17
by mooredan
....or better yet, I'll do a fresh install of Centos 7 and see if there's audio -- shouldn't take long.

Re: [Solved] No audio on Centos 7 guest

Posted: 4. Jan 2018, 07:15
by socratis
You marked this as [Solved]. Does that mean that by installing Gnome the issue got "fixed"?

Re: [Solved] No audio on Centos 7 guest

Posted: 4. Jan 2018, 07:58
by mooredan
Hmmm, I thought a posted a reply, but I guess it didn't take.

Anyway, no moving to Gnome, reinstalling, or any guest software solution was needed.

My MacMini has two monitors attached:

- An Apple Thunderbolt Display (has built in audio and connected via a Lightning cable)
- A Dell monitor with an attached powered soundbar, monitor is attached to the Mac Mini through an HDMI cable, soundbar gets its input from a audio out on the monitor

Normally, the Thunderbolt is selected. Audio works fine on the MacOS guest. Alternatively, if I select the Dell monitor from the MacOS System Preferences (and turn it on), audio works fine there too. I have to select one or the other.

If I select the Dell monitor as my Sound device on the MacOS host before starting VirtualBox, all is well. Things work as they should. However, if while the host is running and I switch back to the Thunderbolt on the host, bad things happen -- I have to "power cycle" the guest -- lost video, and even lost the ability to SSH in. (so don't do that).

It appears that VB doesn't support the Thunderbolt Display, at least while there's another potential HDMI device available.

Re: [Solved] No audio on Centos 7 guest

Posted: 4. Jan 2018, 08:01
by mooredan
Aha, the Apple Inc. Display Audio shows up on the USB menu -- that might be a way to get the sound to come out of the primary display.