You are not logged in.

#1 2013-11-09 13:38:16

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 288

Pulseaudio no sound on relogin

Hello,

it haven't work since I remember but now I'd like to know why and fix it. I'm using pulseaudio and it's generally fine. However, when I log out of xfce and I log in back, I have no sound. What I'm trying doesn't work:

[mk@linux ~]$  pulseaudio -k
E: [pulseaudio] main.c: Failed to kill daemon: No such process.
[mk@linux ~]$ su
[root@linux mk]# pulseaudio -k
E: [pulseaudio] main.c: Failed to kill daemon: No such process.
[root@linux mk]# exit
[mk@linux ~]$ rm -rf /tmp/pulse* ~/.pulse*
[mk@linux ~]$  pulseaudio -k
E: [pulseaudio] main.c: Failed to kill daemon: No such process.
[mk@linux ~]$ pulseaudio --start
E: [autospawn] core-util.c: Failed to create secure directory (/run/user/1000/pulse): No access
W: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
E: [pulseaudio] main.c: Failed to acquire autospawn lock
[mk@linux ~]$ paplay /usr/share/sounds/alsa/Front_Left.wav 
Connection failed: Connection refused
pa_context_connect() failed: Connection refused

Offline

#2 2013-11-09 14:59:13

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: Pulseaudio no sound on relogin

Are you using pam_systemd? You need to create the '/run/user/$UID/' directory on login (as root). pam_systemd will do this for you.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#3 2013-11-10 19:39:29

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 288

Re: Pulseaudio no sound on relogin

Hello, thanks for your answer.

I'm using systemd, so I'm using pam_systemd I guess. I read that:

It is not necessary to add your user to groups (sys, disk, lp, network, video, audio, optical, storage, scanner, power, etc.) for most use cases with systemd. The groups can even cause some functionality to break. For example, the audio group will break fast user switching and allows applications to block software mixing.

So I removed myself from those groups.

Now I can kill and start pulseaudio from command line as user. However, after relogin pulse doesn't start.

And so thus wiki said:

As mentioned previously, PulseAudio is very likely launched automatically via either /etc/X11/xinit/xinitrc.d/pulseaudio or the files in /etc/xdg/autostart/ if users have some DE installed.

Jupp, there is /etc/X11/xinit/xinitrc.d/pulseaudio:

#!/bin/bash

case "$DESKTOP_SESSION" in
  gnome|kde*|xfce*) # PulseAudio is started via XDG Autostart
  ;;
  *)
    # Extra checks in case DESKTOP_SESSION is not set correctly
    if [[ -z $KDE_FULL_SESSION && -z $GNOME_DESKTOP_SESSION_ID ]]; then
      /usr/bin/start-pulseaudio-x11
    fi
  ;;
esac

and /etc/xdg/autostart/pulseaudio.desktop:

Exec=start-pulseaudio-x11

Anyway, no sound after relogin.

Offline

#4 2013-11-10 19:56:57

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: Pulseaudio no sound on relogin

mkkot wrote:

I'm using systemd, so I'm using pam_systemd I guess.

This isn't a given. Make sure your /etc/pam.d files are correctly merged.

According to the error, '/run/user/1000/' doesn't exist or isn't owned by your user. Is this true?


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#5 2013-11-10 21:44:59

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 288

Re: Pulseaudio no sound on relogin

I can't see '/run/user/1000/' doesn't exist error since I adjusted appropriate groups.

[mk@linux ~]$ ls -l /run/user/
razem 0
drwx------ 5 mk users 120 11-10 13:20 1000
[mk@linux ~]$ ls -l /run/user/*
razem 0
drwx------ 2 mk   users 60 11-10 22:40 dconf
dr-x------ 3 mk   users  0 11-10 20:28 gvfs
drwx------ 2 mk   users 80 11-10 20:40 pulse
lrwxrwxrwx 1 root root  17 11-10 13:19 X11-display -> /tmp/.X11-unix/X0

There are no pacnew files in /etc/pam.d either. I guess there must be something with those startup scripts...

Last edited by mkkot (2013-11-10 21:46:09)

Offline

#6 2013-11-10 23:33:41

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: Pulseaudio no sound on relogin

1. Post your `~/.xsession-errors` log.
2. Is pulseaudio enabled in XFCE's autostart dialog? I believe the command is `xfce4-autostart-editor` (I don't use XFCE).


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

Board footer

Powered by FluxBB