No sound on Hdmi with Nvidia GT218 [ION]

I am running a FreeBSD 13.1-RELEASE-p5 amd64
installed nvidia-driver-340 and drm-kmod.
The following modules loaded
nvidia.ko
snd_driver.ko
pulse and mixer installed
No sound at all.
I have devices
Code:
cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC662 rev1 (Rear Analog)> (play/rec)
pcm1: <Realtek ALC662 rev1 (Rear Digital)> (play)
pcm2: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm4: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm5: <NVIDIA GT21x (HDMI/DP 8ch)> (play) default
Tried defaulting pcm 1-5. No change.

What could be the problem?
 
i removed drm-mod and drm-510-kmod removed my xorg server
and application there is no sound at all not even the headphone produce anything.
I have pulseaudio pavucontrol alsa-utils installed.
The following device works on linux
sysctl hw.snd.default_unit=2

Dont know what else could be the problem?
 
Ok so the /dev/dsp0.0 is the headphone with the jack
that works. Question is then why the hdmi which supposed to be
the dsp2.2 is silent?
 
I suspect pulseaudio isn't configured. Do you get sound if you use the standard audio of FreeBSD?
 
you are right i guess i need to configure pulseaudio
first for the Realtek ALC662 sound card first.
 
Forget pulseaudio for a minute, how are you testing the audio? What application did you use?
 
I used audacious to play sample mp3 file
Its is very strange i cheched in linux and the hdmi audio device says
that it is intel iec958.
 
Code:
$ mplayer -ao oss:/dev/dsp0 /home/nandi/Downloads/deep\ tech.mp3
Creating config file: /home/nandi/.mplayer/config
MPlayer SVN-r38404-snapshot-13.0.0 (C) 2000-2022 MPlayer Team

Playing /home/nandi/Downloads/deep tech.mp3.
libavformat version 58.76.100 (external)
Audio only file format detected.
Load subtitles in /home/nandi/Downloads/
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 58.134.100 (external)
AUDIO: 44100 Hz, 2 ch, floatle, 256.0 kbit/9.07% (ratio: 32000->352800)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
==========================================================================
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:  33.8 (33.8) of 237.0 (03:57.0)  1.1%
yes it played nicely on the headphones
 
I have here devices called dsp0.0 dsp1.0 dsp2.0 dsp3.0 dsp4 dsp5
tried to make them output but no sound. I even tried install the nvidia driver from ports if that makes a different.
 
Just to be sure: Your mixers volumes of all sound devices aren't zero (or muted)? And the monitors volume? Also note that changing the sound device won't take an effect on already running processes; So if your checking with YouTube f.e. you'll have to exit the browser and start it again, otherwise it will use the old sound device instead of the changed one.
 
Yes mixer and monitor volume unmuted and on max volume still no sound. It feels like hardware issue even the video card dont go over 1024x780. Honestly dont know what else i could try.
 
It feels like hardware issue even the video card dont go over 1024x780.
No, I suspect your Xorg simply doesn't load the NVidia driver, so it's stuck on vesa(4) or scfb(4) (check in /var/log/Xorg.0.log). But this has nothing to do with the audio outputs. That said, the GT218 is a 13 year old card and Nvidia stopped supporting the 340 driver 7 years ago.
 
This is a common issue as far as I know and a couple of threads addressing it were created, to no avail.

Here I installed i3-wm followed by xfce4 but use the latter 99% of time.

At first, it happened nearly every time. Here are the steps I follow, for superstition maybe, but it works (from time to time it happens again but after a reboot or, better, a poweroff + switch back on, it always works again):
  1. Open a terminal with a couple of tabs. Choose one to use as superuser running any of these: sudo su, su su -
  2. Type # sysctl hw.snd.default_unit=1. Do not enter, it's meant to saving time.
  3. Switch to another tab and run mpv with some video, then check the headset (or whatever you have plugged in line-out). It should be playing the audio from mpv.
  4. At another workspace, I then open pavucontrol
  5. In a third workspace, I run chrome
  6. Go back to where you're logged as superuser. Enter the command for sysctl to switch the hw.snd.default_unit from 2 to 1 (so this time after typing press Enter)
  7. You'll notice the sound is still working at the headset. Change back to where mpv is running, then close it
  8. Run again, mpv with the video file used for testing.
  9. This time, the sound will come from TV --- more precisely, from the device listed as "1".

As you and all the others, my GPU is Nvidia, an old GT710. So far, I'm not trying the proprietary driver (but I have both versions downloaded: one was recommended by Nvidia at their site, the other was suggested somewhere here in the forums, arguing the versions suggested at the site for each model to be wrong and listing another list of pairs "model,version", which is supposed to be "the right one").

Many of the aforementioned steps are clearly not needed and superstition compels me to do them. Truth is, now that HDMI sound is working, I saved the contents of # dmesg -a and /var/log/Xorg.0.log expecting to see any difference next time I had the issue.

Not even the nid numbers commonly associated to each device did change. I thought NVIDIA could be set too late during boot. After the sound for example. However, the next time audio didn't work, there were nothing of the sort, or anything different (!).

For clarification: /dev/sndstat always start the same: HDMI Devices as 0 and 1, Realtek onboard sound as device number 2, and the latter as default.

OBS: PulseAudio run as daemon automatically with x11 and/or xfce4. pavucontrol is useful to see if my mic ain't broken, but I figured out, later, it's just bogus:
  • All three outputs are listed at their tab. However, running an application with sound does not appear in "playlist" tab with the selector so to change if so desired;
  • The /dev/dsp2 always works and I keep it as default. Still, pavucontrol list it at the "output" tab with no sound activity at the indicator. Similarly, Switch to the "input" tab while wearing my headset then saying anything out loud at the mic shows signs of activity, but I discovered, recently, that neither said activity nor trying to change the volume through the slide have any effect but changes the volume %. The actual volume, however, is manageable through e.g. the mixer (I decided to check to try amd minimize a weak, random noise and figured out by chance).
  • When device number one, am HDMI device, is working and set with # sysctl, the bar at pavucontrol behaves as if there were no sound as well.

Faced with those facts, PulseAudio is maybe running, but it's as if is not and can be treated as such --- ignored. Trying to disable or mess with its config files, however, proved not to be wise,

I wonder who let Poettering touch that f... keyboard. I hate RH nearly as much as I hate Poettering for being responsible for this and --- worse --- Systemd. We're free from that at least.
Someone blamed third-party drivers, and an user even said "it's normal". As if actual magic could happen in real life. I'm a Computer Science graduate. Whatever is the cause of this problem with HDMI Audio is neither of metaphysical nature, nor should be said to be (or even thought of as) "normal". It was nothing more than a slip of tongue without any ill intention. Nevertheless, since it already happened, it's an opportunity for me to show how proper it is to think exactly the other way around.
 
Regarding my last post, forget about those "ritualistic" steps.
It happened randomly again, just reboot and try until it works.
 
