No sound (at least in videos: Firefox, vlc...)

Hello,

First, some (almost useless) background: I managed to install NomadBSD on a USB key and I use it at work. I am teacher and the computers in the classrooms all run Windows. I could start and use NomadBSD on several of them (different classrooms, different configurations, 3 with different multiscreen config, all ran fine). I am pretty happy I did not have to advertise for Microsoft during my lessons in the last few weeks. I wanted to try this since a long time and thought a Linux distro (namely Slax) would make it, but finally no, NomadBSD made it before :slight_smile:

Only problem, today I wanted to run a video and could not get any sound. I checked the cables, the speakers were on, I changed the volume etc. everything looked absolutely fine. I gave an exercise to the children while I was rapidly checking was I could, but I had not much time, so here are the informations I could gather (I did not copy the commands unfortunately):

pcm0: <Realtek ALC255 (Rear Analog Line-out)> at nid 27 on hdaa0
pcm1: <Intel Skylake (HDMI/DP 8ch)> at nid 3 on hdaa1

Installed devices:
pcm0: <Realtek ALC255 (Rear Analog Line-out)> (play)
pcm1: <Intel Skylake (HDMI/DP 8ch)> (play) default
No devices installed from userspace.

I have checked the volume was high enough, changed the default device as described in the handbooklet, have restarted Firefox, also tried from vlc and the other video player.

I also loaded snd_driver.

I wonder what ā€œNo devices installed from userspace.ā€ means: is it normal?

Unfortunately I will be able to retry only once, friday, and then not before september. If I cannot resolve this, Iā€™ll have to restart with Windows :confused: So Iā€™ll gather any clue and hints and cross my fingers.

Many thanks for any help to investigate this further!

Hi there @zezollo,

try

# sysctl dev.hdac.0.polling=1
# sysctl dev.hdac.1.polling=1

Thank you! Iā€™ll try this and tell if it worked!

Screenshot_2020-07-12_19-29-55

Hi,

Iįøæ new to NomadBSD, looks very slick, seems to work well but no sound.
I checked the handbook and tried all the options open to me. IĒ˜e tried plugging the speaker cable into both the front and back of the PC.
Machine does have a Nvidea NVS310 card and the monitor is connected with a display port.
I can get sound out from the computer itself but not the speakers.

Help appreciated

hi @gbar,

could you please post the output of dmesg | egrep 'pcm|snd|hdac'?

