You are not logged in.

#1 2014-08-05 14:53:38

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Pulseaudio randomly not detecting onboard audio (and other problems)

Pulseuadio is driving me crazy. I can't make it work consistently.

I followed the wiki and installed pulseaudio and pulseaudio-alsa. I use KDE 4.13.3 with kmix applet.

EDITED: Deleted frustrated text and stayed to the facts only:

I have an Realtek® ALC1200 onboard HD audio chipset and an ATI Radeon HD5870 card.

Kernel 3.15.8-1
CPU Intel Core i7 920

Problems:

1. Pulseaudio loses configuration (Volumes, Devices and settings) each and every time I reboot. How to save them?
2. Pulseaudio sometimes just stops working (or doesn't work from the beggining) for no known reason and when I try to restart it through pulseaudio -k, it doesn't find a pulseaudio process to kill despite that there is one running (ps is showing a running one). Why it doesn't work and why it doesn't find the process to kill?
3. Pulseaudio arbitrarily finds random Devices and makes them the Default each time I reboot. One time the default is Dummy Output, another is HDMI Audio (through my ATI card) and other times is the Intel one (which is the correct). How do I peg my device and save the configuration permanently so this random polling does not happen anymore?

Please help me out by giving me some pointers on what is that I am doing wrong and how may I fix it.

Thanks in advance.

Last edited by Nektarios (2014-08-05 16:44:48)

Offline

#2 2014-08-05 14:55:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,559
Website

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

While I can sympathize with your frustration, your results here will likely be more productive if you can dump your frustration somewhere else* and stick with the facts here.  Most notably, a meaningful thread title indicating the problem would be a good first step.

*note: even in the "Grr" thread would be great.

EDIT: Thanks this is much better - unfortunately I'm not personally versed in P.A.

Last edited by Trilby (2014-08-05 16:51:59)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2014-08-05 16:45:13

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

I understand. I'm going to edit it and keep only the facts.

Offline

#4 2014-08-05 21:54:55

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

Does pulseaudio respect the order of sound cards provided by modprobe? If so, that could be one reason for those changes. I assume your hdmi and integrated card use snd-hda-intel. Check their order with 'aplay -l', reboot and check again when the anomaly occurs. You can set the order of the cards using modprobe options as described on our alsa wiki, use vid and pid for this, read the whole chapter.

If the behaviour continues, check every configuration file of pulseaudio and alsa. Check write permission for the appropriate folders and files.

Other than that I would default all configuration and try to rule KDE out by booting into openbox or something comfortable without phonon. You might want to read this.

Brebs made an interesting post about his alsa plug minimal pulseaudio solution recently. I do not know how/if that would work with KDE however, so maybe you would have to ask him.

As for your rant, you should send that opinion to Skype, let them know how much you like their pulseaudio-only support. However consider also, that you are the one who made the choice to use Skype, and you can quit using it any time.

Offline

#5 2014-08-05 22:07:13

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

In addition to what emeres said I'll add my specific configurations as an example template you can copy:

lspci -nn | grep -i audio

00:1b.0 Audio device [0403]: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio [8086:3b56] (rev 06)
01:00.1 Audio device [0403]: NVIDIA Corporation GF108 High Definition Audio Controller [10de:0bea] (rev a1)

/etc/modprobe.d/alsa.conf

options snd_hda_intel enable=1,0 vid=8086,10de pid=3b56,0bea
options snd slots=snd_hda_intel,snd_usb_audio
options snd_hda_intel index=0 vid=8086 pid=3b56
options snd_usb_audio index=1

So, I have two audio devices both sharing the same driver (snd_hda_intel) and I disable one of them (enable=1,0 - 1 is enabled, 0 is disabled in order) and the other one goes in slot 0 - the default device - and then additionally I have a USB webcam with a microphone that I put in slot 1.

From this example you can see how I specified the vid and pid's, the wiki does a good job of explaining but doesn't touch all the details.  Since I set this up I've had exactly zero problems with my audio, it now just works.

Edit: this config is named "alsa" and does set up ALSA type stuff, BUT Pulse will build on top of this config - I use Pulse Audio exclusively myself with this config!

Last edited by headkase (2014-08-05 22:10:33)

Offline

#6 2014-08-05 22:20:05

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

@headkase Why do you use both slots and index methods, when only one is necessary? The slots line is redundant, I would stick with index.

As for the wiki, maybe I will finally come around to rewrite the whole section, majority is already ready. What details are you missing?

Offline

#7 2014-08-05 22:24:36

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

I wasn't aware that they were redundant.  wink  I was having issues at the time myself and I hacked and hacked away at it until everything worked and then I left it alone. tongue smile

Offline

#8 2014-08-05 22:39:00

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

Slots is the newer method, index older, but I would argue it is "technically easier to implement", since one can use separate lines for options, therefore comment them out/change/switch between multiple versions easier and read also, since one does not have to jump between the n-th field after comma to read the appropriate value, and last but not least it accepts negative values as proposed index when available.

Offline

#9 2014-08-05 22:44:56

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

I got rid of the slots and kept the indexes.  Since my computer didn't halt and catch fire I'll leave it that way.  Thank you, emeres, for the tip! smile

Offline

#10 2014-08-06 00:41:08

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

emeres wrote:

What details are you missing?

Well, the Wiki doesn't cover "enable" when it comes to multiple hardware sharing the same driver.  Slots aren't covered also.  Vid and pid are covered decently, however as mentioned not that you have to break them up if you're using enable.  Just minor stuff that if you don't know you'll be sitting in front of Google for 15 minutes to find it and 15 seconds to put it in once you know what it is.

Offline

#11 2014-08-06 01:36:10

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

Thank you all very much for your help, I'll try it out. I'll report if successful.

Offline

#12 2014-08-06 01:51:14

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

So to recap, alsa.conf headkase suggested could be reduced to:
As for now this is questionable

options snd_hda_intel enable=0 vid=10de pid=0bea
options snd_hda_intel index=0 vid=8086 pid=3b56
options snd_usb_audio index=1

Enable parameter, which majority of sound card modules respect, should work independently for each module specified, so there should be no need to break identifications.

Edit: Changed status, will edit when confirmed other forms that work

Last edited by emeres (2014-08-06 09:55:08)

Offline

#13 2014-08-06 04:24:53

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

This works:

headkase wrote:
options snd_hda_intel enable=1,0 vid=8086,10de pid=3b56,0bea
options snd_hda_intel index=0 vid=8086 pid=3b56
options snd_usb_audio index=1

But this does not, the nVidia audio is enabled and becomes the default audio:

emeres wrote:

So to recap, alsa.conf headkase suggested could be reduced to:

options snd_hda_intel enable=0 vid=10de pid=0bea
options snd_hda_intel index=0 vid=8086 pid=3b56
options snd_usb_audio index=1

Enable parameter, which majority of sound card modules respect, should work independently for each module specified, so there should be no need to break identifications.

I also reexamined whether or not I even need that nVidia card in my machine.  It is a GeForce GT 620.  I don't game and it ended up there out of how history unfolded more than anything else.  So, I just ripped it out of my machine and am now running the integrated to the CPU Intel graphics.  I have a Core i5 650 so they're not bad. wink

Offline

#14 2014-08-06 06:48:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,779

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

I'm with the others here that the base issue comes from an undefined order of initialization and streamlining this will probably come a long way. Also something to note, if KDE/Phonon reports that it has "lost"  an audio device it mostly refers to a change in the profile (like digital or analog output switch) you can set those in the "Audio Hardware Setup" tab in the Phonon configuration, alternatively you can use pavucontrol to set a proper default card/profile

Offline

#15 2014-08-06 10:00:05

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

@headkase I will look into it and marked the above part as questionable.

Offline

#16 2014-08-06 14:44:12

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

headkase wrote:

This works:

headkase wrote:
options snd_hda_intel enable=1,0 vid=8086,10de pid=3b56,0bea
options snd_hda_intel index=0 vid=8086 pid=3b56
options snd_usb_audio index=1

... SNIP...

I used this (with my own vids and pids) and did 2 reboots.

/etc/modprobe.d/alsa-base.conf

options snd_hda_intel enable=1,0 vid=8086,1002 pid=3a3e,aa50
options snd_hda_intel index=0 vid=8086 pid=3a3e
options snd_usb_audio index=1

The first reboot resulted at :

  • On kmix, onboard audio was detected as Intel HDA and was set as the default

  • the HDMI was removed completely

  • KDE Mixer presented Intel HDA Analog.

  • The mixer had all kinds of audio volumes.

  • In kdemix Audio setup the Audio Hardware Setup tab was missing, which means that I could not change important settings*

I did a second reboot and:

  • On kmix,onboard audio was detected as Built in Audio Analog Stereo and set as the default

  • the HDMI was removed completely

  • KDE Mixer only presents a Built-in Audio Analog Stereo.

  • The mixer has only one volume

  • Audio setup now includes an Audio Hardware Setup tab which I can change important audio settings*

* like which connector the system will use for input, which I want to set at "front mic" or else my microphone does not work.

It is still incosistent with device recognition, it detects wrong devices and the settings do not persist. So the problem remains and I still don't know what is going wrong.

Last edited by Nektarios (2014-08-06 14:49:12)

Offline

#17 2014-08-06 14:56:44

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

Test other aspects that were suggested, especially try to rule out kde. If nothing helps, try a live medium with linux mint (with and without kde) or similar, see if the problem occurs there. Does your bios/uefi allow for irq assignment?

Offline

#18 2014-08-06 16:51:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,779

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

The fact that there were this many differences on both boots suggests to me, that for some reason your pulseaudio doesn't start every boot.
once you get the alsa setup (all kinds of mixers, no audio hardware tab) and once the pulse setup (one mixer, hardware tab), how do you log in to KDE? If not via login manager, do you explicitly start pulseaudio via start-pulseaudio-kde somewhere (or maybe like described here? https://wiki.archlinux.org/index.php/Pu … vironments ) another thing that may be worth a try is disabling exit-idle time

in /etc/pulse/daemon.conf or ~/.pulse/daemon.conf set

exit-idle-time=-1

Another thing, but more unlikely, disable session restore in KDE's settings, it tends to give problems

Last edited by V1del (2014-08-07 07:48:31)

Offline

#19 2014-08-06 17:11:40

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

Also, you probably don't need the "snd_usb_audio" line.  In my case that is for my webcam microphone input - your case might be different unless you also use that driver.

Offline

#20 2014-08-20 11:43:41

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

emeres wrote:

@headkase I will look into it and marked the above part as questionable.

So I took a look at the enable parameter. Here are the raw results and my post draft:
http://pastebin.com/Xim8VPfv
http://pastebin.com/5bvukaK9
It will probably stay at the early and unconfirmed draft level, because of this thread. In short: vid and pid are ignored by most snd modules, snd-usb-audio accepts them. The values parameters like index and enable accept seem to respect the position of the hardware on the bus for the appropriate module, so that the first sound card on bus first will be addressed with the value n1 on the first position within parameter 'index=n1,n2,n3', the second card on the bus with n2 and so on.

Offline

#21 2014-08-21 16:21:26

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

V1del wrote:

The fact that there were this many differences on both boots suggests to me, that for some reason your pulseaudio doesn't start every boot.
once you get the alsa setup (all kinds of mixers, no audio hardware tab) and once the pulse setup (one mixer, hardware tab), how do you log in to KDE? If not via login manager, do you explicitly start pulseaudio via start-pulseaudio-kde somewhere (or maybe like described here? https://wiki.archlinux.org/index.php/Pu … vironments ) another thing that may be worth a try is disabling exit-idle time

in /etc/pulse/daemon.conf or ~/.pulse/daemon.conf set

exit-idle-time=-1

Another thing, but more unlikely, disable session restore in KDE's settings, it tends to give problems

The parent process of the boot up pulseaudio running process is 1 (/sbin/init), so I guess systemd starts it automatically on boot, but other than that I have no idea how pulseuadio boot up process works. I followed the wiki to setup the sound. One problem is that, although it always starts, when I run pulseaudio -k (so to kill the running process) it does not find it. Despite that the running process has the right owner (me).

One more (BIG) problem is that although sometimes pulseaudio starts correctly and kmix has one mixer, there are no volumes and settings for front/headphone/microphone etc to change. How can I change those through pulseaudio? And one more further problem is that no setting/volume gets saved, which is another big problem.

(I am flabbergasted from this inconsistency and the amount of bugs in pulseaudio, instead of making things simpler, it makes them much worse)

Offline

#22 2014-08-21 18:34:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,779

Re: Pulseaudio randomly not detecting onboard audio (and other problems)

This is really weird, can you give output of

fuser -v /dev/snd/*

when pulse works (one mixer in kmix) and when it doesn't (multiple mixers in kmix)? What may also help when you're in the process of restarting pulse, start with

pulseaudio -vvvvv

and post the log.

Also systemd is pretty much the mother of everything that  gets autostarted someway. unless you have a service (pulse doesn't by default) systemd isn't starting your stuff. So again how do you log  into KDE, and which of the pulse start files are being launched?

The big problem of volumes and settings restoring, is something at which pulse is actually pretty good at it remembers volumes per application and even when you have set an application to another sound source it will remember that. This has worked for ages something on your setup is interfering with proper pulse initialization somewhere, pulse by itself doesn't forget stuff.

I assume you want to change onboard volumes? Pulse differentiates your card into profiles here, so in  order to change the volume of front/rear/etc you'll have to change to the appropriate profile and change the corresponding volume (you can use phonon for that but it can be a bit confusing, check out pavucontrol, it helps to visualize the inner workings of pulse a bit better), another option would be to create separate sinks for speaker or headset output, the gist of how that can be done can be found here: https://wiki.archlinux.org/index.php/Pu … ont.2Frear

(It makes many things simpler, those things you mention aren't pulse bugs but 1. Different mindset which you approach with "wrong" expectations 2. Something on your system is not running how it's supposed to and its not pulseaudio per se
I agree with you though that the whole splitting into profiles that have to be changed into may be a bit unintuitive at first, and it could be better to expose more mixers more prominently)

Relevant lecture on rationale of their approach:

http://www.freedesktop.org/wiki/Softwar … MyVolumes/
https://tango.0pointer.de/pipermail/pul … 04229.html
http://www.freedesktop.org/wiki/Softwar … ultDevice/

Last edited by V1del (2014-08-21 18:44:23)

Offline

Board footer

Powered by FluxBB