LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-17-2017, 11:56 AM   #1
ninrod
LQ Newbie
 
Registered: Jul 2017
Distribution: arch
Posts: 3

Rep: Reputation: Disabled
pulseaudio not accepting connections from pactl or pavucontrol


In my arch system, only the headphone outputs audio.

the notebook speakers are muted.

My first thought was to engage the aptly named `pavucontrol` utility, which gets stuck trying to connect to the pulse server.

with further investigation I narrowed down to these commands that seem reproduce the core problem:

Code:
    ~ $ pulseaudio -k && pulseaudio -D -v
    I: [pulseaudio] main.c: Daemon startup successful.
    ~ $ ps aux |grep pulse
    ninrod    7920  0.0  0.0 199388  6904 ?        S<l  11:11   0:00 pulseaudio -D -v
    ninrod    7921  0.0  0.0  82768  3556 ?        S    11:11   0:00 /usr/lib/pulse/gconf-helper
    ninrod    7945  0.0  0.0  10800  2240 pts/0    S+   11:12   0:00 grep pulse
    ~ $ pactl info
    Connection failure: Connection refused
    pa_context_connect() failed: Connection refused
    ~ $
Seems that my pulse server is not allowing connections from `pactl` or any external clients, really.

I've also update my whole system, reinstaled pulse and created ~/.config/pulse with config files copied from /etc/pulse. no success.

What can I do to make it behave again?

here's the output of `pulseaudio -k && pulseaudio -vvvv`:

note: specially interesting are the two first lines of the output:

Code:
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
full output:

Code:
~ $ pulseaudio -k && pulseaudio -vvvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 10.0
D: [pulseaudio] main.c: Compilation host: x86_64-unknown-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wuns
afe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclarat
ion-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing
 -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto                                                       
