You are not logged in.

#1 2019-02-26 04:40:23

6qyzak
Member
Registered: 2019-02-26
Posts: 9

[SOLVED] Pulse Audio fails to start via systemd, but command line

Hi, I'm quite noob to system building and having a problem starting Pulse Audio server.

On attempt start Pulse Audio with systemctl, i. e.

systemctl --user start pulseaudio.service

pulseaudio.socket succeeds, but service fails.

error message is (journalctl):

E: [pulseaudio] core-util.c: Failed to create secure directory (@HOME/.config/pulse): No such file or directory

but I confirmed I've set XDG_CONFIG_HOME with echo, (jake is my user name)

echo $XDG_CONFIG_HOME
/home/jake/.config

I saw document saying user instance of systemd does not inherit some variables, so I set them up in '~/.config/environment.d/' and confirmed it is set.
But the error insists.

I can start Pulse Audio via command line (and this way audio works),
but I want to start Pulse Audio with provided systemctl script.

How do I get this work?

I'm using I3 with ly.

Last edited by 6qyzak (2019-02-26 05:24:52)

Offline

#2 2019-02-26 05:23:43

6qyzak
Member
Registered: 2019-02-26
Posts: 9

Re: [SOLVED] Pulse Audio fails to start via systemd, but command line

unable to create directory '/run/user/\$(id -u)/dconf': Permission denied.  dconf will not work properly.

I just found out that I made a dumb mistake.

I was setting XDG_RUNTIME_DIR=/run/user/$(id -u), and it was working in /etc/profile, because it can execute scripts.
But 'environemt.d' would not, and it was set literally '/run/user/\$(id -u)'. so it seemed working in bash but not working in systemd.

I solved it by setting XDG_RUNTIME_DIR=/run/user/1000 (actual my uid) under environment.d,
I will be careful next time posting question hmm

Offline

#3 2019-02-26 09:09:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,142

Re: [SOLVED] Pulse Audio fails to start via systemd, but command line

Why? You should not have to set that manually in any case, properly started the systemd --user instance will set that itself.

Offline

#4 2019-02-26 09:20:40

6qyzak
Member
Registered: 2019-02-26
Posts: 9

Re: [SOLVED] Pulse Audio fails to start via systemd, but command line

V1del wrote:

Why? You should not have to set that manually in any case, properly started the systemd --user instance will set that itself.

Because without setting variables, systemctl --user fails, with error

Failed to connect to bus: No such file or directory

Is there other way to make it work?

Offline

#5 2019-02-26 09:33:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,142

Re: [SOLVED] Pulse Audio fails to start via systemd, but command line

Then you aren't setting your session properly, how are you starting your environment/starting X? If you use .xinitrc make sure it follows the template outlined in the second blue box

Offline

#6 2019-02-26 09:46:59

6qyzak
Member
Registered: 2019-02-26
Posts: 9

Re: [SOLVED] Pulse Audio fails to start via systemd, but command line

V1del wrote:

Then you aren't setting your session properly, how are you starting your environment/starting X? If you use .xinitrc make sure it follows the template outlined in the second blue box

I'm using Ly to start user session (am I right?), like login and select window manager.

And I didn't configured .xinitrc, that file does not exists in my home directory.

Then, am I supposed to set these variables in files located under /usr/share/xsessions? I don't have any experience with xorg-init.

Offline

#7 2019-02-26 12:18:04

ayekat
Member
Registered: 2011-01-17
Posts: 1,609

Re: [SOLVED] Pulse Audio fails to start via systemd, but command line

I don't know how a display manager is supposed to work in detail, but if it properly started your session, the pam_systemd module should have set XDG_RUNTIME_DIR, and there is no need for the user to set it themselves, anywhere.

Given this bug report, I am left to assume that indeed Ly is the culprit.

Last edited by ayekat (2019-02-26 12:18:45)


pkgshackscfgblag

Offline

#8 2019-02-26 16:53:30

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Pulse Audio fails to start via systemd, but command line

6qyzak wrote:
V1del wrote:

Then you aren't setting your session properly, how are you starting your environment/starting X? If you use .xinitrc make sure it follows the template outlined in the second blue box

I'm using Ly to start user session (am I right?), like login and select window manager.

And I didn't configured .xinitrc, that file does not exists in my home directory.

Then, am I supposed to set these variables in files located under /usr/share/xsessions? I don't have any experience with xorg-init.

Try using a different DM that isn't marked as experimental. I'd imagine that your issue is due to Ly not initializing your session properly.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#9 2019-02-27 00:58:18

6qyzak
Member
Registered: 2019-02-26
Posts: 9

Re: [SOLVED] Pulse Audio fails to start via systemd, but command line

ok, I switched from Ly to LightDM and it works even without variables manually set.
Checked output of printenv and systemctl --user show-environment, and XDG variables are seems to set well.

Turns out Ly does not set those variables.

Offline

Board footer

Powered by FluxBB