Hi mk1,
thanks, here goes -
hdac0: mem 0xf7080000-0xf7083fff irq 17 at device 0.1 on pci1
hdac1: mem 0xf7834000-0xf7837fff irq 16 at device 3.0 on pci0
hdac2: mem 0xf7830000-0xf7833fff irq 22 at device 27.0 on pci0
hdacc0: <NVIDIA (0x001c) HDA CODEC> at cad 0 on hdac0
hdaa0: <NVIDIA (0x001c) Audio Function Group> at nid 1 on hdacc0
pcm0: <NVIDIA (0x001c) (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm1: <NVIDIA (0x001c) (HDMI/DP 8ch)> at nid 6 on hdaa0
hdacc1: at cad 0 on hdac1
hdaa1: at nid 1 on hdacc1
pcm2: <Intel Haswell (HDMI/DP 8ch)> at nid 3 on hdaa1
hdacc2: at cad 0 on hdac2
hdaa2: at nid 1 on hdacc2
pcm3: <Realtek ALC221 (Analog)> at nid 23 and 27,26 on hdaa2
pcm4: <Realtek ALC221 (Analog 2.0+HP)> at nid 20,33 on hdaa2

thanks

Could please try to play some sound through your HDMI/DP which is connected to the monitor with speakers (cat /dev/random > /dev/dsp) and repeat the command dmesg | egrep 'pcm|snd|hdac' to see if there are any error messages?

Hi,
Sorry bit of confusion from my side of things. The monitor connected by DP doesnā€™t have any built in speakers. I have external speakers on a 3.5mm connector plugged into the computer itself

I see.

Just to prevent further confusion :slight_smile: , what does that mean? Does your PC have integrated speakers like a laptop?

Hi,
thereā€™s some sort of crappy teeny speaker within the computer itself, itā€™s an HP EliteDesk machine, so yeah, kinda like a laptop but worse sound
thanks

Ok. Your default audio device should then be set to pcm3 (Realtek ALC221 (Analog)). The reason why there is no audio coming from the front or back rear is very likely an audio routing problem. See this thread which should solve your problem. In your case itā€™s hint.hdac.2.*.

Thanks mk1,
Iā€™ve got sound!
I kind of tried to follow their lead on the FreeBSD forum you suggested and just about managed to figure out that it was routing sound (sndstat) via the graphics card and cable to the monitor, a quick scratch around and i see there is a speaker outlet cable on the monitor, plug it in and bingo.
Thats good enough for me, thanks for the help/patience, no doubt iÄŗl be back with more questions later!
gbar

1 Like

Excellent! :smiley:

Sure :slight_smile:

Sorry to come back late at this, but I thought there was no emergency since I wonā€™t be able to test again before september at least. So, the suggestion unfortunately did not work.

I have performed some more tests on a computer thatā€™s not in a classroom, so I had more time for this. The sound configuration looks the same and the problems are the same (no sound, but sound works from Windows).

nomad@NomadBSD ~> cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC255 (Rear Analog Line-out)> (play)
pcm1: <Intel Skylake (HDMI/DP 8ch)> (play) default
No devices installed from userspace.

The sound drivers were loaded:

nomad@NomadBSD ~ [1]> sudo kldload snd_driver
nomad@NomadBSD ~> sudo kldload snd_hda
kldload: can't load snd_hda: module already loaded or in kernel

So Iā€™ve tried the suggested command, but it looks like it didnā€™t change anything:

nomad@NomadBSD ~> sudo sysctl dev.hdac.0.polling=1
Mot de passe : 
dev.hdac.0.polling: 1 -> 1
nomad@NomadBSD ~> sudo sysctl dev.hdac.1.polling=1
sysctl: unknown oid 'dev.hdac.1.polling'

I have copied the whole dmesg, so I could run the egrep 'pcm|snd|hdac' command on it too:

hdac0: <Intel Kaby Lake-H HDA Controller> mem 0xf7120000-0xf7123fff,0xf7100000-0xf710ffff irq 21 at device 31.3 on pci0
hdacc0: <Realtek ALC255 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC255 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC255 (Rear Analog Line-out)> at nid 27 on hdaa0
hdacc1: <Intel Skylake HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel Skylake Audio Function Group> at nid 1 on hdacc1
pcm1: <Intel Skylake (HDMI/DP 8ch)> at nid 3 on hdaa1

I did some other unsuccessful attempts, but Iā€™m not sure theyā€™re relevant at all. I can post them too, as well as the complete dmesg output, if this could be of interest.

Donā€™t know what I should try next. When Iā€™ll be able to test this again, Iā€™ll certainly have to read the suggested topic from FreeBSD forums and hence the man page for snd_hda, if Iā€™m not wrong. Iā€™ll give feedback again when testing is possible again.

Hi,
Iā€™m back after a break and the computer sound has stopped working!
DSB Mixer has stopped working, it opens but i can change anything and then some seconds after trying to close it -
he window ĀØ The window ā€œDSB Mixerā€ does not seem to be responding. Do you want to force it to exit by sending the terminate signal?"
I can drag a youtube link and drop it into mpv Media Player and the sound starts coming out of the crappy internal speaker again? I can now open DSB Mixer and itś behaving randomly. There are boxes below Spkr, Line, Mic and Mix and ā€˜ticksā€™ are jumping about between them randomly

Hi @gbar,

please open a new thread for your problem.

Thank to this reply i solved my troubles with sound. Thanks :slight_smile: