LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 02-21-2016, 01:31 AM   #1
Rotten194
LQ Newbie
 
Registered: Dec 2011
Posts: 20

Rep: Reputation: Disabled
Question After Ubuntu 15.10 dist-upgrade, sound only comes through onboard speakers, doesn't work with headphones?


I'm currently running Ubuntu 15.10 with a normal PulseAudio + Alsa setup on a Thinkpad t440p. Yesterday, the sound worked fine, but now after running a dist-upgrade sound only works through the speakers. Nothing is muted in alsamixer or pavucontrol. However, when I open alsamixer it defaults to my Intel HDMI card, which has no controls. I can switch to the PCH card with f6, which does have controls. However, a custom ~/.asoundrc that set the PCH card as default didn't seem to help.

Code:
$ cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=15.10
    DISTRIB_CODENAME=wily
    DISTRIB_DESCRIPTION="Ubuntu 15.10"
Code:
    
$ pulseaudio --version
    pulseaudio 6.0
Code:
$ aplay -L
    default
        Playback/recording through the PulseAudio sound server
    null
        Discard all samples (playback) or generate zero samples (capture)
    pulse
        PulseAudio Sound Server
    hdmi:CARD=HDMI,DEV=0
        HDA Intel HDMI, HDMI 0
        HDMI Audio Output
    hdmi:CARD=HDMI,DEV=1
        HDA Intel HDMI, HDMI 1
        HDMI Audio Output
    hdmi:CARD=HDMI,DEV=2
        HDA Intel HDMI, HDMI 2
        HDMI Audio Output
    dmix:CARD=HDMI,DEV=3
        HDA Intel HDMI, HDMI 0
        Direct sample mixing device
    dmix:CARD=HDMI,DEV=7
        HDA Intel HDMI, HDMI 1
        Direct sample mixing device
    dmix:CARD=HDMI,DEV=8
        HDA Intel HDMI, HDMI 2
        Direct sample mixing device
    dsnoop:CARD=HDMI,DEV=3
        HDA Intel HDMI, HDMI 0
        Direct sample snooping device
    dsnoop:CARD=HDMI,DEV=7
        HDA Intel HDMI, HDMI 1
        Direct sample snooping device
    dsnoop:CARD=HDMI,DEV=8
        HDA Intel HDMI, HDMI 2
        Direct sample snooping device
    hw:CARD=HDMI,DEV=3
        HDA Intel HDMI, HDMI 0
        Direct hardware device without any conversions
    hw:CARD=HDMI,DEV=7
        HDA Intel HDMI, HDMI 1
        Direct hardware device without any conversions
    hw:CARD=HDMI,DEV=8
        HDA Intel HDMI, HDMI 2
        Direct hardware device without any conversions
    plughw:CARD=HDMI,DEV=3
        HDA Intel HDMI, HDMI 0
        Hardware device with all software conversions
    plughw:CARD=HDMI,DEV=7
        HDA Intel HDMI, HDMI 1
        Hardware device with all software conversions
    plughw:CARD=HDMI,DEV=8
        HDA Intel HDMI, HDMI 2
        Hardware device with all software conversions
    sysdefault:CARD=PCH
        HDA Intel PCH, ALC3232 Analog
        Default Audio Device
    front:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        Front speakers
    surround21:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        2.1 Surround output to Front and Subwoofer speakers
    surround40:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        4.0 Surround output to Front and Rear speakers
    surround41:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    dmix:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        Direct sample mixing device
    dsnoop:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        Direct sample snooping device
    hw:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        Direct hardware device without any conversions
    plughw:CARD=PCH,DEV=0
        HDA Intel PCH, ALC3232 Analog
        Hardware device with all software conversions
Code:
    $ cat /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
    # This file is part of PulseAudio.
    #
    # PulseAudio is free software; you can redistribute it and/or modify
    # it under the terms of the GNU Lesser General Public License as
    # published by the Free Software Foundation; either version 2.1 of the
    # License, or (at your option) any later version.
    #
    # PulseAudio is distributed in the hope that it will be useful, but
    # WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # General Public License for more details.
    #
    # You should have received a copy of the GNU Lesser General Public License
    # along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
    
    ; Path for mixers that have a 'Headphone' control
    ;
    ; See analog-output.conf.common for an explanation on the directives
    
    [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 = off
    volume = off
    
    [Element Desktop Speaker]
    switch = off
    volume = off
    
    ; On some machines Front is actually a part of the Headphone path
    [Element Front]
    switch = mute
    volume = zero
    
    [Element Rear]
    switch = off
    volume = off
    
    [Element Surround]
    switch = off
    volume = off
    
    [Element Side]
    switch = off
    volume = off
    
    [Element Center]
    switch = off
    volume = off
    
    [Element LFE]
    switch = off
    volume = off
    
    [Element Bass Speaker]
    switch = off
    volume = off
    
    [Element Speaker Front]
    switch = off
    volume = off
    
    [Element Speaker Surround]
    switch = off
    volume = off
    
    [Element Speaker Side]
    switch = off
    volume = off
    
    [Element Speaker CLFE]
    switch = off
    volume = off
    
    .include analog-output.conf.common
Code:
$ cat /etc/modprobe.d/alsa-base.conf
    # autoloader aliases
    install sound-slot-0 /sbin/modprobe snd-card-0
    install sound-slot-1 /sbin/modprobe snd-card-1
    install sound-slot-2 /sbin/modprobe snd-card-2
    install sound-slot-3 /sbin/modprobe snd-card-3
    install sound-slot-4 /sbin/modprobe snd-card-4
    install sound-slot-5 /sbin/modprobe snd-card-5
    install sound-slot-6 /sbin/modprobe snd-card-6
    install sound-slot-7 /sbin/modprobe snd-card-7
    
    # Cause optional modules to be loaded above generic modules
    install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
    #
    # Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
    install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
    install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
    install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
    #
    install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
    # Cause optional modules to be loaded above sound card driver modules
    install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
    install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }
    
    # Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
    install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
    # Prevent abnormal drivers from grabbing index 0
    options bt87x index=-2
    options cx88_alsa index=-2
    options saa7134-alsa index=-2
    options snd-atiixp-modem index=-2
    options snd-intel8x0m index=-2
    options snd-via82xx-modem index=-2
    options snd-usb-audio index=-2
    options snd-usb-caiaq index=-2
    options snd-usb-ua101 index=-2
    options snd-usb-us122l index=-2
    options snd-usb-usx2y index=-2
    # Ubuntu #62691, enable MPU for snd-cmipci
    options snd-cmipci mpu_port=0x330 fm_port=0x388
    # Keep snd-pcsp from being loaded as first soundcard
    options snd-pcsp index=-2
    # Keep snd-usb-audio from beeing loaded as first soundcard
    options snd-usb-audio index=-2
    
    #Keep snd-pcsp from being loaded as first soundcard
    # options snd-pcsp index=-2
    #alias snd-card-0 snd-hda-intel
    #alias sound-slot-0 snd-hda-intel
    #options snd-hda-intel model=dell-m6-amic
 
Old 02-21-2016, 02:41 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
Hi

until you get a better reply.....delete your .asoundrc file to reduce trouble shooting at the moment....reboot and then

Quote:
with a normal PulseAudio + Alsa setup
I am not sure what that means?

If you truly have PA setup....then go into the pulseaudio control panel and go to the last tab and choose one of the analog sound devices instead of hdmi.

#############################

index=0 index=1 you have discovered that alsa has hdmi has index=0 and you want index=1 so if above did not work for you

use root powers to edit /etc/modprobe.d/alsa-base.conf

add this line please....only if above did not work

hang on....your config has snd hyphen hda - intel ....it should be snd_hda_intel

now the line

options snd_hda_intel index=1

full reboot to keep it simple

good luck
 
Old 02-21-2016, 06:38 PM   #3
Rotten194
LQ Newbie
 
Registered: Dec 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
If you truly have PA setup....then go into the pulseaudio control panel and go to the last tab and choose one of the analog sound devices instead of hdmi.
It's been like this:
http://i.imgur.com/flIU4dq.png
The one that's off only has HDMI entries.

I also tried adding options snd_hda_intel index=1, but it didn't help.
 
Old 02-22-2016, 12:03 AM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
thanks for the image. I normally use tinypic so trying out yur site for this image

http://imgur.com/AFO7pv5

my config looks exactly like yours and I have sound out for analog but I have the index set in my modprobe file as well.
But using 3.55 mm lead to desktop speakers which is why headphone is showing as unplugged

2) if modprobe works alsamixer should show the analog device not the hdmi can you confirm pls?

3) sound thru speakers is good but are you saying sound not working thru headphones?

Last edited by aus9; 02-22-2016 at 12:09 AM.
 
Old 02-22-2016, 04:12 AM   #5
Rotten194
LQ Newbie
 
Registered: Dec 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
Yeah, sound works perfectly through the speakers, but when I plug in headphones it stops. The headphones are detected -- the volume setting switches to the headphone setting, and they show up in pavucontrol:

