Description of problem: pulseaudio does not start under root environment. Version-Release number of selected component (if applicable): pulseaudio.x86_64-6.0-4.fc22 How reproducible: Every time KDE plasma session started by root, pulseaudio server do not starts. Steps to Reproduce: 1. Login to KDE plasma desktop graphical session 2. Play some sound Actual results: no sound Expected results: sound Additional info: Under a regular user session, peulseaudio starts without any problem. The was no such issue under FC21. The problem began when I upgraded FC21 to FC22 using yum. Still no sound under the root session. When pulseaudio started by typing pulseaudio -D in a terminal, the sound begins to work. It's seems pulseuadio simply not spawned under the root in FC22 (at least for me) I haven't ever changed any pulseaudio config files and have ; autospawn = yes commented out in /etc/pulse/client.conf
I think autospawn fails for root (not sure why). Mind trying this build? http://koji.fedoraproject.org/koji/buildinfo?buildID=664349
I tried this build and now I have 6.0-6.fc22 But pulseaudio server is NOT spawned for root session still. For any regular user pulseaudio is spawned and sound is present. So, the problem still persists.
OK, what happens if you run (as root, and when pulseaudio is not running) by hand: start-pulseaudio-x11 ? that's what is supposed to run automatically via /etc/xdg/autostart/pulseaudio.desktop on session start.
My system doesn't have pulseaudio-module-x11 rpm installed but pulseaudio starts automatically on regular users sessions except a root session. Tell me how... At my previous FC-21 pulseaudio-module-x11 wasn't installed too, but pulseaudio started in root session without a hitch.
/usr/bin/start-pulseaudio-x11 is in the base pulseaudio rpm $ rpm -q pulseaudio ?
rpm -q pulseaudio pulseaudio-6.0-6.fc22.x86_64
pulseaudio-6.0-8.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/pulseaudio-6.0-8.fc22
Package pulseaudio-6.0-8.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing pulseaudio-6.0-8.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-11330/pulseaudio-6.0-8.fc22 then log in and leave karma (feedback).
Well, I 've just installed it and now I have: rpm -q pulseaudio pulseaudio-6.0-8.fc22.x86_64 but this package didn't fix this issue. It isn't started in root session still (at least for me). Very sad.....
OK, again, what happens exactly when you try running in root session terminal: start-pulseaudio-x11 ?
start-pulseaudio-x11 bash: start-pulseaudio-x11: command not found rpm -q pulseaudio-module-x11 package pulseaudio-module-x11 is not installed But again - pulseaudio starts in regular user sessions without any problem.
OK, /usr/bin/start-pulseaudio-x11 is provided by base 'pulseaudio' rpm, I suspect your root account's $PATH is messed up somehow, try this instead: /usr/bin/start-pulseaudio-x11
Oh nevermind, fix here is to : dnf install pulseaudio-module-x11 then.
Heck, It didn't fix it. I've installed the pulseaudio-module-x11 but pulseaudio doesn't start automatically in a root session. (at least for me) With manual start by running start-pulseaudio-x11 in terminal, I see the following output: # start-pulseaudio-x11 W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified) and also some line in /var/log/messages: rtkit-daemon[699]: Failed to make thread 2062 RT: Operation not permitted rtkit-daemon[699]: Failed to make thread 2062 RT: Operation not permitted ...... after that procedure pulseaudio is up and running.
What kind of session are you using? gnome? other? I'm beginning to wonder if it supports xdg autostart, because all /etc/xdg/autostart/pulseaudio.desktop essentially does, is run: start-pulseaudio-x11 (which you verified works)
I am using KDE plasma desktop as I said at my first message.
Why you are focusing at start-pulseaudio-x11??? In a regular user sessions pulseaudio does start!!! Completely without using start-pulseaudio-x11!! Except root sessions. I strongly believe that start-pulseaudio-x11 has nothing to do with pulseaudio autostart procedure (at least in KDE Plasma desktop environment) Pulseadio is launched some other way, and this mechanism doesn't work in a root sessions.
I am sure that pulseaudio is launched by some pulseaudio-libs code initiated upon starting a pulseaudio client software. Remember a default setting 'autospawn = yes' in a /etc/pulse/client.conf ? Please think about it! And ask a question: How it works and why it doesn't work in a root session? And forget about about this heck start-pulseaudio-x11 - you are wasting the time.
I've been focusing on start-pulseaudio-x11, because that is what actually does the starting (when autospawn doesn't work). I cannot reproduce the problem, pulseaudio starts fine for me with root/plasma session. So far, I've been unable to determine how/why it doesn't do it for you. Sorry.
Well, may be the problem is caused by fact that I've updated FC 21 to FC 22 using yum, and after after the update something went wrong.. if I'll get a chance to do a clean install of FC-22 I check this issue with pulseaudio autospawn. Thanks for you help.
I have just checked again my 2-nd rig that I updated from FC-21 to FC-22 some time ago, and it also haven't got pulseaudio autospawn in root session. So, may be the problem happens after FC-21-22 update.
pulseaudio-6.0-8.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
re-opening, problem not solved.
Created attachment 1112203 [details] Enable autospawn as root I think you'll find this handy :-) It's from here: https://github.com/rworkman/pulseaudio/commit/2f84429f62c2c3089f1711ac1938a7c1e54b22f9
upstream purposely disables root autospawn, and that patch/hack simply removes that intention. We will not adopt that in fedora packaging. Still waiting to hear if start-pulseaudio-x11 does not work for the reporter. (and if not, we need to find out why)
I'd be interested to know the reason that it's intentionally disabled. It first appeared in this commit, best I can tell: commit 045c1d602dcba57868845ba3270510593c39480f Author: Lennart Poettering <lennart> Date: Thu May 15 23:34:41 2008 +0000 merge glitch-free branch back into trunk git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f Either way, what we found is that pulseaudio simply will not autospawn as root whether in console or X without that patch. Perhaps there is a good reason other than handwaving about "it's not a good idea to use root for things like this" (I agree, and you agree, and most people agree, but...), and if so, we'd certainly like to know what it is. I humbly suggest that upstream be consulted on this to find out if it's a genuine problem, and if not, perhaps they'll consider at least making it configurable in client.conf.
Here's someone else's (much better) approach - someone pointed this out to me after I posted my ugly hack (which was, in my defense, knowingly ugly - this isn't shipping in the distro and is only being used for internal testing right now). Anyway, here: http://lists.openembedded.org/pipermail/openembedded-core/2015-May/104989.html
Mind sending that upstream?
Well, I'm not happy with the doc changes (I think they're a bit inconsistent), and besides, it's still not clear whether there's a nonhandwavy good reason for the existing behavior. Given that the original author of PA is CC'd on this bug, and that he's the person who made the change to not allow autospawn for root, and that he's a RH employee, I think one of the RH folks need to inquire of him about it before asking the current dev(s) to review and possibly include a patch that shouldn't be considered.
Only occurred with Workstation desktop, but OK with MATE desktop.
Test OK with Fedora 25.
per comment #31 closing -> currentrelease