LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 08-24-2019, 05:21 PM   #1
husarz
Member
 
Registered: Dec 2016
Location: Poland
Distribution: Fedora/CentOS
Posts: 41

Rep: Reputation: Disabled
Pulseaudio with new user


Hey, I use GNOME desktop on CentOS 7. When I try to play sound on my user it works fine.

Code:
pacmd list-cards
shows soundcard properly.

But I have added new user who is unprivileged to run some program on it. When I did

Code:
su - <mew_user>
and tried to play sound then heard silnence instead of expected sound.

Code:
pacmd list-cards
executed by new user shows 0 cards.

Then I have added new user to audio, video groups. Then relogged him and it started to work.

As you can see the problem was solved but I really don't understand why? Could you explain to me why? The very first question is why my main user on which I'm logged into desktop has working sound without being part of those groups and new user must be?
 
Old 08-25-2019, 04:29 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
pulseaudio is a per-user daemon. So when you su to another user it does not connect to your pulseaudio daemon, it starts its own, but your original daemon is still using the sound hardware, so instead the new user's pulseaudio daemon either sends the sounds to a dummy device and you hear nothing, or the sound producing process blocks waiting for the sound devices to become free.

I decided to disable pulseaudio and go back to using ALSA directly because of this exact reason, and it's the primary reason why I think pulseaudio sucks!
 
Old 08-25-2019, 04:38 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
As you can see the problem was solved but I really don't understand why?
In a word, ownerships, groups and permissions.
 
  


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
[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
[Pulseaudio] how to change user settings using a command line ? Ed38 Linux - Software 1 12-23-2007 01:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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