• why sound keep defaulting back to headphones at boot?

    From W Pulaska@nsd@nda.net to alt.os.linux.ubuntu on Sun Jun 6 14:17:02 2021
    From Newsgroup: alt.os.linux.ubuntu

    I'm on 18.04. Just wondering why at boot up, even after have have set
    output to speakers, that it keeps going back to headphones and I have to
    go in and manually switch back to speakers? How to remedy?
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From W Pulaska@nsd@nda.net to alt.os.linux.ubuntu on Sun Jun 6 19:40:21 2021
    From Newsgroup: alt.os.linux.ubuntu

    On 6/6/21 2:17 PM, W Pulaska wrote:
    I'm on 18.04.  Just wondering why at boot up, even after have have set output to speakers, that it keeps going back to headphones and I have to
    go in and manually switch back to speakers?  How to remedy?
    Anyone? I've been at this off and on all day. I have Audacity
    installed and sometimes settings made in there seem to effect the entire OS, so I reset it to default just in case. Also reset pulseaudio and
    went in to alsamixer and tried to adjust the settings there.
    When I go to sound settings, I see speakers under output. Test sound
    does nothing. It is not muted. When I had a video playing, it showed
    under the applications section with volume all the way up but no sound.
    If I go into pulseaudio, under "output devices" and "speakers" selected
    as port, the meter is moving there as a video plays, but no sound
    unless I choose headphones (unplugged), then I get audio through the
    speakers. As I said, upon reboot, this setting does not stay and
    defaults back to speakers at which point there is no audio again.
    Thanks in advance.
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Paul@nospam@needed.invalid to alt.os.linux.ubuntu on Sun Jun 6 22:35:51 2021
    From Newsgroup: alt.os.linux.ubuntu

    W Pulaska wrote:
    On 6/6/21 2:17 PM, W Pulaska wrote:
    I'm on 18.04. Just wondering why at boot up, even after have have set
    output to speakers, that it keeps going back to headphones and I have
    to go in and manually switch back to speakers? How to remedy?

    Anyone? I've been at this off and on all day. I have Audacity
    installed and sometimes settings made in there seem to effect the entire
    OS, so I reset it to default just in case. Also reset pulseaudio and
    went in to alsamixer and tried to adjust the settings there.


    When I go to sound settings, I see speakers under output. Test sound
    does nothing. It is not muted. When I had a video playing, it showed under the applications section with volume all the way up but no sound.

    If I go into pulseaudio, under "output devices" and "speakers" selected
    as port, the meter is moving there as a video plays, but no sound
    unless I choose headphones (unplugged), then I get audio through the speakers. As I said, upon reboot, this setting does not stay and
    defaults back to speakers at which point there is no audio again.

    Thanks in advance.


    https://wiki.archlinux.org/title/PulseAudio/Troubleshooting

    /etc/pulse/daemon.conf # engine?
    /etc/pulse/default.pa # sources/sinks?

    pactl list sinks # list outputs?
    pacmd list-cards # your HDAudio chip, the NVidia HDMI, and so on

    ~/.config/pulse/default.pa # your personal settings?
    ~/.asoundrc # only if bodging ALSA to make something work ("dmix").

    https://manpages.ubuntu.com/manpages/trusty/en/man5/pulse-client.conf.5.html

    ~/.config/pulse/client.conf # seems similar to default.pa

    They claim removing the contents of ~/.config/pulse could
    cause a new set of files to be generated for it. You could
    just rename it

    mv ~/.config/pulse ~/.config/pulse_old

    and give it a shot, via logging in again or rebooting
    or whatever. (Maybe stopping the service and starting
    it again would be enough.)

    With ALSA it was simpler, in the sense that the users
    effort concentrated on the hardware device and "not some daemon".
    Whereas with pulseaudio, the daemon part is a distraction.
    And ALSA is still there, as a "driver level thing".

    *******

    Audio sensing:

    The HDAudio spec, has "jack side-contact sensing". The tip of
    the analog plug, causes a side contact to close. This is
    a form of electromechanical sensing, that "something" was plugged in.
    This forced people to write control panels like this:

    "I sense you plugged something in.

    Was it headphones, speakers, microphone or what ?"

    Analog Devices (SoundMax), they included an AC impedance
    measurement feature. if something caused the Analog Devices
    thing to consider "hmmm, I think something just plugged in",
    they would apply a 25KHz audio signal, then measure the
    current flow through the load. They could tell the difference
    between amplified computer speakers (10Kohm), line level load
    (600 ohms), or headphones (32 ohms). This allows the hardware+driver
    to automatically take a best guess and configure for it.

    Analog Devices presumably had a patent on it. RealTek at the
    time, could not use it (without a license). However, a few
    years later, AD decided to get out of HDAudio (not enough
    profit at a guess, thanks to RealTek), and while getting
    out of HDAudio, they may have sold off the patent. This
    may allow others to auto-sense output type, at some point
    in the future.

    Summary: As you'd expect, you have to track down your personal
    ~/.config and have a look at it. You've already tested
    the controls and found them wanting, so maybe looking
    at the files would help. Since there are also /etc files,
    maybe a toggling from one state to another, is caused
    by some ~/.config getting re-created each time, and blowing
    away your own changes ?

    Paul
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From W Pulaska@nsd@nda.net to alt.os.linux.ubuntu on Mon Jun 7 10:10:59 2021
    From Newsgroup: alt.os.linux.ubuntu

    On 6/6/21 10:35 PM, Paul wrote:
    W Pulaska wrote:
    On 6/6/21 2:17 PM, W Pulaska wrote:
    I'm on 18.04.  Just wondering why at boot up, even after have have
    set output to speakers, that it keeps going back to headphones and I >>> have to go in and manually switch back to speakers?  How to remedy?

    Anyone?  I've been at this off and on all day.  I have Audacity
    installed and sometimes settings made in there seem to effect the
    entire OS, so I reset it to default just in case.  Also reset
    pulseaudio and went in to alsamixer and tried to adjust the settings
    there.


    When I go to sound settings, I see speakers under output.  Test sound
    does nothing.  It is not muted.   When I had a video playing, it
    showed under the applications section with volume all the way up but
    no sound.

    If I go into pulseaudio, under "output devices" and "speakers"
    selected as port,   the meter is moving there as a video plays, but no
    sound unless I choose headphones (unplugged), then I get audio through
    the speakers.  As I said, upon reboot, this setting does not stay and
    defaults back to speakers at which point there is no audio again.

    Thanks in advance.


    https://wiki.archlinux.org/title/PulseAudio/Troubleshooting

       /etc/pulse/daemon.conf      # engine?
       /etc/pulse/default.pa       # sources/sinks?

       pactl list sinks            # list outputs?
       pacmd list-cards            # your HDAudio chip, the NVidia HDMI,
    and so on

       ~/.config/pulse/default.pa  # your personal settings?
       ~/.asoundrc                 # only if bodging ALSA to make something
    work ("dmix").

    https://manpages.ubuntu.com/manpages/trusty/en/man5/pulse-client.conf.5.html


       ~/.config/pulse/client.conf # seems similar to default.pa>
    They claim removing the contents of ~/.config/pulse could
    cause a new set of files to be generated for it. You could
    just rename it

       mv ~/.config/pulse ~/.config/pulse_old

    and give it a shot, via logging in again or rebooting
    or whatever. (Maybe stopping the service and starting
    it again would be enough.)
    Tried this, but didn't work unfortunately.
    With ALSA it was simpler, in the sense that the users
    effort concentrated on the hardware device and "not some daemon".
    Whereas with pulseaudio, the daemon part is a distraction.
    And ALSA is still there, as a "driver level thing".

    *******

    Audio sensing:

    The HDAudio spec, has "jack side-contact sensing". The tip of
    the analog plug, causes a side contact to close. This is
    a form of electromechanical sensing, that "something" was plugged in.
    This forced people to write control panels like this:

        "I sense you plugged something in.

         Was it headphones, speakers, microphone or what ?"

    Analog Devices (SoundMax), they included an AC impedance
    measurement feature. if something caused the Analog Devices
    thing to consider "hmmm, I think something just plugged in",
    they would apply a 25KHz audio signal, then measure the
    current flow through the load. They could tell the difference
    between amplified computer speakers (10Kohm), line level load
    (600 ohms), or headphones (32 ohms). This allows the hardware+driver
    to automatically take a best guess and configure for it.

    Analog Devices presumably had a patent on it. RealTek at the
    time, could not use it (without a license). However, a few
    years later, AD decided to get out of HDAudio (not enough
    profit at a guess, thanks to RealTek), and while getting
    out of HDAudio, they may have sold off the patent. This
    may allow others to auto-sense output type, at some point
    in the future.

    Summary: As you'd expect, you have to track down your personal
             ~/.config and have a look at it. You've already tested
             the controls and found them wanting, so maybe looking
             at the files would help. Since there are also /etc files,
             maybe a toggling from one state to another, is caused
             by some ~/.config getting re-created each time, and blowing
             away your own changes ?

       Paul
    Well, I also opened up the default.pa file and added the following at
    the bottom after first determining the correct device ID while I had a
    video playing:
    ### Make some devices default
    set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo
    #set-default-source input
    However, even this didn't help.
    I was wrong about something. Upon boot up, pulse audio has defaulted
    back to "speakers" (at which point there's no audio) and I have to
    manually choose "headphones (unplugged)" to get audio back from speakers.--- Synchronet 3.18a-Linux NewsLink 1.113
  • From Paul@nospam@needed.invalid to alt.os.linux.ubuntu on Mon Jun 7 10:52:57 2021
    From Newsgroup: alt.os.linux.ubuntu

    W Pulaska wrote:


    Well, I also opened up the default.pa file and added the following at
    the bottom after first determining the correct device ID while I had a
    video playing:

    ### Make some devices default
    set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo #set-default-source input

    However, even this didn't help.

    I was wrong about something. Upon boot up, pulse audio has defaulted
    back to "speakers" (at which point there's no audio) and I have to
    manually choose "headphones (unplugged)" to get audio back from speakers.

    The behavior is a bit weird.

    I tried a 20.04 here and it defaulted to headphones (on Lime colored Lineout) and switching to Speakers (on Lime colored Lineout) did not seem to
    change the HRTF behavior. The "transform" for headphones is
    different than the one for speakers. When you wear headphones,
    the emitters are much closer to your ears, and for stereo
    separation, the signal Transfer Function might need to be adjusted
    a bit by the software.

    One other difference should be, "Speakers" uses 600 ohm drive
    in HDAudio, while "Headphones" uses 32 ohm drive. The tiny amount
    of power amplification comes at a price of increased noise
    floor in headphone mode. (On one audio card in the past, they
    claimed the noise floor was 10dB higher on headphone.)

    I looked at some of the files in the .config/pulse and can't
    see anything a human or a user can relate to :-/ And I'm not sure
    that ALSA is sufficiently in control, to do anything. As far as
    I know, Pulseaudio is in control and ALSA is just a driver to
    pass signals.

    There's got to be a config file somewhere which is getting
    updates when you change the GUI. Like, some sort of desktop file.

    Paul

    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Mike Scott@usenet.16@scottsonline.org.uk.invalid to alt.os.linux.ubuntu on Tue Jun 8 08:30:05 2021
    From Newsgroup: alt.os.linux.ubuntu

    On 07/06/2021 15:52, Paul wrote:
    W Pulaska wrote:
    ....
    I looked at some of the files in the .config/pulse and can't
    see anything a human or a user can relate to :-/ And I'm not sure
    that ALSA is sufficiently in control, to do anything. As far as
    I know, Pulseaudio is in control and ALSA is just a driver to
    pass signals.

    There's got to be a config file somewhere which is getting
    updates when you change the GUI. Like, some sort of desktop file.

       Paul


    This is all sounding vaguely related to an issue I've had - plugging in
    a usb 'sound card' caused my laptop's internal phones output to stop
    working. Clears IIRC with rm ~/.config/pulse/*; pulseaudio -k; and a
    reboot. Never got to the bottom of it. (Mint 20, btw)

    Is there a definitive guide to pulse and its quirks?

    --
    Mike Scott
    Harlow, England
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Paul@nospam@needed.invalid to alt.os.linux.ubuntu on Tue Jun 8 08:41:18 2021
    From Newsgroup: alt.os.linux.ubuntu

    Mike Scott wrote:
    On 07/06/2021 15:52, Paul wrote:
    W Pulaska wrote:
    ....
    I looked at some of the files in the .config/pulse and can't
    see anything a human or a user can relate to :-/ And I'm not sure
    that ALSA is sufficiently in control, to do anything. As far as
    I know, Pulseaudio is in control and ALSA is just a driver to
    pass signals.

    There's got to be a config file somewhere which is getting
    updates when you change the GUI. Like, some sort of desktop file.

    Paul


    This is all sounding vaguely related to an issue I've had - plugging in
    a usb 'sound card' caused my laptop's internal phones output to stop working. Clears IIRC with rm ~/.config/pulse/*; pulseaudio -k; and a
    reboot. Never got to the bottom of it. (Mint 20, btw)

    Is there a definitive guide to pulse and its quirks?


    I don't know about you, but I'm having a lot of trouble
    these days with getting results from search engines.

    For example, yesterday, I was trying to dig up a reference
    to a good site that used to be around. I tried, different
    times of the day, and not a sniff. Not anything even close.

    Usually an Arch page has lots of meat on things to look
    for. But, I mean, I wasn't even seeing the usual stuff
    about Stereo, 5.1, and 7.1 yesterday.

    The difference between the two settings electrically
    (Speakers, Headphones), is the first has Boost OFF, the
    second has Boost ON. It's the same connector, so we can't
    argue they haven't wired it up. Boost ON means the "power amp"
    to drive a 32 ohm load is enabled. It's actual electrical
    impedance is supposed to be closer to 1 ohm (and I don't
    even know if it's current limited, to protect the port
    against short circuits). Up to two Boost can be on at the
    same time, so the Front Headphone jack and the Rear Lime jack
    can both drive headphones, from an electrical perspective.
    But the chip companies refuse to enable Boost on three output
    connectors (to drive Zalman 5.1 headphones). In the old
    days, you got 32/600/600 ohm drive for the three plugs, and
    the headphones "didn't sound right".

    *******

    https://unix.stackexchange.com/questions/111428/how-do-i-configure-pulseaudio-for-7-1-surround-sound-over-hdmi

    "According to the documentation, you could disable
    udev-based autodiscovery, and manually configure
    everything - that lets you specify the full path
    to a profile."

    Perhaps then, udev is playing a part in the wrong
    thing being "defaulted" and what udev determines
    is overriding "user choice".

    Paul
    --- Synchronet 3.18a-Linux NewsLink 1.113