No sound again on Intel HDMI (Coffe Lake UHD 630)

Dear Forum,
I am trying to switch to FreeBSD as a desktop and after few days there is no sound.
I have tried lxqt, xfce, kde. Installed manually and with desktop-installer.
DE see there is a device in mixers/config application but there is no sound.
The hardware is ok (because kubuntu have sound out of the box).
See below for some config. There is something i do not know / not see (i am new with FreeBSD as desktop).
There is probably something so tiny i do not see.
What to do?


Code:
dmesg|grep hda
pcm0: <Realtek ALC235 (Analog 2.0+HP/2.0)> at nid 20,33 and 25 on hdaa0
pcm1: <Realtek ALC235 (Front Analog Mic)> at nid 26 on hdaa0
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> at nid 3 on hdaa1

hdac0: <Intel Coffee Lake HDA Controller> mem 0xb1430000-0xb1433fff,0xb1000000-0xb10fffff irq 16 at device 31.3 on pci0
hdacc0: <Realtek ALC235 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC235 Audio Function Group> at nid 1 on hdacc0
hdacc1: <Intel Kaby Lake HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel Kaby Lake Audio Function Group> at nid 1 on hdacc1
Code:
cat /dev/sndstat

Installed devices:
pcm0: <Realtek ALC235 (Analog 2.0+HP/2.0)> (play/rec)
pcm1: <Realtek ALC235 (Front Analog Mic)> (rec)
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> (play) default
No devices installed from userspace.

Code:
sysctl dev.hdac.0.pindump=1

hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 18 40000000 0  0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps: IN
hdaa0: 20 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0:     Caps:    OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 23 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps:    OUT
hdaa0: 24 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa0: 25 02a11020 2  0  Mic           Jack  1/8     Front      Black   0
hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa0: 26 02a11030 3  0  Mic           Jack  1/8     Front      Black   0
hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN OUT HP EAPD VREF Sense: 0x80000000 (connected)
hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa0: 33 0221101f 1  15 Headphones    Jack  1/8     Front      Black   0
hdaa0:     Caps:    OUT HP EAPD      Sense: 0x00000000 (disconnected)
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: disabled
hdaa0:  GPIO2: disabled
hdaa1: Dumping AFG pins:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  3 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0

Code:
sysctl dev.hdaa|grep original

dev.hdaa.1.nid3_original: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid33_original: 0x0221101f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Front color=Black misc=0
dev.hdaa.0.nid30_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid29_original: 0x40400001 as=0 seq=1 device=SPDIF-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid27_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid26_original: 0x02a11030 as=3 seq=0 device=Mic conn=Jack ctype=1/8 loc=Front color=Black misc=0
dev.hdaa.0.nid25_original: 0x02a11020 as=2 seq=0 device=Mic conn=Jack ctype=1/8 loc=Front color=Black misc=0
dev.hdaa.0.nid24_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid23_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid20_original: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid18_original: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0


After boot there is no dsp* devices.
After starting kde there appeared /dev/dsp0.0, /dev/dsp1.0, /dev/dsp2.0
After exiting kde there are 6 dsp* /dev/dsp0.0, /dev/dsp0.1, /dev/dsp1.0, /dev/dsp1.1, /dev/dsp2.0, /dev/dsp2.1

cat /dev/random > /dev/dsp0.0
make noise but via internal speaker (simple beeper - unusable as a sound device)
DE see devices but testing "Kaby Lake HDMI" throws "No such driver".
Code:
loader.conf

sound_load="YES"
snd_hda_load="YES"
uplcom_load="YES"
ng_ubt_load="YES"
However, without those effect was the same, but kldstat shows that sound module was loaded.

The rc.conf has (among not connected items):
Code:
dbus_enable="YES"
mixer_enable="YES"
Adding mixer_enable did nothing.

I have added default unit selection: hw.snd.default_unit=2 to sysctl.conf.
After this I have tried hw.snd.default_auto=1 but no luck.
 
pcm2 is your HDMI output, so hw.snd.default_unit=2 is correct. Please set hw.snd.default_auto=0, you do want unit 2 explicitly.

The corresponding audio device for pcm2 is /dev/dsp2, therefore your test should be cat /dev/random > /dev/dsp2 (the distinction between dsp2 and dsp2.X is not relevant for this test). With hw.snd.default_unit=2 you can actually test with cat /dev/random > /dev/dsp, because /dev/dsp acts like a symlink to your default audio device, i.e. /dev/dsp2 in this case.

For audio over HDMI to work help from the graphics driver is needed. Do you have graphics/drm-510-kmod or graphics/drm-515-kmod installed and working? graphics/gpu-firmware-kmod might also be needed. There are user reports out there that haven't got audio over HDMI with intel working, regardless what they tried. If that turns out to be true for you too, then you are out of luck unfortunatly.

Which audio backend is running, e.g. pure OSS, sndio or pulseaudio?
 
Yes, i need hdmi, because this computer is connected to monitor with speakers build in. This is the only way to use sound.
I forget to tel that drm-515-kmod was installed via drm-kmod metaport with all the firmware packages. gpu-firmware-kmod also.
Is it working? I don't know. Because there is no sound i guess it is not.

With and without hw.snd.default_auto=0 test cat /dev/random /dev/dsp did not change anything.
Stil silence...

I think that pulseaudio is the running one. How to change it and try others?
Is it possible to have them all at once and switch between them?
Because cat /dev/sndstat say "No devices installed from userspace."
I think that there is something missing. Maybe this is somehow connected? Am i right?

I think linuxkpi_hdmi is somehow connected with linux part of the driver.
Maybe there should be a linux compatibility layer installed to get this working?
I have found this:
compat.linuxkpi.i915_fastboot=1 # Skip unnecessary Mode Sets at boot time
compat.linuxkpi.i915_enable_dc=2 # Enable power saving Display C-STATES
compat.linuxkpi.i915_enable_fbc=1 # Enable Frame Buffer Compression
however this can be connected with i915kms i do not know it is.
I have this tried but do not see it change anything in sound and in graphics (especially boot time).

hdaa1: nid 0x as seq device conn jack loc color misc
hdaa1: 3 18560010 1 0 Digital-out Jack Digital 0x18 Unknown 0
hdaa1: Caps: OUT Sense: 0x00000000 (disconnected)
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
This is odd - the hdmi cable is connected...
 
I forget to tel that drm-515-kmod was installed via drm-kmod metaport with all the firmware packages
Can you try replacing it with graphics/drm-510-kmod? It's just an attempt to rule out a regression in graphics/drm-515-kmod.

I think that pulseaudio is the running one. How to change it and try others?
Is it possible to have them all at once and switch between them?
Trying another audio backend is just a last resort. cat /dev/random > /dev/dsp should produce noise independend of the audio backend (but alas, I wouldn't be surprised if pulseaudio even manages to interfere with it...). Just to be clear: you should be able to hear sound with cat /dev/random > /dev/dsp independend of your usage of OSS, sndio, pulseaudio, pipewire, jack, ALSA, etc...

Because cat /dev/sndstat say "No devices installed from userspace."
I think that there is something missing. Maybe this is somehow connected? Am i right?
No it's alright, AFAIK it's only relevant if you use audio/virtual_oss. It has nothing to do with your problem.

This is odd - the hdmi cable is connected...
This doesn't look healthy. I have no further ideas. Maybe someone else has. I have an uncomfortable feeling that you are one of those unlucky souls for which audio over HDMI with intel doesn't work.
 
One last idea: your HDMI cable is connected to your monitor. Are you sure that your monitor is not muted? I was in that situation looking for a solution for two hours until I realised: DAMN! My monitor is muted!
 
Tried drm-510-kmod - no change.
Tried device.hints to say "conn=Fixed" - no change.
The monitor is not muted. It produce sound in kubuntu and windows. Settings confirming that.
cat /dev/random > /dev/dsp does not produce sound as well as other /dev/dsp* except
cat /dev/random > /dev/dsp0.0 can be heard via built in speaker.

I think this is no "luck". This can be long known bug - but no one from FreeBSD is interested in fixing this. ):
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237340
 
Partial solution: if the motherboard have HDMI and DP connectors, using DP to HDMI adapter the sound is available.
However in KDE sound test still say no such driver, application are working with sound correctly.
 
Back
Top