Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently upgraded from Xubuntu 13.04 to 13:10, and since then I have no sound when I start my PC, because it's being sent to the HDMI output (my TV). I want it to go to the Analogue output (my PC) like it used to on 13.04. I can change it using the pulse-audio Volume Control program, but my settings are lost after I 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.

Does anyone know how I can preserve my sound settings between reboots?

===== EDIT =====

Here's the output of some pactl commands after I start my PC; 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

I then 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 the settings are lost, and I can't find a way to restore them from command line.

Thanks.

share|improve this question
1  
Also having the same problem with normal Ubuntu. It's extremely annoying –  Dave Nov 29 '13 at 12:03
add comment

2 Answers 2

I had the same problem. I'm not an expert but this is what worked for me.

For what I've understood the problem is that pulse is loading by default the hdmi profile of the sound card. That means that even if you set the default sink as alsa_output.pci-0000_00_1b.0.analog-stereo when pulse try to use that sink it can't find it.

The solution I've found is to manually configure pulse to make it load the desired profile when it starts. To achieve this you have to edit /etc/pulse/default.pa and at the end of the file add this three lines

set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo
set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo
set-default-source alsa_output.pci-0000_00_1b.0.analog-stereo.monitor

the first line set the desired card profile. In my case was output:analog-stereo, you can have a complete list of profile running :

pactl list cards

the second and third line sets the default output and input respectively.

Another thing you can do is add a configuration for alsa to use pulse. Look in your home directory for the .asoundrc file, if the file does not exists create it and write this inside:

pcm.pulse {
     type pulse
}
ctl.pulse {
     type pulse
}
pcm.!default {
     type pulse
}
ctl.!default {
     type pulse
}

then reboot.

Now you should have the audio coming from your pc speaker by default.

Hope this help.

share|improve this answer
    
Thanks, this worked like a charm! No need for the .asoundrc file. –  tectux Mar 8 at 9:32
add comment

I encountered this exact same problem. I found a similar issue in an Arch Linux forum and used this method.

Run:

pacmd list-cards

You should get a list of cards you have, and each card will have a list of profiles. Get the index number of the card you want. My card index is 0, and the profile I want is called output:analog-stereo".

Run:

pacmd set-card-profile 0 output:analog-stereo

Everything works! To make it permanent, I edited /etc/pulse/default.pa and at the bottom put:

set-card-profile 0      output:analog-stereo
set-default-sink 1

This seems to have everything set right after restarting pulseaudio.

share|improve this answer
    
This is a more robust answer than those specifying the exact pci slot within the card name. When I just moved my two monitors and plugged them into the gfx card differently, the slots changed, rendering my previous default.pa obsolete. –  cfi Apr 6 at 12:16
    
This can also be done on a per user level by adding a new ~/.config/pulse/default.pa file instead of overwriting the system default. –  cfi Apr 6 at 12:17
    
Note: Any user specific default.pa fully replaces the system wide one! So .include /etc/pulse/default.pa or similar at the start. I've added a longer answer here –  cfi Apr 11 at 17:09
    
Confirming that user250071's and @v2r 's reply work perfectly on Ubuntu 14.04 LTS. –  Achmed Durangi May 15 at 23:42
add comment

protected by Community Apr 6 at 12:17

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.