Solved No sound in FreeBSD-13.0 - pcm4: play interrupt timeout, channel dead

I have sound working in FreeBSD-12.2. I did an upgrade to FreeBSD-13.0 and since then, no sound. I have Gnome-41 desktop and pulseaudio installed. drm-kmod installed.
The error when I try to play an mp3 file is:
Code:
pcm4: chn_write(): pcm4:virtual:dsp4.vp3: play interrupt timeout, channel dead
pcm4: chn_write(): pcm4:virtual:dsp4.vp4: play interrupt timeout, channel dead
pcm4: chn_write(): pcm4:virtual:dsp4.vp5: play interrupt timeout, channel dead

Device:
Code:
hdacc1: <Intel Cougar Point HDA CODEC> at cad 3 on hdac0
hdaa1: <Intel Cougar Point Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x80862805
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 58560010 1  0  Digital-out   None  Digital 0x18       Unknown 0
hdaa1:  6 58560020 2  0  Digital-out   None  Digital 0x18       Unknown 0
hdaa1:  7 18560030 3  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1: Patched pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 58560010 1  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1:  6 58560020 2  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1:  7 18560030 3  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1: 1 associations found:
hdaa1: Association 0 (3) out:
hdaa1:  Pin nid=7 seq=0
hdaa1: Tracing association 0 (3)
hdaa1:  Pin 7 traced to DAC 4
hdaa1: Association 0 (3) trace succeeded
hdaa1: Looking for additional DAC for association 0 (3)
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1: Tracing beeper
hdaa1: Pin sense: nid=7 sense=0xc0000000 (connected)
hdaa1: Pin sense: nid=7 sense=0xc0000000 (connected, ELD valid)
hdaa1: ELD nid=7: ELD_Ver=2 Baseline_ELD_Len=20
hdaa1: ELD nid=7: CEA_EDID_Ver=3 MNL=1
hdaa1: ELD nid=7: SAD_Count=1 Conn_Type=0 S_AI=0 HDCP=1
hdaa1: ELD nid=7: Aud_Synch_Delay=0ms
hdaa1: ELD nid=7: Channels=0x1<FLR>
hdaa1: ELD nid=7: Port_ID=0x0000000000000000
hdaa1: ELD nid=7: Manufacturer_Name=0x0000
hdaa1: ELD nid=7: Product_Code=0x0000
hdaa1: ELD nid=7: Monitor_Name_String=''
hdaa1: ELD nid=7: LPCM 2ch freqs=0x7<48,44,32> sizes=0x1<16>
unknown: Playback channel set is: Front Left, Front Right, 
unknown: Playback channel matrix is: 2.0 (connected)
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm4: <Intel Cougar Point (HDMI/DP 8ch)> at nid 7 on hdaa1
pcm4: Playback:
pcm4:      Stream cap: 0x00000005 AC3 PCM
pcm4:         PCM cap: 0x001e07f0 16 20 24 32 bits, 32 44 48 88 96 176 192 KHz
pcm4:             DAC: 4
pcm4: 
pcm4:     nid=7 [pin: Digital-out (Jack)]
pcm4:       + <- nid=4 [audio output] [src: pcm]
pcm4: 
pcm4: Master Volume (OSS: vol): 0/0dB
pcm4:    +- ctl  3 (nid   7 in ):    mute
pcm4: 
pcm4: PCM Volume (OSS: pcm): 0/0dB
pcm4:    +- ctl  3 (nid   7 in ):    mute
pcm4: 
pcm4: Mixer "vol":
pcm4: Mixer "pcm":
pcm4: Soft PCM mixer ENABLED
pcm4: Playback channel set is: Front Left, Front Right, 
pcm4: Playback channel matrix is: 2.0 (connected)

This is a desktop with HDMI out connected to an LG monitor and from the monitor I connected the audio pin to speakers. It's a Intel DH67CL mainboard with Core i3-2120 processor.
Code:
:~% cat /dev/sndstat     
Installed devices:
pcm0: <Realtek ALC892 (Rear Analog 5.1/2.0)> (play/rec)
pcm1: <Realtek ALC892 (Front Analog)> (play/rec)
pcm2: <Realtek ALC892 (Rear Digital)> (play)
pcm3: <Realtek ALC892 (Rear Digital)> (play)
pcm4: <Intel Cougar Point (HDMI/DP 8ch)> (play) default
No devices installed from userspace.
Please find the dmesg (verbose) attached.
When I tried to play video or audio with VLC, the video plays, but no audio option despite trying various audio options listed in VLC. In Totem, even mp4 video is not playing.

Code:
:~% doas pciconf -lvv 
hdac0@pci0:0:27:0:    class=0x040300 rev=0x05 hdr=0x00 vendor=0x8086 device=0x1c20 subvendor=0x8086 subdevice=0x2003
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
vgapci0@pci0:0:2:0:    class=0x030000 rev=0x09 hdr=0x00 vendor=0x8086 device=0x0102 subvendor=0x8086 subdevice=0x2003
    vendor     = 'Intel Corporation'
    device     = '2nd Generation Core Processor Family Integrated Graphics Controller'
    class      = display
    subclass   = VGA
Code:
:~%  cat /boot/loader.conf         
autoboot_delay="1"
boot_verbose="1"
fuse_load="YES"
kern.vty="vt"
hw.vga.textmode="1"
#kern.vt.fb.default_mode="1920x1080"
rootdev="disk1p2" 
currdev="disk1p2"
coretemp_load="YES"
cpu_microcode_load="YES"
cpu_microcode_name="/boot/firmware/intel-ucode.bin"
sysctlinfo_load="YES"
sysctlbyname_improved_load="YES"
if_run_load="YES"
runfw_load="YES"
snd_hda_load="YES"
mixer_enable="YES"
sound_load="YES"
#compat.linuxkpi.i915_disable_power_well="0"

Where to start troubleshooting? Is it pulseaudio & OSS which one to enable for Gnome desktop to get it working? any /boot/device.hints for the Intel HD Audio to be added?
 

Attachments

  • dmesg-verbose.txt
    59.6 KB · Views: 129
Pulseaudio has default output set:
Code:
### Make some devices default
set-default-sink output 4
set-default-source input 0
When I play an mp3 with VLC, following lines shown in the terminal (launched VLC from terminal):
Code:
[0000000800c2ab60] oss audio output error: cannot write samples: Invalid argument
[0000000800c2ab60] oss audio output error: cannot write samples: Invalid argument
[0000000800c2ab60] oss audio output error: cannot write samples: Invalid argument
[0000000800c2ab60] oss audio output error: cannot write samples: Invalid argument
[0000000800c2ab60] oss audio output error: cannot write samples: Invalid argument
[0000000800c2ab60] oss audio output error: cannot write samples: Invalid argument
[0000000800c2ab60] oss audio output error: ^Cor: cannot write samples: Invalid argument
[0000000800c2ab60] oss audio output error: cannot write samples: Invalid argument
[0000000800c2ab60] oss audio output error: cannot write samples: Invalid argument
<..snipped..>
I ran sysctl dev.hdaa
and the output is attached here:
 

Attachments

  • sysctl-hdaa.txt
    19.9 KB · Views: 142
Is there something to tweak in /etc/device.hints to get sound working? I am at wits end about what to do next.

EDIT: Added the verbose output of an Ubuntu Linux OS boot.
 

Attachments

  • dmesg-verbose.txt
    60.1 KB · Views: 141
I have solved this with this hint in /boot/device.hints
Code:
hint.hdac.0.msi="0"
(and polling=1 in sysctl.conf)
It did not work.

I booted a ghostbsd live usb to check if audio will work. It has sound working fine. I'm sure that the audio device is pcm4. livecd kernel: pcm4: <Intel Cougar Point (HDMI/DP 8ch)> at nid 7 on hdaa1 and same is shown in FreeBSD 13.0 as well - pcm4: <Intel Cougar Point (HDMI/DP 8ch)> at nid 7 on hdaa1

From dmesg of FreeBSD 13 install:
Code:
hdacc1: <Intel Cougar Point HDA CODEC> at cad 3 on hdac0
hdaa1: <Intel Cougar Point Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x80862805
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 58560010 1  0  Digital-out   None  Digital 0x18       Unknown 0
hdaa1:  6 58560020 2  0  Digital-out   None  Digital 0x18       Unknown 0
hdaa1:  7 18560030 3  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1: Patched pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 58560010 1  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1:  6 58560020 2  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1:  7 18560030 3  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1: 1 associations found:
hdaa1: Association 0 (3) out:
hdaa1:  Pin nid=7 seq=0
hdaa1: Tracing association 0 (3)
hdaa1:  Pin 7 traced to DAC 4
hdaa1: Association 0 (3) trace succeeded
hdaa1: Looking for additional DAC for association 0 (3)
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1: Tracing beeper
hdaa1: Pin sense: nid=7 sense=0xc0000000 (connected)
hdaa1: Pin sense: nid=7 sense=0xc0000000 (connected, ELD valid)
hdaa1: ELD nid=7: ELD_Ver=2 Baseline_ELD_Len=20
hdaa1: ELD nid=7: CEA_EDID_Ver=3 MNL=1
hdaa1: ELD nid=7: SAD_Count=1 Conn_Type=0 S_AI=0 HDCP=1
hdaa1: ELD nid=7: Aud_Synch_Delay=0ms
hdaa1: ELD nid=7: Channels=0x1<FLR>
hdaa1: ELD nid=7: Port_ID=0x0000000000000000
hdaa1: ELD nid=7: Manufacturer_Name=0x0000
hdaa1: ELD nid=7: Product_Code=0x0000
hdaa1: ELD nid=7: Monitor_Name_String=''
hdaa1: ELD nid=7: LPCM 2ch freqs=0x7<48,44,32> sizes=0x1<16>
unknown: Playback channel set is: Front Left, Front Right,
unknown: Playback channel matrix is: 2.0 (connected)
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm4: <Intel Cougar Point (HDMI/DP 8ch)> at nid 7 on hdaa1
pcm4: Playback:
pcm4:      Stream cap: 0x00000005 AC3 PCM
pcm4:         PCM cap: 0x001e07f0 16 20 24 32 bits, 32 44 48 88 96 176 192 KHz
pcm4:             DAC: 4
pcm4:
pcm4:     nid=7 [pin: Digital-out (Jack)]
pcm4:       + <- nid=4 [audio output] [src: pcm]
pcm4:
pcm4: Master Volume (OSS: vol): 0/0dB
pcm4:    +- ctl  3 (nid   7 in ):    mute
pcm4:
pcm4: PCM Volume (OSS: pcm): 0/0dB
pcm4:    +- ctl  3 (nid   7 in ):    mute
pcm4:
pcm4: Mixer "vol":
pcm4: Mixer "pcm":
pcm4: Soft PCM mixer ENABLED
pcm4: Playback channel set is: Front Left, Front Right,
pcm4: Playback channel matrix is: 2.0 (connected)
 
I ran out of ideas. So, I did the last thing, assuming my installation may be corrupted - I uninstalled all the software minus the base system. I have to reinstall Gnome desktop. Before that, I'm seriously considering whether to go for a proper reinstall formatting the root partition and retaining /usr/home partition. I have few customised files in /etc.
 
… wits end …

… FreeBSD-13.0 …

Which version, exactly?

freebsd-version -kru

uname -aKU

… ghostbsd live usb to check if audio will work. It has sound working fine. …

GhostBSD use of stable/13 <https://cgit.freebsd.org/src/?h=stable/13> places it some way ahead of updated 13.0-RELEASE <https://cgit.freebsd.org/src/log/?h=releng/13.0>.

If you like, compare with NomadBSD, which was based on 13.0-RELEASE <https://nomadbsd.org/#130R-20210508>.
 
compare with NomadBSD, which was based on 13.0-RELEASE
Sound works fine with NomadBSD. Only thing I had to do was to set default sound device by invoking #sysctl hw.snd.default_unit=4.

Below, screenshot from NomadBSD live session:
Code:
FreeBSD NomadBSD 13.0-RELEASE FreeBSD 13.0-RELEASE #0: Tue May  4 21:43:29 UTC 2021     root@NomadBSD:/usr/obj/usr/src/amd64.amd64/sys/NOMADBSD  amd64 1300139 1300139
13.0-RELEASE
nomadbsd.png


I haven't reinstalled Gnome-41 desktop yet.
 