# dmesg -a
output (1717 lines)
/etc/sysctl.conf
# $FreeBSD$
#
# This file is read when going to multi-user and its contents piped thru
# ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0
hw.snd.verbose=4
dev.hdaa.0.init_clear=1
dev.hdaa.1.init_clear=1
# hw.snd.compat_linux_mmap=1
hw.snd.default_unit=1
hw.usb.usbhid.enable=1
kern.randompid=1
$ pciconf -lllvV
hostb0@pci0:0:0:0: class=0x060000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x3e1f subvendor=0x8086 subdevice=0x2015
vendor = 'Intel Corporation'
device = '8th Gen Core 4-core Desktop Processor Host Bridge/DRAM Registers [Coffee Lake S]'
class = bridge
subclass = HOST-PCI
pcib1@pci0:0:1:0: class=0x060400 rev=0x07 hdr=0x01 vendor=0x8086 device=0x1901 subvendor=0x8086 subdevice=0x2015
vendor = 'Intel Corporation'
device = '6th-10th Gen Core Processor PCIe Controller (x16)'
class = bridge
subclass = PCI-PCI
none0@pci0:0:8:0: class=0x088000 rev=0x00 hdr=0x00 vendor=0x8086 device=0x1911 subvendor=0x8086 subdevice=0x2015
vendor = 'Intel Corporation'
device = 'Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model'
class = base peripheral
xhci0@pci0:0:20:0: class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa2af subvendor=0x8086 subdevice=0x7270
vendor = 'Intel Corporation'
device = '200 Series/Z370 Chipset Family USB 3.0 xHCI Controller'
class = serial bus
subclass = USB
none1@pci0:0:20:2: class=0x118000 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa2b1 subvendor=0x8086 subdevice=0x7270
vendor = 'Intel Corporation'
device = '200 Series PCH Thermal Subsystem'
class = dasp
none2@pci0:0:22:0: class=0x078000 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa2ba subvendor=0x8086 subdevice=0x1999
vendor = 'Intel Corporation'
device = '200 Series PCH CSME HECI'
class = simple comms
ahci0@pci0:0:23:0: class=0x010601 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa282 subvendor=0x8086 subdevice=0x7270
vendor = 'Intel Corporation'
device = '200 Series PCH SATA controller [AHCI mode]'
class = mass storage
subclass = SATA
pcib2@pci0:0:29:0: class=0x060400 rev=0xf0 hdr=0x01 vendor=0x8086 device=0xa29a subvendor=0x8086 subdevice=0x7270
vendor = 'Intel Corporation'
device = '200 Series PCH PCI Express Root Port'
class = bridge
subclass = PCI-PCI
isab0@pci0:0:31:0: class=0x060100 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa2cc subvendor=0x8086 subdevice=0x7270
vendor = 'Intel Corporation'
class = bridge
subclass = PCI-ISA
none3@pci0:0:31:2: class=0x058000 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa2a1 subvendor=0x8086 subdevice=0x7270
vendor = 'Intel Corporation'
device = '200 Series/Z370 Chipset Family Power Management Controller'
class = memory
hdac1@pci0:0:31:3: class=0x040300 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa2f0 subvendor=0x8086 subdevice=0x7270
vendor = 'Intel Corporation'
device = '200 Series PCH HD Audio'
class = multimedia
subclass = HDA
ichsmb0@pci0:0:31:4: class=0x0c0500 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa2a3 subvendor=0x8086 subdevice=0x7270
vendor = 'Intel Corporation'
device = '200 Series/Z370 Chipset Family SMBus Controller'
class = serial bus
subclass = SMBus
vgapci0@pci0:1:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x128b subvendor=0x10de subdevice=0x118b
vendor = 'NVIDIA Corporation'
device = 'GK208B [GeForce GT 710]'
class = display
subclass = VGA
hdac0@pci0:1:0:1: class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de device=0x0e0f subvendor=0x10de subdevice=0x118b
vendor = 'NVIDIA Corporation'
device = 'GK208 HDMI/DP Audio Controller'
class = multimedia
subclass = HDA
re0@pci0:2:0:0: class=0x020000 rev=0x15 hdr=0x00 vendor=0x10ec device=0x8168 subvendor=0x10ec subdevice=0x0123
vendor = 'Realtek Semiconductor Co., Ltd.'
device = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
class = network
subclass = ethernet
$ cat /dev/sndstat
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <NVIDIA (0x0051) (HDMI/DP 8ch)> on hdaa0 (1p:1v/0r:0v)
snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
[pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
interrupts 1005, underruns 0, feed 1005, ready 0 [b:2048/1024/2|bs:2048/1024/2]
channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:8192/1024/8]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
pcm1: <NVIDIA (0x0051) (HDMI/DP 8ch)> on hdaa0 (1p:1v/0r:0v) default
snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
[pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
interrupts 1002, underruns 0, feed 1002, ready 0 [b:2048/1024/2|bs:2048/1024/2]
channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 48000, fmt 0x08601000/0x00200010, flags 0x10000000, 0x00000063
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:65472/8184/8]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x08601000) -> feeder_format(0x08601000 -> 0x08600010) -> feeder_matrix(5.1 -> 2.0) -> feeder_volume(0x00200010) -> {hardware}
pcm2: <Realtek ALC662 rev3 (Analog 2.0+HP/2.0)> on hdaa1 (1p:1v/1r:1v)
snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
[pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
interrupts 57043, underruns 0, feed 57043, ready 0 [b:2048/1024/2|bs:2048/1024/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm2:play:dsp2.p0[pcm2:virtual:dsp2.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:8192/1024/8]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
[pcm2:record:dsp2.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
interrupts 3763, overruns 0, feed 7526, hfree 512, sfree 512 [b:512/256/2|bs:512/256/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
pcm2:record:dsp2.r0[pcm2:virtual:dsp2.vr0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, overruns 0, feed 0, hfree 0, sfree 32768 [b:0/0/0|bs:32768/256/128]
channel flags=0x10000000<VIRTUAL>
{hardware} -> feeder_root(0x00200010) -> feeder_rate(0x00200010 q:1 48000 -> 44100) -> feeder_volume(0x00200010) -> {userland}
No devices installed from userspace.

File Versions:
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
Now, I'm stuck in here.
 
Back
Top