LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-25-2018, 06:00 AM   #1
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
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?

Last edited by Lysander666; 03-25-2018 at 08:38 AM. Reason: Spelling
 
Old 03-25-2018, 06:25 AM   #2
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 03-25-2018, 07:17 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 03-25-2018, 07:30 AM   #4
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
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.
 
Old 03-25-2018, 08:35 AM   #5
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178

Original Poster
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
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.

Last edited by Lysander666; 03-25-2018 at 08:37 AM.
 
Old 03-25-2018, 12:03 PM   #6
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
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]
 
2 members found this post helpful.
Old 03-25-2018, 03:32 PM   #7
netcrawl
Member
 
Registered: Jan 2004
Location: British Columbia
Distribution: Slackware64-current, aarch64
Posts: 220

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by Didier Spaier View Post
However, you could just try these settings.
Thank-you, good solution, got me some Slack back that I had been missing.
 
1 members found this post helpful.
Old 03-26-2018, 04:43 AM   #8
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178

Original Poster
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by Didier Spaier View Post
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'?
 
Old 03-26-2018, 04:49 AM   #9
Qury
Member
 
Registered: Feb 2004
Location: Naas,IE
Distribution: Slackware
Posts: 212

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by Lysander666 View Post
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.
Attached Files
File Type: txt asound.conf.txt (105 Bytes, 14 views)
File Type: txt client.conf.txt (1.2 KB, 13 views)
File Type: txt daemon.conf.txt (2.3 KB, 12 views)
File Type: txt default.pa.txt (4.8 KB, 9 views)
File Type: txt system.pa.txt (2.0 KB, 6 views)
 
1 members found this post helpful.
Old 03-26-2018, 05:01 AM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by Lysander666 View Post
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".

Last edited by Didier Spaier; 03-26-2018 at 05:13 AM.
 
1 members found this post helpful.
Old 03-26-2018, 05:27 AM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by Qury View Post
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.
 
1 members found this post helpful.
Old 03-26-2018, 05:29 AM   #12
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178

Original Poster
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by Didier Spaier View Post
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.
 
Old 03-26-2018, 05:38 AM   #13
Qury
Member
 
Registered: Feb 2004
Location: Naas,IE
Distribution: Slackware
Posts: 212

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by Lysander666 View Post
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.
 
Old 03-26-2018, 05:43 AM   #14
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178

Original Poster
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by Qury View Post
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

Last edited by Lysander666; 03-26-2018 at 05:46 AM.
 
1 members found this post helpful.
Old 03-26-2018, 06:46 AM   #15
Qury
Member
 
Registered: Feb 2004
Location: Naas,IE
Distribution: Slackware
Posts: 212

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by Lysander666 View Post
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)
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulse Audio purple52 Linux - Newbie 1 05-15-2014 09:16 PM
What is Pulse AUdio Sunfist Linux - Newbie 23 08-12-2013 05:58 PM
[SOLVED] Problem with Pulse Audio codeman1234 Linux - Software 15 01-13-2012 11:00 AM
[SOLVED] Pulse Audio Problem vivanguarda Slackware 9 01-23-2011 12:02 PM
pulse audio sulekha Ubuntu 1 02-10-2009 05:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration