You are not logged in.

#1 2017-04-23 13:06:26

Fred7109
Member
Registered: 2015-05-17
Posts: 134

[SOLVED] Pacmd won't list sink inputs

Hello

I have a problem with pacmd, as it won't show my sink inputs. I get the following:

$ pacmd list-sink-inputs
0 sink input(s) available.

I don't know what's wrong, as my different sink inputs shows up in pavucontrol. Furthermore, I checked whether the client is identified, which it is, as you can see below:

$ pacmd list-clients
2 client(s) logged in.
    index: 0
	driver: <module-systemd-login.c>
	owner module: 17
	properties:
		application.name = "Login Session c1"
		systemd-login.session = "c1"
    index: 8564
	driver: <cli.c>
	owner module: 22
	properties:
		application.name = "UNIX socket client"

Any help regarding this issue would be appreciated.

Last edited by Fred7109 (2017-04-23 17:46:09)

Offline

#2 2017-04-23 13:21:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,739

Re: [SOLVED] Pacmd won't list sink inputs

Are you certain you aren't mistaking sinks and sink-inputs? Sinks are your sound cards, sink-inputs are what applications create when producing sound. Neither of your commands show any currently active, soundproducing client and I seriously doubt that to be different in pavucontrol.

You might want to post your /etc/pulse/client.conf and

printenv | grep PULSE

Last edited by V1del (2017-04-23 13:47:49)

Offline

#3 2017-04-23 13:45:16

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [SOLVED] Pacmd won't list sink inputs

Hello V1del

Thank you for your reply.

I don't think I'm confusing sink-inputs with sinks, as the problem is that I want to mute spotify, however, the script depends on the listings of the command

pacmd list-sink-inputs

Spotify is running and playing, the same is firefox, and both of the applications inputs are shown in pavucontrol, but still no result with the above-mentioned command.

Offline

#4 2017-04-23 13:53:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,739

Re: [SOLVED] Pacmd won't list sink inputs

Oh wait you are the same person with the broken session bus. This is really something you should look into fixing first. How do you login? if you use startx to start X what are the contents of ~/.xinitrc ?

Can you post

printenv
loginctl show-session c1
sudo fuser -v /dev/snd/*

Last edited by V1del (2017-04-23 13:55:57)

Offline

#5 2017-04-23 14:18:47

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [SOLVED] Pacmd won't list sink inputs

Hello V1del

Thank you your reply and the help regarding this issue.

Yes, I have quite some problems right now. I login automatically with the use of /etc/X11/xinit/xinitrc, so I don't have the file ~/.xinitrc.

I have posted the output as requested below and the output /etc/X11/xinit/xinitrc, as this is the one I use to login automatically:

/etc/X11/xinit/xinitrc

$ cat /etc/X11/xinit/xinitrc
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

printenv

$ printenv
LANG=en_DK.utf8
SUDO_GID=0
DISPLAY=:0.0
COLORTERM=truecolor
USERNAME=frederik
SUDO_COMMAND=/usr/sbin/bash /home/frederik/Documents/Scripts/Shell/Startup/Programs_start.sh
USER=frederik
PWD=/home/frederik
HOME=/home/frederik
SUDO_USER=root
SUDO_UID=0
MAIL=/var/mail/frederik
SHELL=/bin/bash
VTE_VERSION=4601
TERM=xterm-256color
LC_MESSAGES=en_DK.utf8
SHLVL=3
LANGUAGE=en_DK.utf8
WINDOWID=81788931
LOGNAME=frederik
XAUTHORITY=/tmp/libgksu-i74Tym/.Xauthority
PATH=/usr/sbin:/sbin:/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
_=/usr/sbin/printenv

loginctl show-session c1

$ loginctl show-session c1
Id=c1
User=1000
Name=frederik
Timestamp=Sun 2017-04-23 14:35:03 CEST
TimestampMonotonic=46379169
VTNr=1
Seat=seat0
TTY=tty1
Display=:0
Remote=no
Service=lxdm
Scope=session-c1.scope
Leader=748
Audit=0
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=no

sudo fuser -v /dev/snd/*

$ sudo fuser -v /dev/snd/*
[sudo] password for frederik: 
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  frederik    865 F.... pulseaudio
                     frederik   2004 F.... pulseaudio
/dev/snd/controlC1:  frederik    865 F.... pulseaudio
                     frederik   2004 F.... pulseaudio

Looking forward to your reply.

Last edited by Fred7109 (2017-04-23 14:31:24)

Offline

#6 2017-04-23 16:22:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,792

Re: [SOLVED] Pacmd won't list sink inputs

Fred7109 wrote:

... I have quite some problems right now. I login automatically with the use of /etc/X11/xinit/xinitrc, so I don't have the file ~/.xinitrc.

So this means you are using TWM?  Your session opens with three terminals and a clock?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2017-04-23 16:39:58

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [SOLVED] Pacmd won't list sink inputs

Hello ewaller

Thank you for your reply.

I must admit that it's a long time since I configured the bootup proces, but XFCE starts up just fine - as one would expect with the graphical frontend. I don't use TWM, but just the standard XFWM window manager included in the XFCE environment.

Offline

#8 2017-04-23 17:04:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,739

Re: [SOLVED] Pacmd won't list sink inputs

You are using LXDM to start your xorg session, and lxdm doesn't seem to run the necessary scripts that would setup your session correctly. I'm unfamiliar with it, but you'd have to configure it to at least run /etc/X11/xinit/xinitrc.d/50-systemd-user.sh at some point. That way the necessary env variables would be setup that will give you a working DBUS which in turn will give you a working pulseaudio without the need to start a second instance yourself which is what is happening currently and naturally leading to issues such as the one in this and your earlier thread.

Offline

#9 2017-04-23 17:29:14

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [SOLVED] Pacmd won't list sink inputs

Hello V1del

Thank you for your reply.

I have just se myself in the startup proces again, and I can confirm that all scripts in /etc/X11/xinit/xinitrc.d are being ran upon boot. It is because I use XFCE with the LXDE display manager, and the LXDE display manager doesn't use the file ~/.xinitrc, but a xprofile stored /etc/lxdm/Xsession (see Link).

I may also suspect something else, I don't use the normal DBUS package, as this give me problems, so I use the DBUS-x11 package from AUR.

Last edited by Fred7109 (2017-04-23 17:34:48)

Offline

#10 2017-04-23 17:44:45

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [SOLVED] Pacmd won't list sink inputs

Hello everyone

I finally solved this issue, so I will just say thank you for your help! smile

I found that a variable was set incorrectly, and if you ask me why, I don't have a clue, because I definitely haven't touched that. It is the variable XDG_RUNTIME_DIR that wasn't set to /run/user/`id -u`, so I sat the variable with the below command and it all works now - both DBUS and Pacmd.

export XDG_RUNTIME_DIR=/run/user/`id -u`

Last edited by Fred7109 (2017-04-23 17:45:51)

Offline

Board footer

Powered by FluxBB