Solved Sound card

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

Troubleshooting setting up the soundcard, and I have tried every pcm device to output the audio to. I still cannot get sound working through the hdmi to my tv monitor. What other options do I have to adjust the sound settings other than sysctl and mixer?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,298
Messages: 38,811

Can you post the output from cat /dev/sndstat please? We need to see what's being detected.

I still cannot get sound working through the hdmi to my tv monitor.
What graphics card do you have? The sound is integrated on it, so we need know what you have.
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

Can you post the output from cat /dev/sndstat please? We need to see what's being detected.


What graphics card do you have? The sound is integrated on it, so we need know what you have.
Code:
$  cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play)
pcm2: <Realtek ALC662 (Analog 2.0+HP/2.0)> (play/rec)
pcm3: <Realtek ALC662 (Rear Digital)> (play) default
No devices installed from userspace.
Not sure what graphics card I have. how do I tell?
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

I can tell from the sndstat output it's an NVidia card. You can find the exact model by looking at the output from pciconf -lv. Did you install the x11/nvidia-driver?

I just installed it. I issued that command as well and it seems I found the sound card. what do I do now that I have the model?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,298
Messages: 38,811

No, that soundcard you found is the one that's integrated on your mainboard (Realtek ALC622). The sound "card" for HDMI is integrated on the videocard. So look for the Nvidia videocard model.
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

I found it
Code:
hdac0@pci0:1:0:1:    class=0x040300 card=0x0915196e chip=0x0e0810de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'GF119 HDMI Audio Controller'
    class      = multimedia
    subclass   = HDA
 

Jaekelsson

New Member

Reaction score: 6
Messages: 14

Hi,

On my FreeBSD desktop computer with GF119 hardware, i had to install nvidia-driver-390 and sound works well with HDMI monitor.

I do that to find right device after installing 390 driver :
Code:
cat /dev/sndstat (search for NVIDIA...)
pcm0: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play)
sysctl hw.snd.default_unit=0
try sound = NO SOUND
sysctl hw.snd.default_unit=1
try sound = OK

put hw.snd.default_unit=1 in /etc/sysctl.conf.
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

Hi,

On my FreeBSD desktop computer with GF119 hardware, i had to install nvidia-driver-390 and sound works well with HDMI monitor.

I do that to find right device after installing 390 driver :
Code:
cat /dev/sndstat (search for NVIDIA...)
pcm0: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play)
sysctl hw.snd.default_unit=0
try sound = NO SOUND
sysctl hw.snd.default_unit=1
try sound = OK

put hw.snd.default_unit=1 in /etc/sysctl.conf.

I tried that and I'm still not getting sound from my sound bar on the tv monitor through hdmi. I heard there's a more in-depth fix for this problem. Do you know of any other solutions?
 

T-Daemon

Daemon

Reaction score: 876
Messages: 1,750

I assume you have carried out what the NVIDIA package has displayed after the installation in the message, if not execute pkg info -D nvidia-driver-390.

kldstat | grep nvidia should return:
Code:
... nvidia-modeset.ko
... nvidia.ko

and in /usr/local/etc/X11/xorg.conf.d/nvidia.conf should be set:
Code:
Section "Device"
    Identifier "Card0"
    Driver     "nvidia"
EndSection
Note: The NVIDIA driver provides only in xorg sound, not in the console.

I tried that and I'm still not getting sound from my sound bar on the tv monitor through hdmi.

Is this a seperate bar? And have you checked if the TV's (bar's) volume is up? The cabeling in order? Run mixer to display the volume values. Test the card in xorg from a terminal: cat /COPYRIGHT > /dev/dsp (a short white noise should be heard, try multiple times). Make sure the volume of the TV and mixer is up. Try setting for pcm0 and pcm1 hw.snd.default_unit again.
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

I assume you have carried out what the NVIDIA package has displayed after the installation in the message, if not execute pkg info -D nvidia-driver-390.

kldstat | grep nvidia should return:
Code:
... nvidia-modeset.ko
... nvidia.ko

and in /usr/local/etc/X11/xorg.conf.d/nvidia.conf should be set:
Code:
Section "Device"
    Identifier "Card0"
    Driver     "nvidia"
EndSection
Note: The NVIDIA driver provides only in xorg sound, not in the console.



Is this a seperate bar? And have you checked if the TV's (bar's) volume is up? The cabeling in order? Run mixer to display the volume values. Test the card in xorg from a terminal: cat /COPYRIGHT > /dev/dsp (a short white noise should be heard, try multiple times). Make sure the volume of the TV and mixer is up. Try setting for pcm0 and pcm1 hw.snd.default_unit again.
I assume you have carried out what the NVIDIA package has displayed after the installation in the message, if not execute pkg info -D nvidia-driver-390.

kldstat | grep nvidia should return:
Code:
... nvidia-modeset.ko
... nvidia.ko

and in /usr/local/etc/X11/xorg.conf.d/nvidia.conf should be set:
Code:
Section "Device"
    Identifier "Card0"
    Driver     "nvidia"
EndSection
Note: The NVIDIA driver provides only in xorg sound, not in the console.



Is this a seperate bar? And have you checked if the TV's (bar's) volume is up? The cabeling in order? Run mixer to display the volume values. Test the card in xorg from a terminal: cat /COPYRIGHT > /dev/dsp (a short white noise should be heard, try multiple times). Make sure the volume of the TV and mixer is up. Try setting for pcm0 and pcm1 hw.snd.default_unit again.

My volume is up on the tv and mixer. I did kldstat and 1 nvidia came up. I've tried every pcm number too and no luck. The bar is part of the tv. Not separate.
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

My volume is up on the tv and mixer. I did kldstat and 1 nvidia came up. I've tried every pcm number too and no luck. The bar is part of the tv. Not separate.

Also, the cat command returns with no such file or directory.
 

T-Daemon

Daemon

Reaction score: 876
Messages: 1,750

If you have set in /boot/loader.conf anything nvidia related delete it. Set in /etc/rc.conf:
Code:
kld_list="nvidia-modeset"
Reboot, try testing the card in xorg with cat(1) and sysctl(8) hw.snd.default_unit.

I assume you have a /usr/local/etc/X11/xorg.conf.d/nvidia.conf (or similar) file with Driver "nvidia" set, haven't you?
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

If you have set in /boot/loader.conf anything nvidia related delete it. Set in /etc/rc.conf:
Code:
kld_list="nvidia-modeset"
Reboot, try testing the card in xorg with cat(1) and sysctl(8) hw.snd.default_unit.

I assume you have a /usr/local/etc/X11/xorg.conf.d/nvidia.conf (or similar) file with Driver "nvidia" set, haven't you?

I have that file. I created it as you said. But I deleted it because once I create that file the xdm no longer works and I cannot startx to xorg.
 

Jaekelsson

New Member

Reaction score: 6
Messages: 14

To make 390 Nvidia work on FreeBSD you need also :
Code:
linux_enable="YES"
in your /etc/rc.conf

to install 390 driver the right way you also need to do :
Code:
kldload linux
kldload linux64
pkg install nvidia-driver-390

in /usr/local/etc/X11/xorg.conf.d
I have this file: 20-nvidia.conf
Code:
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    Option         "NoLogo" "true"
EndSection
in /etc/rc.conf
Code:
kld_list="nvidia-modeset"
then
pkg install nvidia-settings
to have Nvidia tool to test every thing is fine.

Maybe you should try to plug computer directly on TV without sound bar to start.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,298
Messages: 38,811

No, the Linux emulation isn't required for the driver to work.
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

To make 390 Nvidia work on FreeBSD you need also :
Code:
linux_enable="YES"
in your /etc/rc.conf

to install 390 driver the right way you also need to do :
Code:
kldload linux
kldload linux64
pkg install nvidia-driver-390

in /usr/local/etc/X11/xorg.conf.d
I have this file: 20-nvidia.conf
Code:
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    Option         "NoLogo" "true"
EndSection
in /etc/rc.conf
Code:
kld_list="nvidia-modeset"
then
pkg install nvidia-settings
to have Nvidia tool to test every thing is fine.

Maybe you should try to plug computer directly on TV without sound bar to start.

I installed the driver and settings and see a difference in the graphics. Still no sound though. My tv's sound bar is attached to the tv.
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

ls -al /COPYRIGHT =
root@machine17:~ # ls -al /COPYRIGHT
ls: /COPYRIGHT: No such file or directory

ls -al /dev/dsp =
root@machine17:~ # ls -al /dev/dsp
crw-rw-rw- 1 root wheel 0x9a Jun 27 19:55 /dev/dsp

kldstat | grep nvidia =
root@machine17:~ # kldstat | grep nvidia
7 1 0xffffffff83224000 e65f8 nvidia-modeset.ko
8 1 0xffffffff8330b000 c9f530 nvidia.ko


I test the sound through youtube
 

T-Daemon

Daemon

Reaction score: 876
Messages: 1,750

I test the sound through youtube
That might not be a reliable source. Which browser are you using? Try the test with a file again: Take any file in the users directory, cat that_file > /dev/dsp. Make sure the speaker settings on the TV are correct set (TV Speaker, not external), the TV's and mixers volume is up, and try setting for pcm0 and pcm1 sysctl hw.snd.default_unit=0 (or 1) .

I'm running x11/nvidia-driver-390 on a GeForce GT 630. For HDMI sound and video all it takes are the kernel modules and xorg driver setting. The sound on Youtube with www/firefox works fine (on 12.1-RELEASE).
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

Im using firefox

$ cat .xinitrc > /dev/dsp
$

It just executes to the next line.
Ive changed the tv settings to everything I can think of.
 
OP
F

Fbsdnew

Active Member

Reaction score: 5
Messages: 134

That might not be a reliable source. Which browser are you using? Try the test with a file again: Take any file in the users directory, cat that_file > /dev/dsp. Make sure the speaker settings on the TV are correct set (TV Speaker, not external), the TV's and mixers volume is up, and try setting for pcm0 and pcm1 sysctl hw.snd.default_unit=0 (or 1) .

I'm running x11/nvidia-driver-390 on a GeForce GT 630. For HDMI sound and video all it takes are the kernel modules and xorg driver setting. The sound on Youtube with www/firefox works fine (on 12.1-RELEASE).

Nevermind I got it working on youtube:) thanks for the help. Im not sure what ended up being the problem but it may have been that I didnt have the correct pcm digital output setting set on the tv or maybe because that along with not having the driver installed and configured. How did you know that I needed to load the 390 model nvidia driver though?
 

fort77

New Member

Reaction score: 1
Messages: 9

I tried that and I'm still not getting sound from my sound bar on the tv monitor through hdmi. I heard there's a more in-depth fix for this problem. Do you know of any other solutions?
after setting "sysctl hw.snd.default_unit=1" try running "cat /dev/sndstat" once more and see if "default" is now at pcm0 or pcm1. If that is the case, restart your music player and check if sound works. Try for both "_unit=0" and "_unit=1".
 
Top