Sound works fine with NomadBSD. Only thing I had to do was to set default sound device by invoking #sysctl hw.snd.default_unit=4.
Mount one or the other on a running system (NomadBSD <- on -> FreeBSD 13.0), and compare on both systems:

- /boot/loader.conf
- /boot/device.hints
- /etc/sysctl.conf
 
Try once :
Code:
cat /dev/random > /dev/dspX.Y
I did a doas pkg upgrade -f after removing most of the Gnome/GTK libs and related packages. And, now, cat /dev/random > /dev/dsp4.0 results in noise. Also, unlike before, there is only /dev/dsp4.0 available. Before, it was /dev/dsp4.1/2/3/4 etc existing.
Now, mpg123 is playing audio. So, audio is working fine, but not sure if this will sustain after installing Gnome-41. Do I need to check any pulseaudio settings? I have below lines in /usr/local/etc/pulse/default.pa
Code:
set-default-sink  4
set-default-source  0

Also, /boot/device.hints containing:
Code:
hint.hdac.0.msi="0"
hint.hdaa.1.nid7.config="as=1 seq=0"
^ I'm not sure about this device.hints I wrote assuming the default sound output device. The dmesg sound relavant parts are posted in #7 .

Gentle bump:
If it is the nomadBSD live USB version, it was:
Code:
FreeBSD NomadBSD 13.0-RELEASE FreeBSD 13.0-RELEASE #0: Tue May  4 21:43:29 UTC 2021     root@NomadBSD:/usr/obj/usr/src/amd64.amd64/sys/NOMADBSD  amd64 1300139 1300139
13.0-RELEASE

For the installed FreeBSD 13.0, the results are as below:
Code:
#uname -aKU
FreeBSD fbsd.mypc.home 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64 1300139 1300139

#freebsd-version -kru
13.0-RELEASE-p4
13.0-RELEASE-p4
13.0-RELEASE-p5
 
UPDATE: I have installed Gnome-41 along with most of the packages. Now, there is no sound. Pulseaudio daemon seems not starting.
 
The best is to not trying to use pulseaudio at all.

Open /usr/local/etc/pulse/client.conf and uncomment the line with
Code:
autospawn=yes
and set it to no.

Then relog, restart or pulseaudio -k and then it should now no longer appear.
 
Then relog, restart or pulseaudio -k and then it should now no longer appear.
pulseaudio is disabled. But, pulseaudio -k shows below errors:
Code:
:~% pulseaudio -k
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
E: [(null)] main.c: Failed to kill daemon: No such process

$HOME directory permissions are all fine. But, the main thing is, despite disabling pulseaudio, audio stopped working after installing Gnome-41!

Code:
:~% pulseaudio -D           
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
E: [(null)] main.c: Daemon startup failed.
 
After installing Gnome-41, no sound and there are a lot of /dev/dsp4.x created. Pulseaudio is not running. Still, no sound.
Code:
:~% cat /dev/dsp
dsp0.0%  dsp1.1%  dsp1.3%  dsp1.5%  dsp2.1%  dsp2.3%  dsp2.5%  dsp3.1%  dsp3.3%  dsp3.5%  dsp4.1%  dsp4.3%  dsp4.5%  dsp4.7%  dsp4.9%
dsp1.0%  dsp1.2%  dsp1.4%  dsp2.0%  dsp2.2%  dsp2.4%  dsp3.0%  dsp3.2%  dsp3.4%  dsp4.0%  dsp4.2%  dsp4.4%  dsp4.6%  dsp4.8%


Code:
:~% mpg123 Music/Mile\ Jo\ Tere\ Naina.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
    version 1.29.2; written and copyright by Michael Hipp and others
    free software (LGPL) without any warranty but with best wishes

Directory: Music/

Terminal control enabled, press 'h' for listing of keys and functions.

Playing MPEG stream 1 of 1: Mile Jo Tere Naina.mp3 ...

MPEG 1.0 L III vbr 44100 j-s

[src/libout123/libout123.c:out123_play():736] error: Error in writing audio, wrote only -1 of 4608 (Invalid argument?)!
main: [src/mpg123.c:play_frame():876] error: Deep trouble! Cannot flush to my output anymore!
 
