Sound changes to wrong device & output, shows speakers in line out always as 'unplugged'

Scenario: I’ve HP Probook G1 Intel Haswell -laptop in dock connected with speakers in ‘Line out’ and that’s output mostly. Sometimes I use USB-headset which stays connected and I only change output. This used to work fine until recently. I have HDMI output but it should be never used. TW has recent updates and kernel.

Problem: In Xfce’s Pulse audio plugin it defaults to wrong device: HDMI or USB-headset. if I try to change device to ‘Built-in Audio Analog Stereo’ it doesn’t have an effect (plugin shows shows the same device). In pavucontrol ‘Output devices’ -tab sound device: Built-in Audio Analog Stereo port keeps changing to. Speakers if I set it to ‘Line out’, it shows it as ‘Line Out (unplugged)’. I assume that’s related to problem.

If I then play something in pavucontrol Playback section the device keeps changing to wrong setting too. If I change it to analog stereo, I can hear the sound from speakers just fine.

How could I make ‘Built-in Audio Analog Stereo’ output always be the ‘Line out’ and make that the default when playing something? (as it has been before)

  • would be nice if I could get the HDMI-device off permanently as I never use it. changing it in pavucontrol doesn’t stay.

‘Line out’ the output and make it stay until I need to change it to USB-headset as I’ve done before?

Extra info:

  • I’ve tried different speakers and it has same outcome.
  • USB-headset’s port shows in pavucontrol as Speakers, don’t know it should do that.
 $ cat /proc/asound/cards
 0 [HDMI           ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xd0730000 irq 33
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xd0734000 irq 34

$ arecord -L                                                                             
    Discard all samples (playback) or generate zero samples (capture)
    PulseAudio Sound Server
    Default ALSA Output (currently PulseAudio Sound Server)
    HDA Intel HDMI
    USB Stream Output
    HDA Intel PCH, 92HD91BXX Analog
    Default Audio Device
    HDA Intel PCH, 92HD91BXX Analog
    Front speakers
    HDA Intel PCH
    USB Stream Output

See if this helps with setting the default sink…

I did as suggested there and set ‘set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo’ at bottom of the file and restared pulse but doesn’t affect the problem.
If I could just force pulse to accept somehow that the Line out is plugged. I’ve ofc unplugged and plugged it several times but pulse remains determined that it’s unplugged.

  • I’ve also deleted ~/.config/pulse and reinstalled alsa & pulse, but it just the same.

outputs of
pacmd list-cards: SUSE Paste
amixer -c0 contents: SUSE Paste

You need to set the active port. Check the current active port using…

pacmd list-sinks


pacmd list | grep "active port"

Assuming card 1, try executing something like

pacmd set-sink-port 1 analog-output-lineout

If that works as desired, you can set it permanently by adding the following entry to /etc/pulse/

set-sink-port 1 analog-output-lineout

I can change the port of card to “Line Out (unplugged)” via pavucontrol or pactl so it’s right. The problem then is the default/fallback device which I haven’t yet been able to change. AFAIK that’s used when I for example open new web page which plays audio. It’s then either HDMI or USB-headset depending if USB-headset is plugged or not. After command ‘pactl set-default-sink 1’ or ‘pactl set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo’ gives no output but ‘pacmd list-sinks’ still shows asterix on either HDMI- or USB-device and new web pages play audio through that.

In pavucontrol’s output -tab I can’t make only analog stereo’s fallback icon being selected. either HDMI/USB is being selected or HDMI/USB and analog stereo.

I can change device on Playpack-tab but I have to do it every time new application starts playing audio.

output of pacmd list-sinks

So you haven’t been able to set line out as default via /etc/pulse/ entry to set the sink port?

Just in case this is relevant here…

This looks as expected…

                analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: no)
                analog-output-speaker: Speakers (priority 1000, latency offset 0 usec, available: unknown)
                                device.icon_name = "audio-speakers"

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                                device.icon_name = "audio-headphones"

        active port: <analog-output-lineout>

For some reason, it’s just start to work! (atleast for now :-). So for new applications analog stereo is selected and sound comes from speakers. In pavucontrol analog stereo’s output is set to Speakers which I thought meant just the laptop’s internal speakers since there’s no other port for that, but the sound comes from the speakers connected with line out :-o Before when that output was selected sound did come from laptop’s internal speakers. Don’t know why that changed but now it works as it should.

I have added the default as is seen below but new sound applications sounds sink had been HDMI/USB nevertheless.

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

Ok now I think I figured out where the problem is. If I change the angle where laptop sits on dock, the sound begins to come from speakers connected to lineout and I finallyget pavucontrol to show “Line out (plugged)”. Also if I move it, it goes to “Line out (unplugged)”. I didn’t realize that connection between laptop and dock could be a problem since all other cables connected to dock for without problems.

Good to find something definitive about the connection behaviour though. :slight_smile: