[ThinkPad X230] No sound on headphones

Hi there,

I'm running FreeBSD 9.2-RELEASE on a ThinkPad X230. Sound works so far, but I can't hear anything on headphones.

dmesg -a:
Code:
hdacc0: <Realtek ALC269 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC269 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC269 (Analog)> at nid 20 and 24 on hdaa0
pcm1: <Realtek ALC269 (Analog)> at nid 21 and 18 on hdaa0
hdacc1: <Intel Panther Point HDA CODEC> at cad 3 on hdac0
hdaa1: <Intel Panther Point Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel Panther Point (HDMI/DP 8ch)> at nid 5 on hdaa1
pcm3: <Intel Panther Point (HDMI/DP 8ch)> at nid 6 on hdaa1
pcm4: <Intel Panther Point (HDMI/DP 8ch)> at nid 7 on hdaa1

Advice, anyone?
 
No problem.

Code:
> cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <Realtek ALC269 (Analog)> (play/rec) default
pcm1: <Realtek ALC269 (Analog)> (play/rec)
pcm2: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm3: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm4: <Intel Panther Point (HDMI/DP 8ch)> (play)

BTW: I can switch to headphones when I set sysctl hw.snd.default_unit=1. Is it possible to do so automatically?
 
As I thought, the default output is
Code:
pcm0
so, execute this sysctl hw.snd.default_unit=1 and see if it works.
 
Well, you can execute that command every time you want to listen through the headphones or simply make it default by adding

Code:
hw.snd.default_unit=1
to the file etc/sysctl.conf.
 
But then headphone output is the default. Doesn't the system detect whether headphones are plugged in or not?
 
I had the same problems with my X220 and my friend's T530. Things are a little more complicated because Lenovo switched to one jack for both external microphone and speakers (headphones).

I thought this was fixed later in 9-STABLE, but I still have the following in /boot/loader.conf, which might work for you.
Code:
# Out : speaker + headphones
hint.hdac.0.cad0.nid25.config="as=1 seq=15"
# In : mic + external mic
hint.hdac.0.cad0.nid35.config="as=2"
hint.hdac.0.cad0.nid27.config="as=2 seq=15"

I also have the following in /etc/sysctl.conf
Code:
hw.snd.default_auto=1
hw.snd.default_unit=0
 
jrm said:
I had the same problems with my X220 and my friend's T530. Things are a little more complicated because Lenovo switched to one jack for both external mic and speakers (headphones).
Unfortunately, it doesn't work either. I still have to switch manually.
 
Well, it is automatic for me. I had an opposite problem once (speakers not working, sound only via headphones). Then I found some thread by accident on this forum (I don't remember which one) which required adding something to /boot/device.hints. From the looks of the file I think it was
Code:
hint.hdac.0.cad0.nid31.config="as=2 seq=0 device=Speaker"
hint.hdac.0.cad0.nid25.config="as=2 seq=15 device=Headphones"
 
After some confusion concerning the right settings for nid, as, and seq, as stated in snd_hda(), I've found the correct hints:
Code:
hint.hdaa.0.nid20.config="as=1 seq=0 device=Speaker"
hint.hdaa.0.nid21.config="as=1 seq=15 device=Headphones"

Thank you all for helping me.
 
sickboy said:
After some confusion concerning the right settings for nid, as, and seq, as stated in snd_hda(), I've found the correct hints:
Code:
hint.hdaa.0.nid20.config="as=1 seq=0 device=Speaker"
hint.hdaa.0.nid21.config="as=1 seq=15 device=Headphones"

Thank you all for helping me.

Thanks to you @sickboy. This works in my Samsung ATIV BOOK 2 model NP270E5E-K02IT too.
 
Last edited by a moderator:
Back
Top