http://i.imgur.com/78U7vBj.png

They just don't make sound. The headphones themselves also aren't broken, because they work with my phone.
 
Old 02-22-2016, 08:42 PM   #6
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
Ok lets assume its the PA headphone conf.

first can you please confirm that an ordinary 3.55 mm ear buds or non-fancy no control headphones work "as is"

If so, then move out the /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf and any other analog conf as I have 2 there that and a "2" one
reboot or restart alsa and pulse

then try again your fancy headphones.

If it works now, it might be that you might have to use a mixer to adjust headphone vol instead of hardware knob

######################################
Independent of that is PA itself.....this assumes conf left in.....OK?

I am not big fan of it as I only need desktop speakers but
https://wiki.archlinux.org/index.php/PulseAudio

but
Code:
pacmd list-sinks
can be run as local user to see what PA is running....should show a headphone sink such as

analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-headphones"
 
Old 02-22-2016, 11:40 PM   #7
Rotten194
LQ Newbie
 
Registered: Dec 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
Moving the conf files didn't help. I tried with both earbuds and some ATXm50s I have. Both work on phone, neither works in computer.

pacmd list-sinks gives this:

Code:
$ pacmd list-sinks
3 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: 
	priority: 9959
	volume: front-left: 42130 /  64% / -11.51 dB,   front-right: 42130 /  64% / -11.51 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: yes
	current latency: 20.28 ms
	max request: 3 KiB
	max rewind: 64 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 3
	configured latency: 20.00 ms; range is 0.50 .. 371.52 ms
	card: 1 <alsa_card.pci-0000_00_1b.0>
	module: 7
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC3232 Analog"
		alsa.id = "ALC3232 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xf1634000 irq 35"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "8c20"
		device.product.name = "8 Series/C220 Series Chipset High Definition Audio Controller (ThinkPad T440p)"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		alsa.mixer_name = "Realtek ALC3232"
		alsa.components = "HDA:10ec0292,17aa220e,00100001"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-speaker>
    index: 1
	name: <combined>
	driver: <module-combine-sink.c>
	flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: IDLE
	suspend cause: 
	priority: 1000
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: yes
	current latency: 0.00 ms
	max request: 3 KiB
	max rewind: 0 KiB
	monitor source: 1
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 1
	configured latency: 20.00 ms; range is 0.50 .. 200.00 ms
	module: 15
	properties:
		device.class = "filter"
		device.description = "Simultaneous output to Built-in Audio Analog Stereo"
		device.icon_name = "audio-card"
    index: 2
	name: <rtp>
	driver: <module-null-sink.c>
	flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: IDLE
	suspend cause: 
	priority: 1000
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: yes
	current latency: 0.20 ms
	max request: 1 KiB
	max rewind: 1 KiB
	monitor source: 2
	sample spec: s16be 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 2
	configured latency: 7.26 ms; range is 0.50 .. 2000.00 ms
	module: 16
	properties:
		device.description = "RTP Multicast"
		device.class = "abstract"
		device.bus = "network"
		device.icon_name = "network-server"
Which to highlight the important bit:

Code:
analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-speakers"
analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
I notice the speakers have a higher priority than the headphones. Do you think that means anything?
 
Old 02-22-2016, 11:46 PM   #8
Rotten194
LQ Newbie
 
Registered: Dec 2011
Posts: 20

Original Poster
Rep: Reputation: Disabled
Whoo! I got it working!

Running
Code:
alsactl restore
fixed it for some reason. No idea why, but it works. A bit staticy but otherwise fine.

Edit: Turning down "Beep" in Alsamixer fixed the static.

Last edited by Rotten194; 02-22-2016 at 11:49 PM.
 
Old 02-23-2016, 05:25 PM   #9
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
glad you solved it yourself, can you mark it as solved please
 
  


Reply

Tags
alsa, pulse audio, pulseaudio, sound, ubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
plugging in headphones or speakers doesn't disable my laptop's built in speakers moljac024 Linux - Software 14 07-13-2017 08:01 AM
Sound seems to be confused with itself. Speakers work fine, headphones are buggy. WickDaddy Ubuntu 4 08-14-2011 12:51 PM
Lenovo..Ubuntu 9.10..Sound from speakers even after attaching headphones whiteknight87 Linux - Laptop and Netbook 2 04-23-2010 10:13 AM
USB Headphones & OnBoard Audio/Speakers MIRV Linux - Hardware 0 02-27-2008 03:25 AM
Wireless switch doesn't work after upgrade/dist-upgrade angelofhope Debian 10 01-02-2008 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 12:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration