LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-08-2017, 12:00 PM   #1
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
Pulseaudio troubleshooting


On Slackware64-14.2, I left /etc/rc.d/rc.pulseaudio unchanged, without executable flag, so it doesn't run at boot. I did not touch any defaults in config files from /etc/pulse. I created /etc/asound.conf as suggested here: https://docs.slackware.com/howtos:mu...n_sound_system I made sure that no users (I have a few, more details below) don't have a ~/.asoundrc .

I have a main user which I log, then type startx in command line to launch the GUI. After that, pulseaudio works. Sometimes. Sometimes it doesn't. pavucontrol displays a window saying that pulseaudio might have been crashed. Then I have to clean /tmp/pulse*, ~/.config/pulse, kill all pulseaudio processes a few times and then it works again.

Sometimes I need to log as other users, in a terminal emulator, I do 'su - otheruser'. For that user, pulseaudio never works. I removed all users from audio group, as suggested here https://www.freedesktop.org/wiki/Sof...FAQ/#index26h3 It doesn't help. pavucontrol launched as secondary user only sees the Dummy output interface.

Am I missing something or pulseaudio is just like that? I need sound for all users.
 
Old 12-08-2017, 12:13 PM   #2
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 934

Rep: Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526
Yes, other users won't hear anything
Sometime ago I found an article about this but never tried.
http://billauer.co.il/blog/2014/01/pa-multiple-users/

What I do is simply disable pulseaudio and return to alsa.
 
1 members found this post helpful.
Old 12-08-2017, 01:21 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Rep: Reputation: Disabled
The article you linked to is obsolete as now pulseaudio is shipped in Slackware. Juste restore /etc/asound.conf as it is shipped in Slakware:
Code:
# ALSA system-wide config file
# By default, redirect to PulseAudio:
pcm.default pulse
ctl.default pulse
Also, all users who need sound should be members of the audio group in Slackware.

Last edited by Didier Spaier; 12-08-2017 at 01:23 PM.
 
1 members found this post helpful.
Old 12-08-2017, 01:57 PM   #4
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Quote:
On Slackware64-14.2, I left /etc/rc.d/rc.pulseaudio unchanged, without executable flag
That is because it is called when you start the windows server. and is left that way unless you want to run it in terminal run level 3 only and never go to a xwindow environment.
reason for this is configured per user per desktop environment.

Last edited by Drakeo; 12-08-2017 at 01:59 PM.
 
1 members found this post helpful.
Old 12-08-2017, 03:09 PM   #5
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
The article you linked to is obsolete as now pulseaudio is shipped in Slackware. Juste restore /etc/asound.conf as it is shipped in Slakware:
Code:
# ALSA system-wide config file
# By default, redirect to PulseAudio:
pcm.default pulse
ctl.default pulse
Also, all users who need sound should be members of the audio group in Slackware.
Thanks, this got my sound fixed - as in "now I have sound for each user". But whenever an user runs a program that plays audio, another audio playing program run by another user remains silent. Can I have programs from different users running at the same time and playing audio? I believe I used to achieve this back in alsa times with dmix.

Edit: few programs running as same user seem to play sound fine at the same time, just programs running as different users can't

Last edited by FlinchX; 12-08-2017 at 03:28 PM. Reason: added note
 
Old 12-08-2017, 04:06 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Rep: Reputation: Disabled
Quote:
Originally Posted by FlinchX View Post
Can I have programs from different users running at the same time and playing audio?
The easy but not recommended way is to just start pulseaudio system wide making executable the file /etc/rc.d/rc.pulseaudio, then reboot. You may try, but be aware of the caveats, cf: https://www.freedesktop.org/wiki/Sof...ithSystemWide/

Other possibility, see this blog page: http://billauer.co.il/blog/2014/01/pa-multiple-users/
 
1 members found this post helpful.
Old 12-08-2017, 05:28 PM   #7
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,915

Rep: Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033
Alternatively, configure pulse to run on top of a statically defined alsa dmix device that all users on the system can share: which is what I do.

This post has a diff of the config changes I make to achieve that.

Each user can either run their own completely independent instance of pulseaudio, or even output directly to alsa.

That pulseaudio is a per-user architecture is IMO it's biggest fault. The above isn't ideal, but it works around that limitation fairly well.
 
1 members found this post helpful.
Old 12-08-2017, 10:41 PM   #8
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
The easy but not recommended way is to just start pulseaudio system wide making executable the file /etc/rc.d/rc.pulseaudio, then reboot. You may try, but be aware of the caveats, cf: https://www.freedesktop.org/wiki/Sof...ithSystemWide/
This is the last option that I'll keep for when I'll be really desperate

Quote:
Originally Posted by Didier Spaier View Post
Other possibility, see this blog page: http://billauer.co.il/blog/2014/01/pa-multiple-users/
I have studied that approach and it seems that when a secondary user has some very restrictive network filtering rules (I have few such users for fiddling with iptables), I'd have to include additional firewall rules to allow traffic flow between those users and the pulseaudio server running on the TCP port on localhost. I have also tried a variation of this setup by having

Code:
load-module module-native-protocol-tcp auth-anonymous=1
in ~/.pulse/default.pa of main user, this seems to work for all secondary users without any additional setup on their side and regardless of their firewall policies. However, this setup still gives me sound for each user (main user and each secondary user), but no mixed sound for different users running audio programs at the same time. I would also like to know a bit more about the security implications of using this no-auth approach, because neither https://www.freedesktop.org/wiki/Sof.../User/Network/ nor https://www.freedesktop.org/wiki/Sof...les/#index22h3 seem to go into details about it.
 
Old 12-08-2017, 10:46 PM   #9
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by GazL View Post
Alternatively, configure pulse to run on top of a statically defined alsa dmix device that all users on the system can share: which is what I do.

This post has a diff of the config changes I make to achieve that.

Each user can either run their own completely independent instance of pulseaudio, or even output directly to alsa.

That pulseaudio is a per-user architecture is IMO it's biggest fault. The above isn't ideal, but it works around that limitation fairly well.
I have tried this and it seems to be the setup that suits me best. I think I'll stick to it and hope that it will work in next versions of Slackware as well, even if PulseAudio will get better (I'm not happy about the idea of wasting so much time with setting up PulseAudio again). I have just one small question. In the attached diff file that you refer in that post from the other thread, you have two udev rules for two cards: card0 and card1. I can see that card0 is involved in /etc/asound.conf, where you define the dmix device, but what about card1?
 
Old 12-09-2017, 03:00 AM   #10
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,915

Rep: Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033
Quote:
Originally Posted by FlinchX View Post
I can see that card0 is involved in /etc/asound.conf, where you define the dmix device, but what about card1?
card1 is the hdmi output of the onboard sound hardware. I never use it, so didn't bother to configure it in asound.conf and default.pa. Really it should have similar definitions to card0, but I was just being lazy.
Code:
root@ws1:~$ udevadm info --export-db | sed -ne '/P: .*sound\/card.$/,/^$/p'
P: /devices/pci0000:00/0000:00:03.0/sound/card1
E: DEVPATH=/devices/pci0000:00/0000:00:03.0/sound/card1
E: ID_BUS=pci
E: ID_MODEL_FROM_DATABASE=Broadwell-U Audio Controller
E: ID_MODEL_ID=0x160c
E: ID_PATH=pci-0000:00:03.0
E: ID_PATH_TAG=pci-0000_00_03_0
E: ID_PCI_CLASS_FROM_DATABASE=Multimedia controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Audio device
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: ID_VENDOR_ID=0x8086
E: PULSE_IGNORE=1
E: SOUND_FORM_FACTOR=internal
E: SOUND_INITIALIZED=1
E: SUBSYSTEM=sound
E: USEC_INITIALIZED=10134221

P: /devices/pci0000:00/0000:00:1b.0/sound/card0
E: DEVPATH=/devices/pci0000:00/0000:00:1b.0/sound/card0
E: ID_BUS=pci
E: ID_MODEL_FROM_DATABASE=Wildcat Point-LP High Definition Audio Controller
E: ID_MODEL_ID=0x9ca0
E: ID_PATH=pci-0000:00:1b.0
E: ID_PATH_TAG=pci-0000_00_1b_0
E: ID_PCI_CLASS_FROM_DATABASE=Multimedia controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Audio device
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: ID_VENDOR_ID=0x8086
E: PULSE_IGNORE=1
E: SOUND_FORM_FACTOR=internal
E: SOUND_INITIALIZED=1
E: SUBSYSTEM=sound
E: USEC_INITIALIZED=10118301

root@ws1:~$
 
1 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
Can't Get Sound from Pulseaudio -- PulseAudio Will Not Start JasonC10203 Linux - Software 4 11-28-2016 11:18 PM
Bypass pulseaudio problems and crashes when you don't have pulseaudio. Rinndalir Linux - Software 1 08-31-2016 01:00 PM
Lost Pulseaudio while troubleshooting sound issues with Spotify on 12.04 marinecomm Ubuntu 3 06-06-2013 08:39 PM
[SOLVED] Squeeze + Pulseaudio + Alsa and USB Midi device causes Pulseaudio crash mad4linux Debian 1 01-26-2011 03:57 AM
Winecfg crashes on sound tab with Pulseaudio and no 'sounddrivers' without pulseaudio William (Dthdealer) Linux - Software 5 06-13-2010 07:30 AM

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

All times are GMT -5. The time now is 10:53 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