2

Problem Summary

When the line-out speaker is selected as the sound output, the sound is fine. Sound comes only from the speakers connected to the line-out port. However, when the headphone is selected as the output device, sound comes out both from the headphone and the speakers.

(EDIT 1) I tested in Windows 10 (using a live USB), and the problem does not occur there. So, this is definitely a software issue.

Details

My desktop computer has three sound output options:

  • HDMI/Display port (not used)
  • Headphone port at the front (headphone connected)
  • Line-out port at the back (speakers connected)

When line-out is selected as the output device, the sound is heard only from the speakers connected to the line-out port. No problem there.

enter image description here

However, when headphone is selected as the output device, the sound is heard both from headphones and the speakers connected to the line out port.

enter image description here

This is really strange and beats the very purpose of the headphone, namely, privacy and not disturbing others.

Current Settings

My sound card as found is as follows.

sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]

rest snipped

I even tried setting the sound volume of the line-out to zero in settings. This works for the line-out speakers. However, this does not seem to have any effect on the sound volume when the headphone is selected. The line-out speakers are equally loud, even with the sound volume set to zero.

enter image description here

I am not sure whether the output from alsamixer will be useful. But here it goes anyway.

enter image description here

EDIT 1

I booted the PC in Windows 10 using a live USB. And tested the sound outputs again. The problem does not occur there. So, this is definitely a software (some configuration file?) issue.


EDIT 2

Output from pacmd list-sinks (produced when the problem was happening)

1 sink(s) available.
  * index: 1
  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: RUNNING
  suspend cause: (none)
  priority: 9039
  volume: front-left: 18352 /  28% / -33.17 dB,   front-right: 18352 /  28% / -33.17 dB
          balance 0.00
  base volume: 65536 / 100% / 0.00 dB
  volume steps: 65537
  muted: no
  current latency: 22.61 ms
  max request: 4 KiB
  max rewind: 4 KiB
  monitor source: 1
  sample spec: s16le 2ch 44100Hz
  channel map: front-left,front-right
               Stereo
  used by: 1
  linked by: 1
  configured latency: 23.22 ms; range is 0.50 .. 2000.00 ms
  card: 0 <alsa_card.pci-0000_00_1f.3>
  module: 23
  properties:
      alsa.resolution_bits = "16"
      device.api = "alsa"
      device.class = "sound"
      alsa.class = "generic"
      alsa.subclass = "generic-mix"
      alsa.name = "ALC3234 Analog"
      alsa.id = "ALC3234 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 0xf7040000 irq 129"
      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 = "100 Series/C230 Series Chipset Family HD Audio Controller"
      device.form_factor = "internal"
      device.string = "front:0"
      device.buffering.buffer_size = "352800"
      device.buffering.fragment_size = "176400"
      device.access_mode = "mmap+timer"
      device.profile.name = "analog-stereo"
      device.profile.description = "Analog Stereo"
      device.description = "Built-in Audio Analog Stereo"
      module-udev-detect.discovered = "1"
      device.icon_name = "audio-card-pci"
  ports:
      analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
          properties:
  analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
      properties:
          device.icon_name = &quot;audio-speakers&quot;
  analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: unknown)
      properties:
          device.icon_name = &quot;audio-headphones&quot;

active port: <analog-output-headphones>


EDIT 3

Output from pactl list sink-inputs (while playing through the speakers, non-problem scenario)

Sink Input #20
  Driver: protocol-native.c
  Owner Module: 10
  Client: 34
  Sink: 1
  Sample Specification: float32le 2ch 44100Hz
  Channel Map: front-left,front-right
  Format: pcm, format.sample_format = "\"float32le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
  Corked: no
  Mute: no
  Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
          balance 0.00
  Buffer Latency: 42811 usec
  Sink Latency: 23180 usec
  Resample method: copy
  Properties:
      application.icon_name = "google-chrome"
      media.name = "Playback"
      application.name = "Google Chrome"
      native-protocol.peer = "UNIX socket client"
      native-protocol.version = "34"
      application.process.id = "3091"
      application.process.user = "masroor"
      application.process.host = "masroor-OptiPlex-5040"
      application.process.binary = "chrome"
      application.language = "en_US.UTF-8"
      window.x11.display = ":0"
      application.process.machine_id = "749ee17244e440b5b766e258f177b412"
      module-stream-restore.id = "sink-input-by-application-name:Google Chrome"

Output from pactl list sink-inputs (while playing through the headphones, problem scenario, sound coming out both from the headphones and speakers, though supposed to be coming out only from the headphones)

Sink Input #20
  Driver: protocol-native.c
  Owner Module: 10
  Client: 34
  Sink: 1
  Sample Specification: float32le 2ch 44100Hz
  Channel Map: front-left,front-right
  Format: pcm, format.sample_format = "\"float32le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
  Corked: no
  Mute: no
  Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
          balance 0.00
  Buffer Latency: 45714 usec
  Sink Latency: 22927 usec
  Resample method: copy
  Properties:
      application.icon_name = "google-chrome"
      media.name = "Playback"
      application.name = "Google Chrome"
      native-protocol.peer = "UNIX socket client"
      native-protocol.version = "34"
      application.process.id = "3091"
      application.process.user = "masroor"
      application.process.host = "masroor-OptiPlex-5040"
      application.process.binary = "chrome"
      application.language = "en_US.UTF-8"
      window.x11.display = ":0"
      application.process.machine_id = "749ee17244e440b5b766e258f177b412"
      module-stream-restore.id = "sink-input-by-application-name:Google Chrome"
Masroor
  • 3,143
  • 3
    Just to be on the safe side, be sure that you have all your sound connectors fully plugged in. I had my "best" facepalm many years ago when I consumed 3 working days and a full re-install of Windows 98 to fix a mono sound issue just to find that my 3.5mm connector was not fully seated... – Niclas Börlin Jul 17 '21 at 10:01
  • @NiclasBörlin I just checked. That does not seem to be the issue. Thanks anyway for the concern. – Masroor Jul 17 '21 at 11:37
  • Do you see the same problem if you exchange the ports of speakers and headphones? (I would expect you do, but just in case). – sancho.s ReinstateMonicaCellio Jul 19 '21 at 04:36
  • Could you run pacmd list-sinks and post the result? Be sure to reproduce the issue and run cmd while audio is running. Thanks. – Nate T Jul 24 '21 at 22:26
  • Also can you run the command pactl list sink-inputstwice (once while playing through speakers and again while playing through, erm.. both XD ) and post result. This should be more than enough to derive a solution. – Nate T Jul 24 '21 at 23:03
  • @NateT Please see my edits. Please let me know should you need any more debugging information. And thanks in advance. – Masroor Jul 25 '21 at 10:31
  • It is showing that you have only a single output. In pulse audio sink is an output device and a sink input is the connection between an output and a stream. There should be two separate sinks, one for each output device. What app are you using (that is interfacing pa / producing the sound)? – Nate T Jul 25 '21 at 22:01
  • Nevermind, I see it is chrome.. Yea, your headphones aren't even registering w/ pulseaudio. This may be a chrome thing. Ill check. – Nate T Jul 25 '21 at 22:03
  • @NateT Would it help if the tests are done with other native sound applications? – Masroor Jul 25 '21 at 23:41
  • Sorry I missed this comment. If the issue is not fixed, would you be willing to start a chat? I can help you fix it, but I don't want to fill up the comments doing so. Also, try pactl list. I was expecting more than one sink. You'll have to make a stream and a sink to split them. Im guessing its an alsa driver issue, but you can do the driver's extra work w/ commands. – Nate T Aug 15 '21 at 15:16
  • @NateT, Why not? Please let me know a time convenient for both of us. I live in a zone with time UTC+6. – Masroor Aug 16 '21 at 23:31
  • Im in Indy; +6 as well. I work until 4 or 5p weekdays, but I'm usually free in the evenings. I have plans tomorrow, but I can keep Wednesday free. Would that work for you? – Nate T Aug 17 '21 at 04:43
  • @NateT I am occupied this evening. Can we make it some other day? – Masroor Aug 17 '21 at 23:36
  • Sry. yea. This weekend okay? Let me know when you are available. Don't think I have any plans. – Nate T Aug 20 '21 at 02:13
  • @NateT Given that we have different weekends, and the overall busy lifestyle of both, looks like it will be difficult to match our schedules. Do you want to move to email communication? Slower, but should solve the problem eventually. If you please provide your email address, I can send an email. – Masroor Aug 21 '21 at 00:17
  • My email contains private info (the rest of my name), which makes me uncomfortable. I (as do you most likely : ) ) know the full extent of what can be achieved with access to a full name and a social media account. A few more comments, and AU will make us a chat room where we can both just type whatever whenever and it will persist. Should work the same as email for our purposes. As a bonus, it will port all of our previous comments there, and clean up the mess we've made of your question space. XD – Nate T Aug 21 '21 at 00:34
  • I am surprised it hasn't done so already. This many comments always makes me uncomfortable. SO has conditioned me properly, I guess. – Nate T Aug 21 '21 at 00:36

1 Answers1

0

You could try enabling the feature of simultaneous output, check how it works, and then disabling it. Perhaps that fixes your problem.

Install paprefs, run it, and enable Simultaneous output. Then run pavucontrol and go to Output devices, and try tinkering with the options (you should see Simultaneous output...). Or go to Settings -> Sound -> Output -> Simultaneous output..., and also tinker with that.

In the meantime, you could check if you see anything strange in pavucontrol -> Configuration.

Sources:

  1. Play sound through two or more outputs/devices
  • I tried extensively with your answer and the answer in the link. I have explored all the possible combinations. Unfortunately, it did not work. – Masroor Jul 22 '21 at 04:07