Ubuntu – Sound only out of internal speakers, never headphones (Alienware laptop, Ubuntu 15.10)

15.10alsaheadphonespulseaudiosound

Alienware 17 r3 laptop, internal speakers work fine, headphone jack(s) seem to be ignored, so I can't get sound to an external speaker. (The Alienware has a second "microphone" jack, which apparently can double as another headphone jack.) Also: I've got it dual-booted to Windows 10, and the headphones work fine under Windows.

I saw that another user had essentially the same problem Ubuntu 15.10 Headphones No Sound but it doesn't seem to have been resolved. My system shows only small variations from the original bug report, so it's surely the same issue.

inxi:

> inxi -Fxz
System:    Host: jakku Kernel: 4.2.0-25-generic x86_64 (64 bit gcc: 5.2.1)
           Desktop: Unity 7.3.2 (Gtk 3.16.7-0ubuntu3)
           Distro: Ubuntu 15.10 wily
Machine:   System: Alienware product: Alienware 17 R3 v: 1.2.3
           Mobo: Alienware model: Alienware 17 R3 v: A00
           Bios: Alienware v: 1.2.3 date: 11/11/2015
CPU:       Quad core Intel Core i7-6700HQ (-HT-MCP-) cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 20726
           clock speeds: max: 3500 MHz 1: 2600 MHz 2: 3294 MHz 3: 3355 MHz
           4: 3369 MHz 5: 3381 MHz 6: 2600 MHz 7: 3183 MHz 8: 3207 MHz
Graphics:  Card-1: Intel Device 191b bus-ID: 00:02.0
           Card-2: NVIDIA GM204M [GeForce GTX 980M] bus-ID: 01:00.0
           Display Server: X.Org 1.17.2 driver: nvidia
           Resolution: 3440x1440@59.97hz, 1920x1080@60.02hz
           GLX Renderer: GeForce GTX 980M/PCIe/SSE2
           GLX Version: 4.5.0 NVIDIA 352.63 Direct Rendering: Yes
Audio:     Card Intel Sunrise Point-H HD Audio
           driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.2.0-25-generic
Network:   Card-1: Qualcomm Atheros Device e0a1
           driver: alx port: d000 bus-ID: 3b:00.0
           IF: enp59s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
           Card-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
           driver: ath10k_pci bus-ID: 3c:00.0
           IF: wlp60s0 state: down mac: <filter>
           Card-3: Atheros usb-ID: 001-004
           IF: null-if-id state: N/A speed: N/A duplex: N/A mac: N/A
Drives:    HDD Total Size: 1128.2GB (33.5% used)
           ID-1: /dev/sda model: SanDisk_X300_M.2 size: 128.0GB
           ID-2: /dev/sdb model: HGST_HTS721010A9 size: 1000.2GB
Partition: ID-1: / size: 33G used: 6.4G (21%) fs: ext4 dev: /dev/sda6
           ID-2: swap-1 size: 16.38GB used: 0.00GB (0%) fs: swap dev: /dev/sda7
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 57.0C mobo: N/A gpu: 0.0:57C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 244 Uptime: 1:34 Memory: 1293.5/15947.5MB
           Init: systemd runlevel: 5 Gcc sys: 5.2.1
           Client: Shell (tcsh 6.18.01) inxi: 2.2.16 

dmesg:

> dmesg | grep snd
[    2.350920] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[    2.351041] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    2.376447] snd_hda_codec_ca0132 hdaudioC0D0: autoconfig for CA0132: line_outs=1 (0xb/0x0/0x0/0x0/0x0) type:speaker
[    2.376449] snd_hda_codec_ca0132 hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    2.376450] snd_hda_codec_ca0132 hdaudioC0D0:    hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    2.376451] snd_hda_codec_ca0132 hdaudioC0D0:    mono: mono_out=0x0
[    2.376452] snd_hda_codec_ca0132 hdaudioC0D0:    inputs:
[    2.376453] snd_hda_codec_ca0132 hdaudioC0D0:      Mic=0x12
[    2.376454] snd_hda_codec_ca0132 hdaudioC0D0:      Line=0x11

lspci:

> sudo lspci -v | grep -A7 -i "audio"
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
    Subsystem: Dell Device 0708
    Flags: bus master, fast devsel, latency 32, IRQ 136
    Memory at dd128000 (64-bit, non-prefetchable) [size=16K]
    Memory at dd100000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [50] Power Management version 3
    Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Kernel driver in use: snd_hda_intel

aplay:

> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CA0132 Analog [CA0132 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: CA0132 Digital [CA0132 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

pacmd:

> pacmd
Welcome to PulseAudio 6.0! Use "help" for usage information.
>>> list-sinks
1 sink(s) available.
  * index: 0
    name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 9959
    volume: front-left: 19986 /  30% / -30.95 dB,   front-right: 19986 /  30% / -30.95 dB
            balance 0.00
    base volume: 46396 /  71% / -9.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 0
    sample spec: s16le 2ch 48000Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 341.33 ms
    card: 0 <alsa_card.pci-0000_00_1f.3>
    module: 6
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "CA0132 Analog"
        alsa.id = "CA0132 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 0xdd128000 irq 136"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1f.3"
        sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "a170"
        device.product.name = "Sunrise Point-H HD Audio"
        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 = "Intel Skylake HDMI"
        alsa.components = "HDA:11020011,10280708,00100918 HDA:80862809,80860101,00100000"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
            properties:

    active port: <analog-output-lineout>

pulseaudio config files:

> cd /usr/share/pulseaudio/alsa-mixer/paths/
> ls
analog-input-aux.conf              analog-output-headphones-2.conf
analog-input-dock-mic.conf         analog-output-headphones.conf
analog-input-fm.conf               analog-output-lineout.conf
analog-input-front-mic.conf        analog-output-mono.conf
analog-input-headphone-mic.conf        analog-output-speaker-always.conf
analog-input-headset-mic.conf          analog-output-speaker.conf
analog-input-internal-mic-always.conf  analog-output.conf
analog-input-internal-mic.conf         analog-output.conf.common
analog-input-linein.conf           hdmi-output-0.conf
analog-input-mic-line.conf         hdmi-output-1.conf
analog-input-mic.conf              hdmi-output-2.conf
analog-input-mic.conf.common           hdmi-output-3.conf
analog-input-rear-mic.conf         hdmi-output-4.conf
analog-input-tvtuner.conf          hdmi-output-5.conf
analog-input-video.conf            hdmi-output-6.conf
analog-input.conf              hdmi-output-7.conf
analog-input.conf.common           iec958-stereo-output.conf

speaker-test: (plays fine out of built-in speakers, ignores headphones)

> speaker-test -t wav -Dplug:front

speaker-test 1.0.29

Playback device is plug:front
Stream parameters are 48000Hz, S16_LE, 1 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 - Front Left
Time per period = 1.195038
 0 - Front Left
Time per period = 1.450744
 0 - Front Left

alsa-info.sh output can be found here: http://www.alsa-project.org/db/?f=464ac3c346a6be1214d385a2d44e74e587b2ba46

Everything works fine with internal, built-in speakers. But I can't get any sound out of the headphones. Anyone have any ideas? Thanks!

Edit

In case it helps anyone, Windows 10 lists the sound card as "Sound Blaster Recon3Di" (where the headphones work just fine).

Best Answer

I found the solution somewhere. Do the following:

  • In terminal, enter the command "alsamixer".

  • An ASCI UI will open, use the arrow keys to find the item: "HP/speaker Auto Detect". it will say "Off" next to it.

  • Press M and the "Off" tag will disappear.

  • Re-plug your headphones.

  • Enjoy!

Related Question