D: [pulseaudio] main.c: Running on host: Linux x86_64 4.11.9-1-ARCH #1 SMP PREEMPT Wed Jul 5 18:23:08 CEST 2017
D: [pulseaudio] main.c: Found 4 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 5f605d1f46a347c1b8e8193eb8d378ed.
I: [pulseaudio] main.c: Session ID is c1.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/ninrod/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-10.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: System supports high resolution timers
D: [pulseaudio] memblock.c: Using shared memfd memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
D: [pulseaudio] database-tdb.c: Opened TDB database '/home/ninrod/.config/pulse/5f605d1f46a347c1b8e8193eb8d378ed-device-volumes.tdb'
I: [pulseaudio] module-device-restore.c: Successfully opened database file '/home/ninrod/.config/pulse/5f605d1f46a347c1b8e8193eb8d378ed-device-volumes'.
I: [pulseaudio] module.c: Loaded "module-device-restore" (index: #0; argument: "").
D: [pulseaudio] database-tdb.c: Opened TDB database '/home/ninrod/.config/pulse/5f605d1f46a347c1b8e8193eb8d378ed-stream-volumes.tdb'
I: [pulseaudio] module-stream-restore.c: Successfully opened database file '/home/ninrod/.config/pulse/5f605d1f46a347c1b8e8193eb8d378ed-stream-volumes'.
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1 added for object /org/pulseaudio/stream_restore1
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #1; argument: "").
D: [pulseaudio] database-tdb.c: Opened TDB database '/home/ninrod/.config/pulse/5f605d1f46a347c1b8e8193eb8d378ed-card-database.tdb'
I: [pulseaudio] module-card-restore.c: Successfully opened database file '/home/ninrod/.config/pulse/5f605d1f46a347c1b8e8193eb8d378ed-card-database'.
I: [pulseaudio] module.c: Loaded "module-card-restore" (index: #2; argument: "").
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: #3; argument: "").
I: [pulseaudio] module.c: Loaded "module-switch-on-port-available" (index: #4; argument: "").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-10.0/modules/module-udev-detect.so': success
D: [pulseaudio] module-udev-detect.c: /dev/snd/controlC0 is accessible: yes
D: [pulseaudio] module-udev-detect.c: /devices/pci0000:00/0000:00:1f.3/sound/card0 is busy: yes
I: [pulseaudio] module-udev-detect.c: Found 1 cards.
I: [pulseaudio] module.c: Loaded "module-udev-detect" (index: #5; argument: "").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-10.0/modules/module-jackdbus-detect.so': failure
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-10.0/modules/module-bluetooth-policy.so': failure
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-10.0/modules/module-bluetooth-discover.so': failure
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-10.0/modules/module-esound-protocol-unix.so': success
I: [pulseaudio] module.c: Loaded "module-esound-protocol-unix" (index: #6; argument: "").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-10.0/modules/module-gconf.so': success
I: [pulseaudio] module.c: Loaded "module-gconf" (index: #7; argument: "").
I: [pulseaudio] module-default-device-restore.c: Saved default sink 'auto_null' not existent, not restoring default sink setting.
I: [pulseaudio] module-default-device-restore.c: Saved default source 'auto_null.monitor' not existent, not restoring default source setting.
I: [pulseaudio] module.c: Loaded "module-default-device-restore" (index: #8; argument: "").
I: [pulseaudio] module.c: Loaded "module-rescue-streams" (index: #9; argument: "").
D: [pulseaudio] module-always-sink.c: Autoloading null-sink as no other sinks detected.
I: [pulseaudio] sink.c: Created sink 0 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.description = "Dummy Output"
I: [pulseaudio] sink.c:     device.class = "abstract"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
I: [pulseaudio] source.c: Created source 0 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Dummy Output"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
D: [null-sink] module-null-sink.c: Thread starting up
D: [pulseaudio] module-device-restore.c: Could not set format on sink auto_null
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: #11; argument: "sink_name=auto_null sink_properties='device.description="Dummy Output"'").
I: [pulseaudio] module.c: Loaded "module-always-sink" (index: #10; argument: "").
I: [pulseaudio] module.c: Loaded "module-intended-roles" (index: #12; argument: "").
D: [pulseaudio] module-suspend-on-idle.c: Sink auto_null becomes idle, timeout in 5 seconds.
I: [pulseaudio] module.c: Loaded "module-suspend-on-idle" (index: #13; argument: "").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-10.0/modules/module-console-kit.so': success
I: [pulseaudio] module.c: Loaded "module-console-kit" (index: #14; argument: "").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-10.0/modules/module-systemd-login.so': success
I: [pulseaudio] client.c: Created 0 "Login Session c1"
D: [pulseaudio] module-systemd-login.c: Added new session c1
I: [pulseaudio] module.c: Loaded "module-systemd-login" (index: #15; argument: "").
I: [pulseaudio] module.c: Loaded "module-position-event-sounds" (index: #16; argument: "").
D: [pulseaudio] stream-interaction.c: Using role 'phone' as trigger role.
D: [pulseaudio] stream-interaction.c: Using roles 'music' and 'video' as cork roles.
I: [pulseaudio] module.c: Loaded "module-role-cork" (index: #17; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-heuristics" (index: #18; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-apply" (index: #19; argument: "").
D: [pulseaudio] dbus-util.c: Successfully connected to D-Bus session bus c86d14444a13fcff6d4aad36596cbfd9 as :1.166
D: [pulseaudio] main.c: Got org.PulseAudio1!
D: [pulseaudio] main.c: Got org.pulseaudio.Server!
I: [pulseaudio] main.c: Daemon startup complete.
I: [pulseaudio] module-suspend-on-idle.c: Sink auto_null idle for too long, suspending ...
D: [pulseaudio] sink.c: Suspend cause of sink auto_null is 0x0004, suspending
D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
 
Old 07-17-2017, 07:49 PM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Australia
Distribution: IceWM on Debian
Posts: 5,490

Rep: Reputation: Disabled
I don't use arch and you have not uploaded your user configs from .config/pulse but I can duplicate your error like this

Code:
pulseaudio -k && pactl info
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
how?

first I go into the user config for client.conf and change autospawn line from yes to no
second I go into user config for default.pa and comment out the line for
load-module module-suspend-on-idle

Now I know you are going to tell me that you have the system suspend on idle....so my config is not the same as your config

exactly!

please upload each of configs and link to them, please don't post them here as it makes the post too long to read and IMHO may turn off people from reading your reply


so requests are:

1) provide download links for each of your configs sitting in .config/pulse

2) speaker volume may just need a volume adjustment so provide some details pls

Code:
aplay -l
aplay -l
alsamixer -c0
alsamixer -c1
take a screenshot of whichever alsamixer shows your headphone setting....it will show your speakers too
upload it to an image sharing site....I recommend imgur.com

3) pavucontrol may fail if PA has suspended, so it might be just a timing issue

which is why for you....before you post your configs....try disabling suspend first to see if it helps

in GUI it is likely to be called volume control or pulseaudio volume control .....and report you have resolved that issue

cheers

Last edited by aus9; 07-17-2017 at 07:51 PM.
 
Old 07-17-2017, 08:21 PM   #3
ninrod
LQ Newbie
 
Registered: Jul 2017
Distribution: arch
Posts: 3

Original Poster
Rep: Reputation: Disabled
hi @aus9, thanks for your help regarding this issue.

the information requested lives here.

I should inform that I've successfully fixed the external speaker volume through alsamixer.

The only problem that remains is that pavucontrol and pactl can't connect to the pulseaudio server.

I've tried the settings you recommended. the strange thing now is that `pactl info` now gets stuck indefinetly. pavucontrol also gets stuck indefinetly, trying to connect.


So TLDR; all is fine if I use alsamixer. But I wanted to use pavucontrol as it is the only way I know of to get the hdmi port to my TV working.
 
Old 07-18-2017, 06:39 PM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Australia
Distribution: IceWM on Debian
Posts: 5,490

Rep: Reputation: Disabled
post has been editted now that I am awake. PA=pulseaudio

thanks for the configs, there does not appear to have been any changes to your configs from the default.
Is that correct?

OK now that I can see you need to swap from hdmi for tv and headphones which uses analog lets try something

1) open a terminal as a normal user and I assume it opens at your home dir

Code:
sudo killall pulseaudio
rm -rf .config/pulse
pulseaudio -vvv
# pls post the results of pulseaudio -vvv in the forum and also the next 2 commands
ls -al .confifg/pulse
pavucontrol
what we did was to assume there was some dirty config or cookie file in .config/pulse
so we first killed PA, deleted the suspect configs and restarted PA


for me, pavucontrol gives no output and GUI starts but we are of course interested in what error msgs we get for yours.


2) not sure if arch is a systemd system but I can get some info from logs

after running above commands I run
Code:
journalctl -r
-r means most recent on top, a reversal of the norm

and my example
NOT OP aus9 example
Jul 19 08:29:41 neo pulseaudio[1880]: [pulseaudio] authkey.c: Failed to load authentication key '/home/gordon/.pulse-cookie': No such file or directory
Jul 19 08:23:45 neo pulseaudio[1237]: [pulseaudio] module-combine.c: We will now load module-combine-sink. Please make sure to remove module-combine from your configuration

#### off topic I can't see any module-combine in my config for default.pa if run as local user

any how the number of lines of PA in your log should be short enough if you just copy and paste those lines and not the whole log into your reply if you see any merit
--you will know the time you start the killall command so I prefer we don't see any log entries before that time

cheers

Last edited by aus9; 07-18-2017 at 07:50 PM.
 
Old 07-18-2017, 10:21 PM   #5
ninrod
LQ Newbie
 
Registered: Jul 2017
Distribution: arch
Posts: 3

Original Poster
Rep: Reputation: Disabled
implementing aus9 2-step hack

Hi @aus9, thanks again for helping me with this issue.

yes, arch uses systemd so we can go for step 2)

now, immediatelly I see a problem with step 1). PulseAudio is showing a phoenix like behaviour, as demonstrated by this terminal session:

Code:
    ~ $ pgrep pulseaudio
    6439
    ~ $ sudo killall pulseaudio
    ~ $ pgrep pulseaudio
    7086
    ~ $
Now I am lost. How can I effectively kill pulseaudio?

I think that if I am not able to kill pulseaudio, we can not effectivelly proceed with step 1), right?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Pulseaudio/Pavucontrol/Sound die after Upgrade/Kernel Upgrade mzsade Linux - Software 0 09-03-2015 02:44 PM
AVCONV WebCam/Audio recording (Pulseaudio) Pavucontrol Papymousofrench Debian 0 11-02-2014 01:45 PM
ipop3d not accepting connections Kurt M. Weber Slackware 4 10-04-2007 07:19 AM
VNC not accepting connections Red Squirrel Linux - Newbie 4 02-20-2004 08:55 PM
proftpd not accepting outside connections sohmc Linux - Software 0 07-18-2003 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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