Link500
Posts: 24
Joined: Wed Aug 01, 2018 3:42 am

Pulseaudio error connection refused.

Sat Oct 05, 2019 2:17 pm

Ok so I’ve been running into an error with my new raspberry pi 4.

I’m trying to use gqrx, I installed it via the add/remove software option since attempting too directly from the website the old way always gave me far more errors than this one ever since buster released.

So i get it installed, and it seemed like it worked at first...problem was there was no audio, I tried to switch to the analog function since I’m trying to run it through a Bluetooth speaker via its auxiliary/headphone jack, problem with that is as soon as i check the analog option it gets stuck at 2% volume, and soon as i try to raise the volume it immediately disables the analog AND hdmi options so neither is checked.

After this I just straight up reinstalled raspbian to see if maybe something some how got corrupted in the install(has happened before and figured no big deal since I didn’t have anything else on the pi) soon as I did this I’d get the pulseaudio error mentioned in the title and gqrx won’t start at all.

I then attempted something I read online about the error about completely uninstalling and reinstalling pulseaudio through terminal, and after doing that it went right back to the other issue where the analog and hdmi would get stuck at 2% volume and any attempts at increasing it would disable them.


When the issue with the volume being stuck on 2% happens, gqrx “technically” runs, as in its picking up signals can change frequencies etc, and I’m sure if i just recorded and saved a session and played it back as a file it’d probably work (haven’t tested this yet of course), but when I get the pulseaudio error it just stops the program from even starting.

Link500
Posts: 24
Joined: Wed Aug 01, 2018 3:42 am

Re: Pulseaudio error connection refused.

Sat Oct 05, 2019 10:56 pm

Anyone have any suggestions...?

Link500
Posts: 24
Joined: Wed Aug 01, 2018 3:42 am

Re: Pulseaudio error connection refused.

Sun Oct 06, 2019 5:32 pm

Bump....

Anyone? I’m still not quite sure what I’d need to do to fix this...

User avatar
B.Goode
Posts: 13944
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Pulseaudio error connection refused.

Sun Oct 06, 2019 5:42 pm

Link500 wrote:
Sun Oct 06, 2019 5:32 pm
Bump....

Anyone? I’m still not quite sure what I’d need to do to fix this...


Most support and advice in these forums is offered by volunteers donating their own free time. Maybe noone with both the skills and inclination to respond has logged on in the 24 hours or so since your query. (It is a weekend in Europe and the Americas.)

Your area of concern, pulseaudio and gqrx, is very narrow - perhaps there are a limited number of volunteers with overlapping interests.

And as a practicality, these forums have an Unanswered Topics search. By your own action your question would have been suppressed from the results of that search.



This might be relevant, although it may not offer a solution::https://github.com/csete/gqrx/issues/693

Link500
Posts: 24
Joined: Wed Aug 01, 2018 3:42 am

Re: Pulseaudio error connection refused.

Sun Oct 06, 2019 6:05 pm

B.Goode wrote:
Sun Oct 06, 2019 5:42 pm
Link500 wrote:
Sun Oct 06, 2019 5:32 pm
Bump....

Anyone? I’m still not quite sure what I’d need to do to fix this...

And as a practicality, these forums have an Unanswered Topics search. By your own action your question would have been suppressed from the results of that search.



I...actually didn’t realize that, sorry... I’ll keep that in mind next time I need help, I’m used to forums where questions for help get buried and forgotten after leaving the first page...

I’ll try the link you sent and see if it helps with anything.

Doug_
Posts: 194
Joined: Tue Oct 08, 2019 6:40 pm

Re: Pulseaudio error connection refused.

Tue Oct 08, 2019 6:46 pm

Install pavucontrol to manage pulse audio. Works for me on RPI4b

W1PJE
Posts: 1
Joined: Tue Oct 08, 2019 6:47 pm

Re: Pulseaudio error connection refused.

Tue Oct 08, 2019 6:49 pm

Hello,

Make sure pulseaudio is installed:

sudo apt-get install pulseaudio

Then open a terminal and start the server:

pulseaudio -D

Make sure gqrx is installed:

sudo apt-get install gqrx-sdr

Then gqrx should work fine. I just tried it.

---- W1PJE

Link500
Posts: 24
Joined: Wed Aug 01, 2018 3:42 am

Re: Pulseaudio error connection refused.

Wed Oct 09, 2019 6:00 am

W1PJE wrote:
Tue Oct 08, 2019 6:49 pm
Hello,

Make sure pulseaudio is installed:

sudo apt-get install pulseaudio

Then open a terminal and start the server:

pulseaudio -D

Make sure gqrx is installed:

sudo apt-get install gqrx-sdr

Then gqrx should work fine. I just tried it.

---- W1PJE
Just Tried this now.

It showed that pulseaudio was already installed and the newest verison, same with gqrx. When I attempted pulseaudio -D, it said "Daemon Startup failed"

unfortunately the issue with it always reverting to 2% volume anytime I attempt to click analog or hdmi is still there, and soon as I try to increase the volume it disables both.

Link500
Posts: 24
Joined: Wed Aug 01, 2018 3:42 am

Re: Pulseaudio error connection refused.

Wed Oct 09, 2019 2:06 pm

This is probably a really dumb question but, since I’m still new to linux based systems like rasbian...is there a way to run gqrx without pulseaudio at all? Or install it without having pulseaudio installed with it? Every time i try to uninstall pulseaudio it automatically removes gqrx with it, and from what I’ve been seeing so far the issue is directly related to pa itself, since soon as I remove it the analog and hdmi options work normally again, allowing me to select them and increase/decrease volume on them normally again.

For what I’m wanting to use gqrx for(a portable sdr I can take with me and control through vnc on my phone, with a speaker directly connected to the 3.5mm jack on the pi) pulseaudio isn’t really something I think I need anyway.

MishMich
Posts: 11
Joined: Fri Nov 23, 2012 9:35 am

Re: Pulseaudio error connection refused.

Sat Mar 21, 2020 1:44 am

Hi,

I'm experiencing a similar, but slightly different issue. I am trying to set up an application written in GnuRadio & ported to the RPi4. Basically, to receive FM radio & cast it to an amp with a bluetooth dongle in the garage (only way to get FM radio into the garage). This is for when there is no internet access from the property. It all works via my USB soundcard plugged into an amp, & via the HDMI to a portable TV. But, switching to Bluetooth device showed a connection, but the sound continued through the previously activated device, not the bluetooth device. The only limited success was with the hadphones, as these did show up in VLC (the other two devices did not), but the audio was phased on/off every couple of seconds.

I tried various things, none of which worked, and eventually purged pulse completely. Success! of sorts... VLC & Rythmbox did not pick up any pf the devices at all now. However, using the browser on YouTube or the national broadcaster player worked fine - through whichever bluetooth device I selected. My GnuRadio application worked OK as well - except it just stopped running after a few minutes. I will try again and check the CPU usage at some point, in case it is a throttling issue. That is when I discovered GQRX had gone. I had to re-install it. And when I tried to run it, it complained about the missing pulse audio files.

So, there you have it. GQRX seems to depend on Pulseaudio, but pulseaudio doesn't work correctly with bluetooth - it makes the connection but fails to route the audio through to the device. I have wasted a lot of time in the past with pulseaudio & midi, and don't have the will to go down that rabbit hole again, because it is extremely flaky even on a PC, and that has been compounded in the RPi from what I can tell - and there is very limited documentation about how it works, how it should work, or how to fix problems when it doesn't. The best advice I have read is to purge it and avoid it. But, for some reason, som key applications rely on it to work.

If I get any further with this, I'll let you know (if you are still following this thread) - and likewise, if you have any further info, I'd appreciate knowing where you eventually got to with this. There are instructables & YouTube videos about setting up the RPi for RTL-SDR, but I found it more useful to get things working on a linux laptop first, then trying to replicate that on the RPi.

