Solved No sound from front jack

Hi, when I'm plugin my headphone in computer's jack-port, there is no sound at all(
What should I do to get sound working from somewhere?

Code:
root@ihor:/usr/ # dmesg | grep pcm
pcm0: <NVIDIA (0x0072) (HDMI/DP 8ch)> at nid 4 on hdaa0
pcm1: <NVIDIA (0x0072) (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm2: <NVIDIA (0x0072) (HDMI/DP 8ch)> at nid 6 on hdaa0
pcm3: <NVIDIA (0x0072) (HDMI/DP 8ch)> at nid 7 on hdaa0
pcm4: <Realtek ALC262 (Analog)> at nid 21 and 24,25,26 on hdaa1
pcm5: <Realtek ALC262 (Front Analog Headphones)> at nid 27 on hdaa1
root@ihor:/usr/ # kldload snd_hda
kldload: can't load snd_hda: module already loaded or in kernel
root@ihor:/usr/ports/devel/jetbrains-phpstorm #
 
Post the output of cat /dev/sndstat.
Code:
root@ihor:/usr/ #  cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0072) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0072) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0072) (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA (0x0072) (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC262 (Analog)> (play/rec) default
pcm5: <Realtek ALC262 (Front Analog Headphones)> (play)
No devices installed from userspace.
root@ihor:/usr/ #
 
GTK-Mixer, also known as Audio Mixer

audio/gtk-mixer

In the screenshot below, I use the Sound card menu of the Audio Mixer window to change from device 1 (default) to device 4:

1644634962791.png

In your case, you might change to device 5 for Front Analog Headphones.

Command line

As root:

sysctl hw.snd.default_unit=5

In any case

Order is important, please see <https://forums.freebsd.org/posts/555990>.
 
I had the same problem the audio jack was totally insensitive...

I found a solution here:


This worked for me:

Code:
/boot/loader.conf
mixer_enable="YES"

Code:
/boot/device.hints
hint.hdaa.1.nid20.config="as=1 seq=0"
hint.hdaa.1.nid27.config="as=1 seq=15"

I am totally new to FreeBSD but it looks there are a lot of hidden knobs to fine tuning the OS that aren't in the main documentation... 🤔
 
ihor@ihor:~ % sysctl hw.snd.default_unit
hw.snd.default_unit: 4
Enter this from root command prompt: sysctl hw.snd.default_unit=5

Or put this line in /etc/sysctl.conf to keep the change after reboot:
Code:
hw.snd.default_unit=5

This should make your headphones function as the default sound device.
 
/boot/loader.conf
mixer_enable="YES"
This should be useless, the mixer being enabled by default. Do you really need it?

I am totally new to FreeBSD but it looks there are a lot of hidden knobs to fine tuning the OS that aren't in the main documentation...
There's extensive documentation in snd_hda(4) but it's true you have to guess where to look for this.

By the way, the handbook section at https://docs.freebsd.org/en/books/handbook/multimedia/#sound-setup deserves an update, it suggests enabling snd_hda manually while it is loaded automatically nowadays.
 
When I addressed this issue the forum was down... I really do not understand what I did... 😅

The point was this:
  1. using the setup suggested by the Handbook made working only the internal speakers, plugging the headphones did not make any effect.
  2. Switching manually the default sound devices produced basically sound of both speakers and headphones or not sound at all.
On the internet I found that very old documentation (and I am glad that in FreeBSD the pace is not so revolutionary as in Linux); I tried to figure out how it would work but what I tried didn't work at all, eventually I simply copied and pasted, 🤞, and it worked.

Now when I plug the audio jack the laptop speakers switch automagically to the headset and if I unplug the latter the audio comes back to the speakers.

I would like these tasks belonging to the OS and not to myself, I am not enough expert or able to deal with this stuff... 🤷‍♂️
 
Today, after defaulting to a USB headset, I found it possible to unplug the headset, there was automated reversion to my previous default:

Code:
% cat /dev/sndstat
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play)
pcm1: <IDT 92HD81B1X (Analog 2.0+HP/2.0)> (play/rec) default
pcm2: <IDT 92HD81B1X (Analog)> (play/rec)
pcm3: <USB audio> (rec)
No devices installed from userspace.
%

Has USB hot plug/unplug improved in recent months, in CURRENT?
 
Last edited:
Enter this from root command prompt: sysctl hw.snd.default_unit=5

Or put this line in /etc/sysctl.conf to keep the change after reboot:
Code:
hw.snd.default_unit=5

This should make your headphones function as the default sound device.
Thanks, that helped a lot.
 
Back
Top