If you (revert) allow PulseAudio to automatically spawn, log out, log in then use GTK-Mixer a.k.a. Audio Mixer audio/gtk-mixer to set a default output before running an audio application to begin playback: is playback audible?
 
If you build from ports you can also De-Lennart using,
make.conf:
Code:
OPTIONS_UNSET+=PULSE
OPTIONS_UNSET+=PULSEAUDIO
OPTIONS_SET+=SNDIO
 
If you build from ports you can also De-Lennart using,
make.conf:
Code:
OPTIONS_UNSET+=PULSE
OPTIONS_UNSET+=PULSEAUDIO
OPTIONS_SET+=SNDIO
I have an old PC which is almost 10 years old with intel core i3 2120, 12GB DDR3 and a 180GB SSD+1 TB HDD. Prefer packages.

Will post the results after enabling pulseaudio again.
 
If you (revert) allow PulseAudio to automatically spawn, log out, log in then use GTK-Mixer a.k.a. Audio Mixer audio/gtk-mixer to set a default output before running an audio application to begin playback: is playback audible?
Unfortunately, No. I think to get audio working in Gnome-41 is really troublesome. As we can see, audio was working perfectly when I purged out this Gnome & related GTK libs from the system. gtk-mixer also has PCM and volume unmuted and is showing OSS.

gtk-mixer.png

Code:
:~% cat /dev/random > /dev/dsp4.0
zsh: device busy: /dev/dsp4.0
:~% doas cat /dev/random > /dev/dsp4.0
zsh: device busy: /dev/dsp4.0
:~% cat /dev/random > /dev/dsp4.1
cat: stdout: Invalid argument
:~% cat /dev/random > /dev/dsp4.3
zsh: device busy: /dev/dsp4.3
:~% cat /dev/random > /dev/dsp4.2
zsh: device busy: /dev/dsp4.2
:~% cat /dev/random > /dev/dsp4.4
zsh: device busy: /dev/dsp4.4
Code:
:~% pulseaudio --check                               
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
Seems like pulseaudio is not supported?

grahamperrin
Gnome since I tried for the first time has sometimes applications looks fuzzy with pixelated VLC or Nautilus. This is the case since 12.0 (when I re-started using FreeBSD after a long gap). It does not happen all the times. I am feeling like Gnome is not so keen on FreeBSD integration?
This is one warning message I saw in FreeBSD always:
Code:
Failed to add WC MTRR for [0xe0000000-0xefffffff]: -22; performance may suffer

Wondering what is an alternate to Gnome desktop in FreeBSD?
please no flamewars
Just looking for a clean interface without too many options to tweak & tune. And, if the WM supports Wayland too?
 
I have a few mixers on my PC. You could try,
pkg info |grep -i mixer
Code:
asmixer-0.5_3                  Mixer control for AfterStep window manager
dsbmixer-1.7_1                 Tabbed Qt mixer for FreeBSD
fossmixer-0.0.3_2              Graphical mixer application for OSS
gtk-mixer-1.0.0                GTK based volume control tool
gtmixer-1.0.2_2                GTK2.0 Sound Mixer
libmatemixer-1.24.1            Mixer library for MATE desktop
mixer-1.0                      Startup/shutdown script to preserve mixer settings across reboots
mixer.app-1.8.0_2              Another mixer intended for the windowmaker dockapp
mixertui-1.4.2_2               Audio Mixer with a Terminal User Interface
ncpamixer-1.3.3.1_1            Ncurses PulseAudio mixer
p5-Audio-Mixer-0.7_3           Perl extension for Sound Mixer control
pamixer-1.4.15                 Pulseaudio command line mixer
pc-mixer-20171212_4            QT5 based audio mixer for FreeBSD
sdl_mixer-1.2.12_12            Sample multi-channel audio mixer library
wmsmixer-0.5.1_1               Audio mixer for the Window Maker dock
xmixer-0.9.4_8                 Audio mixer (gtk and Xlib) for X11R6
 
Already has mixertui, gtk-mixer, fossmixer installed, tried. :( Since pulseaudio daemon is not running, I assume that Gnome will not have audio working. Even weird, video also not working. Shutdown radio button in Gnome will restart my PC after shutting down.
 
Back
Top