On the laptop I used Mint Cinnamon 19.4, and it was all sweet - but Ubuntu 18.4 was a bit of nightmare (so steer clear). There is a huge load of discrepancies between the GnuRadio version, the QT & Python versions libraries, and the cmake utility - and it looked like the only way round that would be to set up a full blown development environment with IDE and build everything from scratch from G/C++ up to ensure all the versions work together. One of the issues is that nobody is looking after at least one part of that chain anymore, so there is a break in one layer of compatibility from what I can tell. Mint seems to use the last compatible set of libraries, whereas Ubuntu uses the latest release of GnuRadio.

GQRX is built out of GnuRadio - so there are implications for that moving forwards.

I would suggest (& may try) the Ubuntu build for the RPi, but given what I said above, I suspect that is going to be more frustrating than the Raspberry Debian build - and at least that seems to have a full set of compatible libraries ported to ARM that means GnuRadio works & anything written using it elsewhere just ports across without any obvious issues. The pulseaudio thing appears to be a feature within GQRX, because GnuRadio seems to work without the pulse libraries installed.

Of course, I could be talking BS, but that is where I got to.

DirkS
Posts: 10744
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Pulseaudio error connection refused.

Sat Mar 21, 2020 8:01 am

MishMich wrote:
Sat Mar 21, 2020 1:44 am
I'm experiencing a similar, but slightly different issue.
Then you should start a new topic.
It also gives you a better chance of getting help. Many users will not see your issue if you tag on to an old topic...

MishMich
Posts: 11
Joined: Fri Nov 23, 2012 9:35 am

Re: Pulseaudio error connection refused.

Wed Jun 17, 2020 3:37 am

I fixed it by removing pulse audio, and only running software that relied on ALSA. I did find that now and then, something would try and put Pulse back (noticed when things stopped working). So, had to purge pulse again. I now have bluetooth out working, and airplay in working. I'd forgotten what a can of worms pulse was (& still is, by the look of it - I'd assumed after over a decade of this type of thing, linux audio was sorted out).

MishMich
Posts: 11
Joined: Fri Nov 23, 2012 9:35 am

Re: Pulseaudio error connection refused.

Wed Jun 17, 2020 3:41 am

I put my original reply here because it related to RPi4, RF, GQRX & bluetooth. My response was sharing my experience with RPi4, RF (RTL-SDR), GnuRadio, & bluetooth.

Link500
Posts: 24
Joined: Wed Aug 01, 2018 3:42 am

Re: Pulseaudio error connection refused.

Wed Jun 17, 2020 4:13 am

I didn't expect to get a reply here again.....wow.

Anyway, I'm focused on a few other projects right now. I ditched the idea of GQRX entirely right now since it uses pulseaudio and it was such a nightmare for me. While I did like the simplicity of GQRX, I have ended up just staying with CubicSDR for now. It just works right off the bat, and lets me get to listening in my car quicker and with less headache.

I'll eventually get back to it, but like I said...other projects, in my case kinda the polar opposite of anything dealing with the pi. I'm in the process of working on and collecting older electronics right now. Specifically old radios. just recently got two tube ones from the 40s and early 50s. These have proven more challenging in some regards, though also far more fun for me, and the knowledge I might be holding something from the WW2 era kinda leaves a feeling on me that is hard to describe.

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Pulseaudio error connection refused.

Wed Jun 17, 2020 6:15 am

MishMich wrote:
Wed Jun 17, 2020 3:41 am
I put my original reply here because it related to RPi4, RF, GQRX & bluetooth. My response was sharing my experience with RPi4, RF (RTL-SDR), GnuRadio, & bluetooth.

Yes PulseAudio has caused issues since the release of Raspbian Stretch 3 years ago when it was removed and replaced entirely by ALSA, unfortunately many guides / tutorials have not been updated.
Take what I advise as advice not the utopian holy grail, and it is gratis !!

Return to “Troubleshooting”