No headphone detected with ubuntu installed on macbook pro

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

Post Reply
xon
Established Member
Posts: 8
Joined: Sat Oct 31, 2015 5:09 pm

No headphone detected with ubuntu installed on macbook pro

Post by xon »

Hello,

I've get a macbook pro, on which I installed Xubuntu and KX repositories.
I've got only sound from the loudspeakers. The headphone is not detected when it is plugged.

By googling, I found that I could tweak :

cd /usr/share/pulseaudio/alsa-mixer/paths/
sudo nano analog-output-headphones.conf this file.


By changing

Code: Select all

[Element Speaker]
switch = on
volume = ignore
I can have sound on headphones by rebboting, but I have no longer sound on the loudspeakers.

What do I have to change within the file to have sound on loudspeakers and then stop sound on loudspeakers and get sound on headphones when headphones are connected ?

Thanks,
Christophe


Below is the file content :

Code: Select all

[General]
priority = 90
description-key = analog-output-headphones

[Properties]
device.icon_name = audio-headphones

[Jack Dock Headphone]
required-any = any

[Jack Dock Headphone Phantom]
required-any = any
state.plugged = unknown
state.unplugged = unknown

[Jack Front Headphone]
required-any = any

[Jack Front Headphone Phantom]
required-any = any
state.plugged = unknown
state.unplugged = unknown

[Jack Headphone]
required-any = any

[Jack Headphone Phantom]
required-any = any
state.plugged = unknown
state.unplugged = unknown

# This jack can be either a headphone *or* a mic. Used on some ASUS netbooks.
[Jack Headphone Mic]
required-any = any

[Element Hardware Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

[Element Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

[Element Master Mono]
switch = off
volume = off

[Element Speaker+LO]
switch = off
volume = off

[Element Headphone+LO]
required-any = any
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

[Element Headphone]
required-any = any
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

[Element Headset]
required-any = any
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

[Element Line HP Swap]
switch = on
required-any = any

; This profile path is intended to control the first headphones, not
; the second headphones. But it should not hurt if we leave the second
; headphone jack enabled nonetheless.
[Element Headphone2]
switch = mute
volume = zero

[Element Speaker]
switch = on
volume = ignore

[Element Desktop Speaker]
switch = on
volume = ignore
...
xon
Established Member
Posts: 8
Joined: Sat Oct 31, 2015 5:09 pm

Re: No headphone detected with ubuntu installed on macbook p

Post by xon »

In fact, with the code posted previously in /usr/share/pulseaudio/alsa-mixer/paths/,
The sound is either on the loudspeakers or on the headphones depending on if the headphones is plugged when booting.
After booting the headphone is no longer recognized and I have to reboot to get sound on headphone.
There should an easy solution to avoid to reboot to switch between loudspeakers and headphones.
Thnaks for the help,
Christophe
glowrak guy
Established Member
Posts: 2329
Joined: Sat Jun 21, 2014 8:37 pm
Been thanked: 256 times

Re: No headphone detected with ubuntu installed on macbook p

Post by glowrak guy »

Unless a code or app fixes the combo-jack nonsense, just buy a good set of powered speakers
that have their own headphone jack. Regression proof.
Some have a control knob for bass, which is handy.

I got rid of pulse-audio, and use smplayer, vlc, and aqualung for media playback,
using qjackctl.
Cheers
Post Reply