SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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/
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
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
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.