sl/freebsd

.
Donate to FreeBSD
.

• Home

• About

• Introduction
• Features
• Advocacy
• Marketing
• Privacy Policy

• Get FreeBSD

• Release Information
• Release Engineering

• Documentation

• FAQ
• Handbook
• Porter's Handbook
• Developer's Handbook
• Manual Pages
• Documentation Project Primer
• All Books and Articles

• Community

• Mailing Lists
• Forums
• User Groups
• Events
• Q&A (external)

• Developers

• Project Ideas
• SVN Repository
• Perforce Repository

• Support

• Vendors
• Security Information
• Bug Reports
• Submit Bug-report

• Foundation

• Monetary Donations
• Hardware Donations

Log in or Sign up

The FreeBSD Forums
Forums> Base System> System Hardware>

1.
This site uses cookies.  By continuing to use this site, you are
agreeing to our use of cookies.  Learn More.

[ThinkPad X230] No sound on headphones

Discussion in' System Hardware' started by sickboy, Dec 20, 2013.

1.

sickboy New Member

Messages:
21

Thanks Received:
0

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?

sickboy, Dec 20, 2013
#1
2.

suhijo New Member

Messages:
39

Thanks Received:
1

Can you post the output of the next command please?  cat /dev/sndstat

suhijo, Dec 21, 2013
#2
3.

sickboy New Member

Messages:
21

Thanks Received:
0

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?

sickboy, Dec 21, 2013
#3
3.

suhijo New Member

Messages:
39

Thanks Received:
1

As I thought, the default output is
Code:

pcm0

so, execute this sysctl hw.snd.default_unit=1 and see if it works.

suhijo, Dec 21, 2013
#4
3.

sickboy New Member

Messages:
21

Thanks Received:
0

Yes, it does.

sickboy, Dec 21, 2013
#5
3.

suhijo New Member

Messages:
39

Thanks Received:
1

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.

suhijo, Dec 21, 2013
#6
3.

sickboy New Member

Messages:
21

Thanks Received:
0

But then headphone output is the default.  Doesn't the system detect
whether headphones are plugged in or not?

sickboy, Dec 21, 2013
#7
3.

suhijo New Member

Messages:
39

Thanks Received:
1

This is not automatic in FreeBSD.

suhijo, Dec 21, 2013
#8
3.

jrm Active Member

Messages:
983

Thanks Received:
338

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, Dec 21, 2013
#9
3.

kpa Well-Known Member

Messages:
5,004

Thanks Received:
1,199

suhijo said:

This is not automatic in FreeBSD.
Click to expand...

It's not automatic but the sound driver can be configured to switch
the main speakers off when the headphones are plugged in.  See example
2 in the snd_hda(4) manual page.

kpa, Dec 21, 2013
#10
3.

sickboy New Member

Messages:
21

Thanks Received:
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).
Click to expand...

Unfortunately, it doesn't work either.  I still have to switch
manually.

sickboy, Dec 22, 2013
#11
3.

Grance New Member

Messages:
1

Thanks Received:
0

This is not automatic in FreeBSD.

Grance, Dec 23, 2013
#12
3.

pkubaj Member

Messages:
509

Thanks Received:
80

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"

pkubaj, Dec 26, 2013
#13
3.

jrm Active Member

Messages:
983

Thanks Received:
338

It's always been automatic for me as well until the Lenovo X220 and
T530.  The answer is likely in snd_hda(4).  You could also try the
freebsd-multimedia@freebsd.org mailing list.

jrm, Dec 27, 2013
#14
3.

sickboy New Member

Messages:
21

Thanks Received:
0

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, Jan 5, 2014
#15
3.

emmex New Member

Messages:
22

Thanks Received:
5

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.
Click to expand...

Thanks to you @sickboy.  This works in my Samsung ATIV BOOK 2 model
NP270E5E-K02IT too.

Last edited by a moderator: Oct 16, 2014
emmex, Apr 15, 2014
#16

(You must log in or sign up to reply here.)
Show Ignored Content

Your name or email address:

Do you already have an account?

• No, create an account now.
• Yes, my password is:
•
Forgot your password?

Stay logged in

The FreeBSD Forums
Forums> Base System> System Hardware>

• Forums

Forums

Quick Links

• Search Forums
• Recent Posts

• Menu

Search

• Search titles only

Posted by Member:

Separate names with a comma.

Newer Than:

• Search this thread only
• Search this forum only

• Display results as threads

Useful Searches

• Recent Posts

More...

Style
FreeBSD Style

• Contact Us
• Help
• Home
• Top
• RSS

• Terms and Rules

Forum software by XenForo™ ©2010-2015 XenForo Ltd.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation
and is used by The FreeBSD Project with the permission of The FreeBSD
Foundation.