Bug 73375

Summary: Pulse Audio settings lost after reboot / HDMI is set as default
Product: PulseAudio Reporter: Fish <aaf_fake-freedesktop>
Component: pavucontrolAssignee: pulseaudio-bugs
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: gnome, lennart, tobias.pal
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 75721    
Attachments: pulseaudio log output, comment 6, step 5
pulseaudio log output, comment 6, step 8
pactl log output, comment 6, step 7
Output from alsa-info.sh
Output of "pactl list"
Output of "pulseaudio -vvv" after killing pulseaudio, wrong profile is active
Output of "pulseaudio -vvv" after changing the audio profile to analog and restarting pulseaudio

Description Fish 2014-01-07 22:16:52 UTC
My default audio is being sent to my HDMI output instead of my Analog output. This change happened after upgrading from Xubuntu 13.04 to 13:10 (64-bit). If I use Pavucontrol to change my settings, they are lost after I reboot. So there are 2 problems:

1. My default uses the HDMI instead of the Analog output.
2. Changing the above doesn't persist after a reboot.

The pulse-audio Volume Control doesn't have my Analogue Output as a valid option in the Output Devices tab; it appears only after I select Analogue Stereo within the Configuration tab. I then choose it as my "fallback" device (which I think means default device?), but my changes are not saved between reboots.

After changing the output device to Analogue Stereo using the Configuration tab, I then have to change the output of the individual program using the Playback tab, since it uses the current default (HDMI).

I've tried setting my default audio device using pacmd, but it hasn't helped: my Analogue device does show up as the active sink when I run pacmd list-sinks, but it's not the selected device within the Volume Control (in the Configuration tab) so I don't get any sound unless I manually change it using the GUI.

Here's the output of some pactl commands after I start my PC - note that the Analog Stereo source is missing:

$ pactl list sources short
0 alsa_input.usb-046d_08b2-01-U0x46d0x8b2.analog-mono module-alsa-card.c s16le 1ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_1b.0.hdmi-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz SUSPENDED

$ pactl list sinks short
0 alsa_output.pci-0000_00_1b.0.hdmi-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED

After I open the pulse-audio Volume Control and select the "Analog Stereo" item from the Configuration tab, running the same commands again gives:

$ pactl list sources short
0 alsa_input.usb-046d_08b2-01-U0x46d0x8b2.analog-mono module-alsa-card.c s16le 1ch 44100Hz IDLE
1 alsa_output.pci-0000_00_1b.0.hdmi-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz IDLE
2 alsa_output.pci-0000_00_1b.0.analog-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz IDLE

$ pactl list sinks short
0 alsa_output.pci-0000_00_1b.0.hdmi-stereo module-alsa-card.c s16le 2ch 44100Hz IDLE
1 alsa_output.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz IDLE

The Analogue Stereo source is present and I can hear sound through my PC's speakers. But when I reboot my PC these settings are lost, and I have to do this over again. I wouldn't mind so much if I could fix this from the command line, but I haven't found a way to do that.

I originally raised this bug on Ubuntu's Launchpad, so you might find some useful information from other users there:

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1256511
Comment 1 Raymond 2014-02-16 02:42:16 UTC
do you mean the module-switch-on-port-available change the default sink or pulseaudio did not remember your default setting after reboot ?
Comment 2 Fish 2014-03-03 20:26:19 UTC
(In reply to comment #1)
> do you mean the module-switch-on-port-available change the default sink or
> pulseaudio did not remember your default setting after reboot ?

Both (I think). The default sink changed after the upgrade, and when I changed it back using the pulse-audio Volume Control the new settings were lost after I rebooted.
Comment 3 Raymond 2014-03-04 00:59:41 UTC
Default sink name: alsa_output.pci-0000_00_1b.0.hdmi-stereo
Default source name: alsa_input.usb-046d_08b2-01-U0x46d0x8b2.analog-mono

post output of 

pactl list sinks

do the state of your analog outputs are available and higher priority than your hdmi ?
Comment 4 Fish 2014-03-08 15:10:11 UTC
(In reply to comment #3)
> Default sink name: alsa_output.pci-0000_00_1b.0.hdmi-stereo
> Default source name: alsa_input.usb-046d_08b2-01-U0x46d0x8b2.analog-mono
> 
> post output of 
> 
> pactl list sinks
> 
> do the state of your analog outputs are available and higher priority than
> your hdmi ?

Below is what I get when my HDMI cable is plugged in (I usually leave it unplugged to avoid the problem).

$ pactl list sinks
Sink #0
	State: SUSPENDED
	Name: alsa_output.pci-0000_00_1b.0.hdmi-stereo
	Description: Built-in Audio Digital Stereo (HDMI)
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 6
	Mute: no
	Volume: 0:  45% 1:  45%
	        0: -20.80 dB 1: -20.80 dB
	        balance 0.00
	Base Volume: 100%
	             0.00 dB
	Monitor Source: alsa_output.pci-0000_00_1b.0.hdmi-stereo.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "HDMI 0"
		alsa.id = "HDMI 0"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "3"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xf7c10000 irq 45"
		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 = "1e20"
		device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "hdmi:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "hdmi-stereo"
		device.profile.description = "Digital Stereo (HDMI)"
		device.description = "Built-in Audio Digital Stereo (HDMI)"
		alsa.mixer_name = "Intel PantherPoint HDMI"
		alsa.components = "HDA:10ec0892,1462f758,00100302 HDA:80862806,80860101,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Ports:
		hdmi-output-0: HDMI / DisplayPort (priority: 5900, available)
	Active Port: hdmi-output-0
	Formats:
		pcm
Comment 5 Raymond 2014-03-09 03:02:34 UTC
post output of 

xrandr --verbose



xrandr --help

seem have option to enable HDMI video but disable HDMI audio
Comment 6 Tanu Kaskinen 2014-03-09 08:13:05 UTC
module-switch-on-port-available should not automatically change the card profile from analog to hdmi, and when you switch the profile with pavucontrol, that choice should be remembered... I'd like to see PulseAudio logs.

Could you do this:

1) Disable autospawning:
        echo autospawn = no >> ~/.config/pulse/client.conf

2) Stop pulseaudio:
        killall pulseaudio

3) Start pulseaudio in a terminal:
        pulseaudio -vvv

4) Set the card profile:
        pactl set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo

5) Stop pulseaudio with Ctrl-C and save the log output.

6) Start pulseaudio again:
        pulseaudio -vvv

7) Check the active card profile:
        pactl list cards

8) Stop pulseaudio with Ctrl-C and save the log output.

9) Attach the logs from steps 5 and 8 and the pactl output from step 7 to this bug.
Comment 7 Fish 2014-03-09 22:08:46 UTC
(In reply to comment #5)
> post output of 
> 
> xrandr --verbose
> 
> 
> 
> xrandr --help
> 
> seem have option to enable HDMI video but disable HDMI audio

My monitor has a HDMI input and also an audio input (analogue), but I don't use them.

$ xrandr --verbose
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 32767 x 32767
VGA1 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x43
	Timestamp:  17228
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1 2
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
HDMI1 connected 1920x1080+0+0 (0x4a) normal (normal left inverted right x axis y axis) 531mm x 298mm
	Identifier: 0x44
	Timestamp:  17228
	Subpixel:   unknown
	Gamma:      1.0:1.0:1.0
	Brightness: 1.0
	Clones:    
	CRTC:       0
	CRTCs:      0 1 2
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	EDID: 
		00ffffffffffff0009d1a77845540000
		2116010380351e782eba45a159559d28
		0d5054a56b80810081c08180a9c0b300
		d1c001010101023a801871382d40582c
		4500132a2100001e000000ff004d3843
		3036313533534c300a20000000fd0032
		4c1e5311000a202020202020000000fc
		0042656e5120474c32343530480a0011
	Broadcast RGB: Automatic 
		supported: AutomaticFullLimited 16:235
	audio: auto 
		supported: force-dvioffautoon
  1920x1080 (0x4a)  148.5MHz +HSync +VSync *current +preferred
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   67.5KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   60.0Hz
  1680x1050 (0xb3)  119.0MHz +HSync -VSync
        h: width  1680 start 1728 end 1760 total 1840 skew    0 clock   64.7KHz
        v: height 1050 start 1053 end 1059 total 1080           clock   59.9Hz
  1600x900 (0xb4)  119.0MHz -HSync +VSync
        h: width  1600 start 1696 end 1864 total 2128 skew    0 clock   55.9KHz
        v: height  900 start  901 end  904 total  932           clock   60.0Hz
  1280x1024 (0xb5)  135.0MHz +HSync +VSync
        h: width  1280 start 1296 end 1440 total 1688 skew    0 clock   80.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   75.0Hz
  1280x1024 (0xb6)  108.0MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock   64.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   60.0Hz
  1280x800 (0xb7)   71.0MHz +HSync -VSync
        h: width  1280 start 1328 end 1360 total 1440 skew    0 clock   49.3KHz
        v: height  800 start  803 end  809 total  823           clock   59.9Hz
  1152x864 (0xb8)  108.0MHz +HSync +VSync
        h: width  1152 start 1216 end 1344 total 1600 skew    0 clock   67.5KHz
        v: height  864 start  865 end  868 total  900           clock   75.0Hz
  1280x720 (0xb9)   74.4MHz -HSync +VSync
        h: width  1280 start 1336 end 1472 total 1664 skew    0 clock   44.7KHz
        v: height  720 start  721 end  724 total  746           clock   60.0Hz
  1024x768 (0xba)   78.8MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock   60.1KHz
        v: height  768 start  769 end  772 total  800           clock   75.1Hz
  1024x768 (0xbb)   65.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  832x624 (0xbc)   57.3MHz -HSync -VSync
        h: width   832 start  864 end  928 total 1152 skew    0 clock   49.7KHz
        v: height  624 start  625 end  628 total  667           clock   74.6Hz
  800x600 (0xbd)   49.5MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock   46.9KHz
        v: height  600 start  601 end  604 total  625           clock   75.0Hz
  800x600 (0xbe)   40.0MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  640x480 (0xbf)   31.5MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock   37.5KHz
        v: height  480 start  481 end  484 total  500           clock   75.0Hz
  640x480 (0xc0)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   60.0Hz
  720x400 (0xc1)   28.3MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock   31.5KHz
        v: height  400 start  412 end  414 total  449           clock   70.1Hz
DP1 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x45
	Timestamp:  17228
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1 2
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	Broadcast RGB: Automatic 
		supported: AutomaticFullLimited 16:235
	audio: auto 
		supported: force-dvioffautoon
HDMI2 connected 1920x1080+0+0 (0x4a) normal (normal left inverted right x axis y axis) 160mm x 90mm
	Identifier: 0x46
	Timestamp:  17228
	Subpixel:   unknown
	Gamma:      1.0:1.0:1.0
	Brightness: 1.0
	Clones:    
	CRTC:       1
	CRTCs:      0 1 2
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	EDID: 
		00ffffffffffff004c2d020900000000
		29150103805932780aee91a3544c9926
		0f5054bdef80714f81c0810081809500
		a9c0b3000101023a801871382d40582c
		4500a05a0000001e662156aa51001e30
		468f3300a05a0000001e000000fd0018
		4b0f5117000a202020202020000000fc
		0053414d53554e470a202020202001a6
		020325f14d901f041305140312202122
		07162309070783010000e2000f67030c
		001000b82d011d80d0721c1620102c25
		80a05a0000009e011d8018711c162058
		2c2500a05a0000009e011d00bc52d01e
		20b8285540a05a0000001e011d007251
		d01e206e285500a05a0000001e000000
		000000000000000000000000000000ec
	Broadcast RGB: Automatic 
		supported: AutomaticFullLimited 16:235
	audio: auto 
		supported: force-dvioffautoon
  1920x1080 (0x4a)  148.5MHz +HSync +VSync *current +preferred
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   67.5KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   60.0Hz
  1920x1080 (0xc2)  148.5MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock   56.2KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   50.0Hz
  1920x1080 (0xc3)  148.4MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   67.4KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   59.9Hz
  1920x1080i (0xc4)   74.2MHz +HSync +VSync Interlace
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   33.8KHz
        v: height 1080 start 1084 end 1094 total 1125           clock   60.1Hz
  1920x1080i (0xc5)   74.2MHz +HSync +VSync Interlace
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock   28.1KHz
        v: height 1080 start 1084 end 1094 total 1125           clock   50.0Hz
  1920x1080 (0xc6)   74.2MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   33.8KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   30.0Hz
  1920x1080 (0xc7)   74.2MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock   28.1KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   25.0Hz
  1920x1080 (0xc8)   74.2MHz +HSync +VSync
        h: width  1920 start 2558 end 2602 total 2750 skew    0 clock   27.0KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   24.0Hz
  1920x1080i (0xc9)   74.2MHz +HSync +VSync Interlace
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   33.7KHz
        v: height 1080 start 1084 end 1094 total 1125           clock   60.0Hz
  1920x1080 (0xca)   74.2MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   33.7KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   30.0Hz
  1920x1080 (0xcb)   74.2MHz +HSync +VSync
        h: width  1920 start 2558 end 2602 total 2750 skew    0 clock   27.0KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   24.0Hz
  1680x1050 (0xb3)  119.0MHz +HSync -VSync
        h: width  1680 start 1728 end 1760 total 1840 skew    0 clock   64.7KHz
        v: height 1050 start 1053 end 1059 total 1080           clock   59.9Hz
  1600x900 (0xb4)  119.0MHz -HSync +VSync
        h: width  1600 start 1696 end 1864 total 2128 skew    0 clock   55.9KHz
        v: height  900 start  901 end  904 total  932           clock   60.0Hz
  1280x1024 (0xb5)  135.0MHz +HSync +VSync
        h: width  1280 start 1296 end 1440 total 1688 skew    0 clock   80.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   75.0Hz
  1280x1024 (0xb6)  108.0MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock   64.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   60.0Hz
  1440x900 (0xcc)   88.8MHz +HSync -VSync
        h: width  1440 start 1488 end 1520 total 1600 skew    0 clock   55.5KHz
        v: height  900 start  903 end  909 total  926           clock   59.9Hz
  1366x768 (0xcd)   85.5MHz +HSync +VSync
        h: width  1366 start 1436 end 1579 total 1792 skew    0 clock   47.7KHz
        v: height  768 start  771 end  774 total  798           clock   59.8Hz
  1280x800 (0xb7)   71.0MHz +HSync -VSync
        h: width  1280 start 1328 end 1360 total 1440 skew    0 clock   49.3KHz
        v: height  800 start  803 end  809 total  823           clock   59.9Hz
  1152x864 (0xb8)  108.0MHz +HSync +VSync
        h: width  1152 start 1216 end 1344 total 1600 skew    0 clock   67.5KHz
        v: height  864 start  865 end  868 total  900           clock   75.0Hz
  1280x720 (0xce)   74.2MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock   45.0KHz
        v: height  720 start  725 end  730 total  750           clock   60.0Hz
  1280x720 (0xcf)   74.2MHz +HSync +VSync
        h: width  1280 start 1720 end 1760 total 1980 skew    0 clock   37.5KHz
        v: height  720 start  725 end  730 total  750           clock   50.0Hz
  1280x720 (0xd0)   74.2MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock   45.0KHz
        v: height  720 start  725 end  730 total  750           clock   59.9Hz
  1440x576i (0xd1)   27.0MHz -HSync -VSync Interlace
        h: width  1440 start 1464 end 1590 total 1728 skew    0 clock   15.6KHz
        v: height  576 start  580 end  586 total  625           clock   50.1Hz
  1024x768 (0xba)   78.8MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock   60.1KHz
        v: height  768 start  769 end  772 total  800           clock   75.1Hz
  1024x768 (0xd2)   75.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1328 skew    0 clock   56.5KHz
        v: height  768 start  771 end  777 total  806           clock   70.1Hz
  1024x768 (0xbb)   65.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  1440x480i (0xd3)   27.0MHz -HSync -VSync Interlace
        h: width  1440 start 1478 end 1602 total 1716 skew    0 clock   15.8KHz
        v: height  480 start  488 end  494 total  525           clock   60.1Hz
  1440x480i (0xd4)   27.0MHz -HSync -VSync Interlace
        h: width  1440 start 1478 end 1602 total 1716 skew    0 clock   15.7KHz
        v: height  480 start  488 end  494 total  525           clock   60.1Hz
  832x624 (0xbc)   57.3MHz -HSync -VSync
        h: width   832 start  864 end  928 total 1152 skew    0 clock   49.7KHz
        v: height  624 start  625 end  628 total  667           clock   74.6Hz
  800x600 (0xd5)   50.0MHz +HSync +VSync
        h: width   800 start  856 end  976 total 1040 skew    0 clock   48.1KHz
        v: height  600 start  637 end  643 total  666           clock   72.2Hz
  800x600 (0xbd)   49.5MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock   46.9KHz
        v: height  600 start  601 end  604 total  625           clock   75.0Hz
  800x600 (0xbe)   40.0MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  720x576 (0xd6)   27.0MHz -HSync -VSync
        h: width   720 start  732 end  796 total  864 skew    0 clock   31.2KHz
        v: height  576 start  581 end  586 total  625           clock   50.0Hz
  720x480 (0xd7)   27.0MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock   31.5KHz
        v: height  480 start  489 end  495 total  525           clock   60.0Hz
  720x480 (0xd8)   27.0MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock   31.5KHz
        v: height  480 start  489 end  495 total  525           clock   59.9Hz
  640x480 (0xbf)   31.5MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock   37.5KHz
        v: height  480 start  481 end  484 total  500           clock   75.0Hz
  640x480 (0xd9)   31.5MHz -HSync -VSync
        h: width   640 start  664 end  704 total  832 skew    0 clock   37.9KHz
        v: height  480 start  489 end  491 total  520           clock   72.8Hz
  640x480 (0xda)   30.2MHz -HSync -VSync
        h: width   640 start  704 end  768 total  864 skew    0 clock   35.0KHz
        v: height  480 start  483 end  486 total  525           clock   66.7Hz
  640x480 (0xc0)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   60.0Hz
  640x480 (0xdb)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   59.9Hz
  720x400 (0xc1)   28.3MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock   31.5KHz
        v: height  400 start  412 end  414 total  449           clock   70.1Hz
DP2 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x47
	Timestamp:  17228
	Subpixel:   unknown
	Clones:    
	CRTCs:      0 1 2
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	Broadcast RGB: Automatic 
		supported: AutomaticFullLimited 16:235
	audio: auto 
		supported: force-dvioffautoon
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x48
	Timestamp:  17228
	Subpixel:   no subpixels
	Clones:    
	CRTCs:      3
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter:
Comment 8 Fish 2014-03-09 23:31:21 UTC
Created attachment 95478 [details]
pulseaudio log output, comment 6, step 5
Comment 9 Fish 2014-03-09 23:32:04 UTC
Created attachment 95479 [details]
pulseaudio log output, comment 6, step 8
Comment 10 Fish 2014-03-09 23:33:23 UTC
Created attachment 95480 [details]
pactl log output, comment 6, step 7
Comment 11 Raymond 2014-03-10 03:53:45 UTC
post the output of alsa-info.sh


haswell suport multistreaming , but pulseaudio does not

you have two hdmi monitors connected to HDMI1 and HDMI2

1) Manufacturer: BNQ Model 78a7 Serial Number 21573
2) Manufacturer: SAM Model 902 Serial Number 0




HDMI1 connected 1920x1080+0+0 (0x4a) normal (normal left inverted right x axis y axis) 531mm x 298mm
	EDID: 
		00ffffffffffff0009d1a77845540000
		2116010380351e782eba45a159559d28
		0d5054a56b80810081c08180a9c0b300
		d1c001010101023a801871382d40582c
		4500132a2100001e000000ff004d3843
		3036313533534c300a20000000fd0032
		4c1e5311000a202020202020000000fc
		0042656e5120474c32343530480a0011
	Broadcast RGB: Automatic 
		supported: AutomaticFullLimited 16:235
	audio: auto 
		supported: force-dvioffautoon
 
DP1 disconnected (normal left inverted right x axis y axis)
	Identifier: 0x45
	audio: auto 
		supported: force-dvioffautoon

HDMI2 connected 1920x1080+0+0 (0x4a) normal (normal left inverted right x axis y axis) 160mm x 90mm
	Identifier: 0x46
	
	EDID: 
		00ffffffffffff004c2d020900000000
		29150103805932780aee91a3544c9926
		0f5054bdef80714f81c0810081809500
		a9c0b3000101023a801871382d40582c
		4500a05a0000001e662156aa51001e30
		468f3300a05a0000001e000000fd0018
		4b0f5117000a202020202020000000fc
		0053414d53554e470a202020202001a6
		020325f14d901f041305140312202122
		07162309070783010000e2000f67030c
		001000b82d011d80d0721c1620102c25
		80a05a0000009e011d8018711c162058
		2c2500a05a0000009e011d00bc52d01e
		20b8285540a05a0000001e011d007251
		d01e206e285500a05a0000001e000000
		000000000000000000000000000000ec
	Broadcast RGB: Automatic 
		supported: AutomaticFullLimited 16:235
	audio: auto 
		supported: force-dvioffautoon


DP2 disconnected (normal left inverted right x axis y axis)
	audio: auto 
		supported: force-dvioffautoon
Comment 12 Raymond 2014-03-10 04:24:15 UTC
Active Profile: output:hdmi-stereo
	Ports:
		analog-input-microphone-front: Front Microphone (priority: 8500, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "audio-input-microphone"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:analog-surround-71+input:analog-stereo, output:hdmi-stereo+input:analog-stereo
		analog-input-microphone-rear: Rear Microphone (priority: 8200, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "audio-input-microphone"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:analog-surround-71+input:analog-stereo, output:hdmi-stereo+input:analog-stereo
		analog-input-linein: Line In (priority: 8100, latency offset: 0 usec, not available)
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, output:analog-surround-71+input:analog-stereo, output:hdmi-stereo+input:analog-stereo
		analog-output: Analogue Output (priority: 9900, latency offset: 0 usec)
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40, output:analog-surround-40+input:analog-stereo, output:analog-surround-41, output:analog-surround-41+input:analog-stereo, output:analog-surround-50, output:analog-surround-50+input:analog-stereo, output:analog-surround-51, output:analog-surround-51+input:analog-stereo, output:analog-surround-71, output:analog-surround-71+input:analog-stereo
		analog-output-headphones: Headphones (priority: 9000, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "audio-headphones"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
		hdmi-output-0: HDMI / DisplayPort (priority: 5900, latency offset: 0 usec, available)
			Properties:
				device.icon_name = "video-display"
				device.product.name = "SAMSUNG"
			Part of profile(s): output:hdmi-stereo, output:hdmi-stereo+input:analog-stereo
Comment 13 Tanu Kaskinen 2014-03-10 08:53:35 UTC
Ok, so module-card-restore claims to be selecting the analog profile when the card is created, but actually the hdmi profile gets selected. It might be that module-switch-on-port-available is overriding the profile choice made by module-card-restore. I believe that's not supposed to happen, so that's the first bug.

Another very weird bug is that when the analog profile is activated via pactl, the hdmi sink doesn't get removed. This was actually visible already in your initial bug description, but I didn't notice that.

I really would like to get these issues fixed by the time 6.0 is released, so I'll make this a release blocker, but I'm afraid it will take a while before I have time to properly start working on this bug.
Comment 14 Fish 2014-03-10 23:43:55 UTC
Created attachment 95563 [details]
Output from alsa-info.sh

sudo /usr/share/alsa-base/alsa-info.sh

A newer version of alsa-info was available for installation, but I ignored it.
Comment 15 Fish 2014-03-10 23:46:36 UTC
(In reply to comment #11)
> post the output of alsa-info.sh
> you have two hdmi monitors connected to HDMI1 and HDMI2
> 

I've attached the output of alsa-info.sh. 

My PC monitor is BNQ (BenQ); my TV is SAM (Samsung).
Comment 16 Raymond 2014-03-11 08:17:32 UTC
ELD seem belong to  samsung monitor 

	control.42 {
		iface CARD
		name 'HDMI/DP,pcm=3 Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}

	control.47 {
		iface PCM
		device 3
		name ELD
		value '100008006712000100000000000000004c2d020953414d53554e470907070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read volatile'
			type BYTES
			count 83
		}
	}
Comment 17 Raymond 2014-03-11 08:25:52 UTC
Are there any differnce in pulseaudio, alsa-info when 

xrandr --output HDMI2 --set audio auto

xrandr --output HDMI2 --set audio on

xrandr --output HDMI2 --set audio off
Comment 18 Till Schäfer 2014-03-13 11:16:56 UTC
i have the same problem on gentoo with module-switch-on-port-available aktivated.

you can read the details in a gentoo bug report: 

https://bugs.gentoo.org/show_bug.cgi?id=493238
Comment 19 Raymond 2014-03-13 14:04:22 UTC
do you mean your DELL U2713HM is connected through DVI or VGA since it support DP and HDMI ?

CONNECTIVITY
1 Dual Link Digital Visual Interface connectors (DVI-D) with HDCP
1 DisplayPort 1.2 (DP)
1 High Definition Multimedia Interface (HDMI)
1 Video Graphics Array (VGA)

you have to post the output of alsa-info.sh and xrandr --verbose
Comment 20 Raymond 2014-03-13 15:04:56 UTC
http://www.dell.com/ed/business/p/dell-u2713hm/pd

1 Dual Link Digital Visual Interface connectors (DVI-D) with HDCP
1 DisplayPort 1.2 (DP)
1 High Definition Multimedia Interface (HDMI)
1 Video Graphics Array (VGA)


1 Audio out
DC power connector for Dell Soundbar (AX510)
Comment 21 Raymond 2014-03-17 15:20:07 UTC
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1256511/comments/44

the graphic driver seem work at expected, since HDMI/DP,pcm=3 Jack return true when set audio auto / on and return false when set audio off

xrandr --output HDMI  --set audio auto

xrandr --output HDMI --set audio on



control.42 {
		iface CARD
		name 'HDMI/DP,pcm=3 Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	
	control.47 {
		iface PCM
		device 3
		name ELD
		value '100008006712000100000000000000004c2d020953414d53554e470907070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read volatile'
			type BYTES
			count 83
		}
	}


xrandr --output HDMI --set audio off

control.42 {
		iface CARD
		name 'HDMI/DP,pcm=3 Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	
	control.47 {
		iface PCM
		device 3
		name ELD
		value ''
		comment {
			access 'read volatile'
			type BYTES
			count 0
		}
	}
Comment 22 Ulrich Lukas 2014-03-25 02:53:05 UTC
Created attachment 96336 [details]
Output of "pactl list"
Comment 23 Ulrich Lukas 2014-03-25 02:54:55 UTC
Created attachment 96337 [details]
Output of "pulseaudio -vvv" after killing pulseaudio, wrong profile is active
Comment 24 Ulrich Lukas 2014-03-25 02:56:04 UTC
Created attachment 96338 [details]
Output of "pulseaudio -vvv" after changing the audio profile to analog and restarting pulseaudio

Hi,


I have exactly the same bug. The pulseaudio settings always fall back to a HDMI-only profile after reboot, no matter which profile/audio output I choose using pavucontrol or the KDE audio settings.

I have a Dell U2711 monitor, connected via a DisplayPort cable (which supports audio). This monitor has a sound output terminal, which I don't use and don't want to use.

To get my audio back, after every reboot I have to change back the card profile to analog audio using pavucontrol or:
pactl set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo

(and then change back the audio sink to the analog port if necessary, using e.g.:
 pactl move-sink-input 6 alsa_output.pci-0000_00_1b.0.analog-stereo).

I have attached the output of "pactl list", as well as the output of
"pulseaudio -vvv" before and after changing the card profile as requested by Tanu Kaskinen in Commen6 #6.

Hope this helps.
Comment 25 David Henningsson 2014-03-28 10:48:13 UTC
(In reply to comment #23)
> Created attachment 96337 [details]
> Output of "pulseaudio -vvv" after killing pulseaudio, wrong profile is active

After looking at this log, I think I found it, but I'm not really sure how to fix it yet.

There is some special code that should prevent switching from analog to HDMI:

    /* Try not to switch to HDMI sinks from analog when HDMI is becoming available */
    PA_IDXSET_FOREACH(sink, profile->card->sinks, idx) {
        if (!sink->active_port)
            continue;

        if (sink->active_port->available != PA_AVAILABLE_NO)
            return false;
    }


but it has stopped working on startup. The reason is this commit:

commit 0b83787d4e844f47affbc903d97b0ca69e234570
Author: David Henningsson <david.henningsson@canonical.com>
Date:   Tue Apr 16 15:17:37 2013 +0200

    alsa: Initialize ports before sinks/sources

...this causes the current profile not to have any sinks, so the code above never returns false like it should.
Comment 26 David Henningsson 2014-03-28 11:07:47 UTC
Okay, I wrote a patch, but haven't tested it myself, anybody who wants to test it?

http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-March/020294.html
Comment 27 Ulrich Lukas 2014-03-30 22:07:38 UTC
@David: Many thanks for your inivestigation and the patch!

Just now, I compiled pulseaudio 4.0 with your patch applied:

_Yes_, indeed this fixes the problem for me: The analog profile stays activated after reboot.

Would be nice if someone else could confirm this.

Best wishes.
Comment 28 David Henningsson 2014-04-08 07:07:00 UTC
I've now committed the patch to PulseAudio git - thanks for testing!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.