LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Pulse Audio is 'undoing' all my solutions (https://www.linuxquestions.org/questions/slackware-14/pulse-audio-is-undoing-all-my-solutions-4175626284/)

Lysander666 03-25-2018 06:00 AM

Pulse Audio is 'undoing' all my solutions
 
Things are going very well with my Slack setup, it's been nearly three months that I've been with it. However, one things continually gives me problems - Pulse Audio.

I have two issues that I had previously solved but now they appear to be not solved.

A few weeks ago I had an issue whereby I couldn't play two simultaneous audio stream. The thread is here. I solved it, and was able to do so. Now I find myself unable to do so. Just now I tried to use Qmplay2 and Audacious but no, I'm told that the 'device or resource is busy' in spite of the fact that the code that originally solved the issue is still in place.

I also had an issue whereby I couldn't get the keyboard volume keys to work, I solved this here. Now they do not work.

Thirdly I had an issue last night where I tried to use QMplay2 after Spotify and just got no sound on QMplay2, Pulse Audio was using 'dummy output', I had to use

Code:

pulseaudio -k
to solve the problem.

Does anyone know what is going on here? Can Pulse Audio not leave evrything alone? I am playing Pulse Audio whack-a-mole. I solve one problem, solve another and the old one comes back. Can anyone help with solving these issues once and for all - am I doing something wrong?

FlinchX 03-25-2018 06:25 AM

I have followed the recipe at the end of this thread https://www.linuxquestions.org/quest...ng-4175619204/ and I'm very happy with it. There's a chance I don't have sound in Firefox, since I've read it relies on pulse, but it suits me, since I use it as web browser only, not as multimedia player.

Didier Spaier 03-25-2018 07:17 AM

Well, it's hard to give you a sound advice not knowing your settings, furthermore I won't try to reproduce anyway as Qmplay2 has too heavy dependencies for my taste.

However, you could just try these settings.

enorbet 03-25-2018 07:30 AM

Allow me to chime in with my endorsement of Didier's acumen in this area. Since Pulseaudio has almost as much "heat" as systemd responses can be extremely binary and extreme. Didier helped me, and I am no newbie at controlling ALSA, in creating a strict environment where ALSA can do it's job unhampered, un-enslaved, yet allow Pulse to work where it absolutely must and then disappear till needed again.

Lysander666 03-25-2018 08:35 AM

Thank you, all. I tried this:


Quote:

1) Comment these lines in asound.conf:
Code:
pcm.default pulse
ctl.default pulse
2) Append these lines to /etc/pulse/default.pa:
Code:
load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop
3) Keep this line in /etc/pulse/client.conf:
Code:
autospawn = yes
From Didier's linked topic, and it works for now, I can play two audio streams again.

As for the volume button, this was originally configured in config/openbox/lxde-rc.xml, but Pulse is still interfering with this. I need tell Pulse to leave it alone.

How odd that this happens. I can see why this application causes dissent now. Not a problem in Debian, but when you have more control over the system in Slack, Pulse is like the annoying Daily Mail reader at a dinner party that keeps butting in with their opinion.

orbea 03-25-2018 12:03 PM

This is exactly why I decided to not bother with pulseaudio years ago (Before using Slackware) and maintained my Slackware install without it since day 1. It has a horrible habit of just breaking all on its own and providing non reproducible issues that at least a few people always run into. Its not even about avoiding the bad hype, its more about reducing the number of things that get in the way and interfere with productivity. I personally don't sit down as the computer expecting to fix sound at arbitrary intervals. [/rant]

netcrawl 03-25-2018 03:32 PM

Quote:

Originally Posted by Didier Spaier (Post 5835155)
However, you could just try these settings.

Thank-you, good solution, got me some Slack back that I had been missing.

Lysander666 03-26-2018 04:43 AM

Quote:

Originally Posted by Didier Spaier (Post 5835155)
Well, it's hard to give you a sound advice not knowing your settings, furthermore I won't try to reproduce anyway as Qmplay2 has too heavy dependencies for my taste.

However, you could just try these settings.

You mention in that thread uncommenting the line
Code:

autospawn = yes
Now, in order to disable autostart at login wouldn't it be better to uncomment the line and change it to 'no'?

Qury 03-26-2018 04:49 AM

5 Attachment(s)
Quote:

Originally Posted by Lysander666 (Post 5835144)
I tried to use Qmplay2 and Audacious but no, I'm told that the 'device or resource is busy' in spite of the fact that the code that originally solved the issue is still in place.

Is it possible that either Qmplay2 or Audacious is using ALSA as a backend and not pulse?

I've attached my config files including asound.conf This works perfectly for me and i'm able to play sources at once.

Didier Spaier 03-26-2018 05:01 AM

Quote:

Originally Posted by Lysander666 (Post 5835484)
You mention in that thread uncommenting the line
Code:

autospawn = yes
Now, in order to disable autostart at login wouldn't it be better to uncomment the line and change it to 'no'?

No, autospawn means "start pulseaudio when an application requests it", not "start pulseaudio when the user logs in". So, keep "yes".

Didier Spaier 03-26-2018 05:27 AM

Quote:

Originally Posted by Qury (Post 5835487)
Is it possible that either Qmplay2 or Audacious is using ALSA as a backend and not pulse?

In Audacious' menu, Output=>Audio=>Output plugin.

If you chose alsa (seems to be the default here) you can also set the PCM device, the mixer device and the mixer element.

I know nothing about Qmplay2 that I have not installed.

Lysander666 03-26-2018 05:29 AM

Quote:

Originally Posted by Didier Spaier (Post 5835498)
In Audacious' menu, Output=>Audio=>Output plugin.

If you chose alsa (seems to be the default here) you can also set the PCM device, the mixer device and the mixer element.

I know nothing about Qmplay2 that I have not installed.

This is really, helpful, thank you. I am trying to get Pulse out the way and this helps a lot. I have alsamixer enabled and would prefer everything to go via alsa without Pulse sitting on top of it.

Qury 03-26-2018 05:38 AM

Quote:

Originally Posted by Lysander666 (Post 5835501)
This is really, helpful, thank you. I am trying to get Pulse out the way and this helps a lot. I have alsamixer enabled and would prefer everything to go via alsa without Pulse sitting on top of it.

Is there any specific reason for not using pulseaudio?
Alsa by default locks the sound-card to a single process unless you are using dmix, which is notoriously difficult to set up and configure properly.

Lysander666 03-26-2018 05:43 AM

Quote:

Originally Posted by Qury (Post 5835503)
Is there any specific reason for not using pulseaudio?
Alsa by default locks the sound-card to a single process unless you are using dmix, which is notoriously difficult to set up and configure properly.

I have dmix set up, it was working fine until recently. When it was initially set up I was able to play more than one audio stream at once.

The reason why I think Pulse is the issue is that invoking

Code:

pulseaudio -k
stopped the issue I was having.

Recently there has been more understanding as how to set up dmix. It's actually very easy. Take a look here to know how to set it up with the alsa equaliser:

https://www.linuxquestions.org/quest...4/#post5819450

and I/Eric updated Slackdocs here:

https://docs.slackware.com/howtos:ha...s_on_slackware

Qury 03-26-2018 06:46 AM

Quote:

Originally Posted by Lysander666 (Post 5835504)
The reason why I think Pulse is the issue is that invoking
Code:

pulseaudio -k
stopped the issue I was having.

My question was not about this, i wanted to know whether you use any specific program that uses the alsa back-end to play music and can't be switched over to use pulseaudio.

The fact that restarting pulseaudio solved your issue means that it works, it just probably not configured properly for some reason.

So i rephrase my question:
Is there any specific reason why you need alsa to work instead of trying to fix pulseaudio properly?

Other than that, it would be good to know the following:
- number of sound cards you have (HDMI output on video card counts as well)
- graphical environment (as pulse is usually is started with start-pulseaudio-x11 )
- are you encountering this issue with a standard user or with root user (pulse does not like it when you use it as root, and using your computer as root is very bad practice anyway)


All times are GMT -5. The time now is 06:40 PM.