Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sound coming out #1

Closed
eti0 opened this issue Mar 24, 2017 · 37 comments
Closed

No sound coming out #1

eti0 opened this issue Mar 24, 2017 · 37 comments

Comments

@eti0
Copy link

eti0 commented Mar 24, 2017

Hey

I'd love to try this out but I can't.
Seems like I cannot hear anything coming out either from my speakers and from my headset.
It's the same for both Chromium and ncmpcpp.

Here are some screenshots attached showing my settings.

screenshot from 2017-03-24 18-40-09
screenshot from 2017-03-24 18-42-38

Hope this might help.

@wwmm
Copy link
Owner

wwmm commented Mar 24, 2017

humm... If there are bars in the spectrum visualizer the application sound is passing through the gstreamer pipeline. From time to time this happens to me too and closing and opening pulseeffects "solves" the problem. This happens totally at random and I am still trying to understand if the problem is in the way I interact with Pulseaudio or Gstreamer. What do you see in pavucontrol and what is the output of pactl list sinks?

@eti0
Copy link
Author

eti0 commented Mar 24, 2017

Here's a paste bin of the output of pactl list sinks:
https://paste.teknik.io/Simple/J6NSE

@wwmm
Copy link
Owner

wwmm commented Mar 24, 2017

Here is the pastebin on one of my machines: http://pastebin.com/MRdTUBGX
Here on my machine the alsa_output.pci-0000_00_1b.0.analog-stereo device state is running when pulseeefects sink is state is running. Here is what I have in pavucontrol
pulseeffects_pavucontrol

@eti0
Copy link
Author

eti0 commented Mar 24, 2017

Hope you can debug this.
Here's a screenshot of how pavuctrl and pulseffects are setup when listening to some music.

2017-03-24-23 06 17

@wwmm
Copy link
Owner

wwmm commented Mar 25, 2017

Pavucontrol screenshot is very enlightening. For some bizarre reason in your machine PulseEffects is detecting its own sink as default and sending the audio to the "PulseEffects" sink instead of the "Built-in Audio Analog Stereo" sink. I will think about why this is happening in you configuration. In the mean time what you can do is using pavucontrol to change the output sink of PulseEffects from "PulseEffects" to "Built-in Audio Analog Stereo" (just click on the button on the left side of the mute icon)

@wwmm
Copy link
Owner

wwmm commented Mar 25, 2017

I was letting pulsesink gstreamer plugin choose its output sink automatically. I have released an updated version where its output is explicitly set on PulseEffects startup to the default pulseaudio output device (based on your pactl list sinks output this should be alsa_output.pci-0000_00_1b.0.analog-stereo). Let's see if this changes the situation

@eti0
Copy link
Author

eti0 commented Mar 25, 2017

Hey, I tried updating but all that does is make crashes more often. :/

@kolorafa
Copy link

kolorafa commented May 2, 2017

I just had the same problem with "no sound" on PE1.2.6.
The resolution was to go to "Recording" tab in pulseaudio and switch PulseEffects to records from "PulseEffect Monitor" because by default it did listen to mic.

Related: #8

@flipwise
Copy link
Contributor

The way to have PulseEffects working is that it defaults to Built-in Audio Stereo in the inputs section and Monitor of PulseEffects in the recording section. However, the app resets both these options each time it's started again, which results in muting of sound really. Any idea on how to save the preference for the right streams?

@wwmm
Copy link
Owner

wwmm commented May 25, 2017

Hi,

On startup Pulseeffects asks Pulseaudio the name of the default output sink and uses it for sound output. Do you have more than one soundcard?

@flipwise
Copy link
Contributor

Hello,

Just one sound card, but for playback I do have the added options of Pulse's FFT equalizer and Analog Stereo with echo cancellation. I managed to have it default to the right playback stream now (through Phonon Audio and Video settings), however, in Recording streams PulseEffects still keeps defaulting to recording my webcam, but this I don't know how to change because there is no "Monitor of PulseEffects" option in Phonon settings. Having recording default to "Built-in Analog Stereo" also doesn't produce any sound, it has to only be set manually in pavucontrol to "Monitor of PulseEffects" for any sound to come out.

Pic: https://i.imgur.com/Xif2qC1.png

@wwmm
Copy link
Owner

wwmm commented May 26, 2017

Pulseeffects has to record from "Monitor of Pulseeffects". This is the monitor of the pulseaudio null sink we are redirecting applications output to. What I don't understand is why on some installations it is taking other sources. If you run:

GST_DEBUG=2 pulseeffects

Is there any message related to Pulseeffects monitor?

@kolorafa
Copy link

kolorafa commented May 26, 2017

$ GST_DEBUG=2 pulseeffects
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
0:00:00.221311481 7201 0xf6b870 ERROR default gstvaapi.c:234:plugin_init: Cannot create a VA display

That's all i get when running it, and my recording is set to microphone not Monitor.
PE 1.3.0

@kolorafa
Copy link

kolorafa commented May 26, 2017

PulseEffects 1.4.1
no output, nothing while running GST_DEBUG=2 pulseeffects but still recording from mic not monitor

and while closing (X):
0:00:30.221016542 8776 0x7f47d8002000 WARN audiosrc gstaudiosrc.c:221:audioringbuffer_thread_func: error reading data -1 (reason: Sukces), skipping segment

@wwmm
Copy link
Owner

wwmm commented May 27, 2017

Hi

I added a few log messages to the latest version. Here I have the following output when running pulseeffects from the command line:

wallace@wwmm ~ $ pulseeffects
15:45:07.373 - PulseEffects - INFO - pulseaudio context started
15:45:07.373 - PulseEffects - INFO - pulseaudio version: 10.0
15:45:07.373 - PulseEffects - INFO - default pulseaudio source: alsa_input.pci-0000_27_00.0.analog-stereo
15:45:07.374 - PulseEffects - INFO - default pulseaudio sink: alsa_output.pci-0000_27_00.0.analog-stereo
15:45:07.374 - PulseEffects - INFO - default pulseaudio sink sampling rate: 48000 Hz. We will use the same rate.
15:45:07.374 - PulseEffects - INFO - loading Pulseeffects sink...
15:45:07.375 - PulseEffects - INFO - sink idx: 76
15:45:07.376 - PulseEffects - INFO - Pulseeffects sink was successfully loaded
15:45:07.376 - PulseEffects - INFO - Pulseeffects sink monitor name: PulseEffects.monitor. We will process audio from this source.

Is there any difference in your machine?

@kolorafa
Copy link

kolorafa commented May 27, 2017

$ pulseeffects
22:54:13.542 - PulseEffects - INFO - pulseaudio context started
22:54:13.543 - PulseEffects - INFO - pulseaudio version: 10.0
22:54:13.543 - PulseEffects - INFO - default pulseaudio source: alsa_input.pci-0000_00_1b.0.analog-stereo
22:54:13.543 - PulseEffects - INFO - default pulseaudio sink: alsa_output.pci-0000_00_1b.0.analog-stereo
22:54:13.543 - PulseEffects - INFO - default pulseaudio sink sampling rate: 44100 Hz. We will use the same rate.
22:54:13.543 - PulseEffects - INFO - loading Pulseeffects sink...
22:54:13.544 - PulseEffects - INFO - sink idx: 33
22:54:13.544 - PulseEffects - INFO - Pulseeffects sink was successfully loaded
22:54:13.544 - PulseEffects - INFO - Pulseeffects sink monitor name: PulseEffects.monitor. We will process audio from this source.

Defaulting to Mic. PE 1.4.2

@kolorafa
Copy link

kolorafa commented May 27, 2017

Something was stuck in PulseAudio from prev versions or something, i did
$ killall pulseeffects
the output pulseeffect device was there

$ pulseaduo -k
$ pulseeffects

and now it looks normal, it sets to Monitor

@wwmm
Copy link
Owner

wwmm commented May 27, 2017

The output remaining there after a killall is expected as the code that would unload the null sink will not be called in this case. But I have no idea why restarting pulseaudio seems to have solved the issue...

Assuming that this bug is related to some misconfiguration on pulseaudio's side it may be worth to remove the folder ~/.config/pulse and then restarting pulseaudio. I would also verify if the files under /etc/pulse have been edited.

@kolorafa
Copy link

PE1.4.4
The problem is back, but no change in the log:
$ pulseeffects
21:27:58.117 - PulseEffects - INFO - pulseaudio context started
21:27:58.118 - PulseEffects - INFO - pulseaudio version: 10.0
21:27:58.118 - PulseEffects - INFO - default pulseaudio source: alsa_input.pci-0000_00_1b.0.analog-stereo.echo-cancel
21:27:58.118 - PulseEffects - INFO - default pulseaudio sink: alsa_output.pci-0000_00_1b.0.analog-stereo
21:27:58.118 - PulseEffects - INFO - default pulseaudio sink sampling rate: 44100 Hz. We will use the same rate.
21:27:58.118 - PulseEffects - INFO - loading Pulseeffects sink...
21:27:58.119 - PulseEffects - INFO - sink idx: 36
21:27:58.119 - PulseEffects - INFO - Pulseeffects sink was successfully loaded
21:27:58.119 - PulseEffects - INFO - Pulseeffects sink monitor name: PulseEffects.monitor. We will process audio from this source.

And once more, pulseaudio -k, and works normally.
Hmm, what is the difference ... other than few day of running pulseaudio nonstop.

@eti0
Copy link
Author

eti0 commented Jun 3, 2017

It's been a while so I decided to retry compiling and see if it works.
I'm still having issues getting any playback.

2017-06-03-15 43 21

I know pretty much nothing about pulseaudio but I didn't touch any config files.
If you want the errors that are printed to the console here's a pastebin.

@wwmm
Copy link
Owner

wwmm commented Jun 4, 2017

Hi,

The error IndexError: list index out of rangecan be solved resetting the key equalizer-user in dconf. Here is mine:

screenshot from 2017-06-03 21-52-27

@kolorafa
Copy link

kolorafa commented Jun 4, 2017

Question, because something is off.

The PE log it say "10:16:54.98 - PulseEffects - INFO - sink idx: 30"

but it's wrong, the module id is 30, but sink id is 3

Sink #3
State: IDLE
Name: PulseEffects
Description: PulseEffects
Driver: module-null-sink.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 30
Mute: no
Volume: front-left: 64224 / 98% / -0.53 dB, front-right: 64224 / 98% / -0.53 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: PulseEffects.monitor
Latency: 25901 usec, configured 40000 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "PulseEffects"
device.class = "abstract"
device.icon_name = "audio-card"
Formats:
pcm

Module #30
Name: module-null-sink
Argument: sink_name=PulseEffects sink_properties=device.description='PulseEffects' channels=2 rate=44100
Usage counter: 1
Properties:
module.author = "Lennart Poettering"
module.description = "Zegarowy PUSTY odp<82>yw"
module.version = "10.0"

Or maybe it's related to some PA modules that "remember" the last sink or something.

@wwmm
Copy link
Owner

wwmm commented Jun 4, 2017

Thanks for noticing this kolorafa. I was printing the wrong index in the info message. I fixed that in the latest version.

As to the original problem I have to admit I am running out of ideas. So I will explain the main workflow in PulseEffects hoping that other people may have a clue about the source of the problem. One of the first things done is loading a Pulseaudio null sink. The process is equivalent to the command pacmd load-module module-null-sink. If this module is successfully loaded there will be a null sink named PulseEffects in the output of the command pacmd list-sinks. The applications sound is redirected to this sink when the corresponding switch is changed to on. There will also be a sink-input related to PulseEffects in the output of the command pacmd list-sink-inputs and a source named PulseEffects.monitor in the output of the command pacmd list-sources. The Gstreamer pipeline (the one applying all the effects) has at its beginning a plugin called pulsesrc that has to record audio from the source PulseEffects.monitor. It can not be other source so I am telling the gstreamer plugin pulsesrc to use this source.

It seems to me that in some systems the gstreamer plugin pulsesrc is either ignoring the command to use PulseEffects.monitor as source or refusing to do so for some reason. But if that is the case I would expect to see some warn from Gstreamer. There is none =/ I have 3 totally different machines to test PulseEffects and none of them has this issue. Maybe there is something else moving pulsesrc away from PulseEffects.monitor... But I just have no idea about what would be doing this...

@kolorafa
Copy link

kolorafa commented Jun 5, 2017

I did add some log and it looks like it ignores the device property, maybe it was set to late?

def set_limiter_release_time(self, value):
    self.log.info('kolorafa source test1'+ self.audio_src.get_property('device'))
    self.log.info('kolorafa source test2'+ self.audio_src.get_property('current-device'))
    self.limiter.set_property('release-time', value)

14:40:18.709 - PulseEffects - INFO - kolorafa source test1PulseEffects.monitor
14:40:18.710 - PulseEffects - INFO - kolorafa source test2alsa_input.pci-0000_00_1b.0.analog-stereo

But the "too late" is also not totally correct because:

def set_source_monitor_name(self, name):
    self.audio_src.set_property('device', name)
    self.log.info('kolorafa sink test'+ name)
    self.log.info('kolorafa source test'+ self.audio_src.get_property('device'))
    self.log.info('kolorafa source test'+ self.audio_src.get_property('current-device'))

14:40:08.221 - PulseEffects - INFO - kolorafa source testPulseEffects.monitor
14:40:08.221 - PulseEffects - INFO - kolorafa source test

So it shows that there is no current-device property when device is set, so it doesn't look like it's to late.
Not only it doesn't use the specified one, it also plays on non-default sink.

I don't know exactly how the gstreamer plugin works but it looks like it's a upstream question.
How hard is to prepare example code that just start gstreamer with selected source and sink to test/report a bug?

@wwmm
Copy link
Owner

wwmm commented Jun 5, 2017

Try the following:

close PulseEffects and run:
pacmd load-module module-null-sink sink_name=test sink_properties=device.description=test

Put this code in a file test.py and run it:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst

import time

Gst.init(None)

class Test():

    def __init__(self):
        self.pipeline = self.build_pipeline()

        # Create bus to get events from GStreamer pipeline
        bus = self.pipeline.get_bus()
        bus.add_signal_watch()
        bus.connect('message', self.on_message)

        self.pipeline.set_state(Gst.State.PLAYING)
    def build_pipeline(self):
        pipeline = Gst.Pipeline()

        self.audio_src = Gst.ElementFactory.make('pulsesrc', 'audio_src')
        self.audio_sink = Gst.ElementFactory.make('pulsesink', 'audio_sink')

        self.audio_src.set_property('device', 'test.monitor')

        pipeline.add(self.audio_src)
        pipeline.add(self.audio_sink)

        self.audio_src.link(self.audio_sink)

        return pipeline
    def on_message(self, bus, msg):
        if msg.type == Gst.MessageType.ERROR:
            self.log.error(msg.parse_error())
            self.log.error(msg.parse_error_details())

t = Test()
time.sleep(60)

While the program is running open pavucontrol and see if it is recording from test.monitor device

To unload the null sink created for the test run pacmd unload-module module-null-sink

@kolorafa
Copy link

kolorafa commented Jun 6, 2017

Recording and playing from first alsa sink/source. Ignoring 'device' property and PA default.

@kolorafa
Copy link

kolorafa commented Jun 6, 2017

I just removed old gstreamer0.10 plugins, rebooted. And redo the test.

And got error in console:
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)

PE and Test still works, still use wrong sink, but maybe it's related.

And the funny part is that i got this message only once, first time.

Also opened bug ticket: https://bugzilla.gnome.org/show_bug.cgi?id=783464

@Nevondrax
Copy link

Nevondrax commented Jul 28, 2017

Same issue on my system as Kolorafa has. Also the test program is recording and playing on the first sink/source. No errors when i run pulseeffects with GST_DEBUG=2 though.

If i manually swap the recording source, it works.

OS: Arch x86_64 (Fully updated)

@wwmm
Copy link
Owner

wwmm commented Jul 28, 2017

I still don't know why on some systems gstreamer is ignoring the device property. Considering that in most of the installations the same version of gstreamer is working without problems maybe there is something else forcing it to take the wrong device. Does deleting the configuration files in ~/.config/pulse and restarting pulseaudio make any difference? Is there other softwares like the other equalizers available for pulseaudio running at the same time?

@wwmm
Copy link
Owner

wwmm commented Sep 27, 2017

As there hasn't been activity for a while and I still can't reproduce this issue in my machines I will close this issue. Feel free to reopen in case this is still a problem with the latest PulseEffects, GStreamer and PulseAudio

wwmm pushed a commit that referenced this issue Nov 6, 2017
Russian translation & bump version to 3.0.7
@castorinop
Copy link

i install with flatpak and the problem persist.
playing music and listening
start pulseeffects and stop listening but keep playing.

any way to debug using flatpak instalation?

@wwmm
Copy link
Owner

wwmm commented Nov 23, 2017

I did not understand what you said. In case you have no sound but you can see the spectrum run the command pactl list modules short and see if you have module-switch-on-connect in the output. If yes you will have to disable this module until the next version of pulseaudio is released.

@johnnyl33
Copy link

Hi. This problem persists in Pulseeffects 3.2.1. Wrong Playback stream sink by default (mic). I don't know how to make PE to take the correct output sink by itself.
screenshot_2018-03-12_13-51-04

@wwmm
Copy link
Owner

wwmm commented Mar 12, 2018

Are you using KDE or the latest Ubuntu? If yes then take a look at points 3,4 and 5 of FAQ. There are two Pulseaudio's modules known to conflict with PulseEffects.

@ge0rgecz
Copy link

ge0rgecz commented May 19, 2018

[UBUNTU 18.04 LTS] same problem here, no audio at all but wave-bars are moving, when I close pulseeffects sound is back (tested during MPV movie playback). It does not matter how you install (flatpack or ppa repo) always same result, everything is muted. And BTW your flatpak does not respect GNOME THEME settings. ... my pactl list sinks output https://pastebin.com/A4cbJTdD

@wwmm
Copy link
Owner

wwmm commented May 19, 2018

There are known problems with ubuntu and kde. Until Pulseaudio 12 is released their users will need some workarounds. Take a look at points 3,4 and 5 at FAQ

@jtibrewala
Copy link

Finally got Pulseeffects to work. My problem was it was conflicting with pulseaudio-equalizer. However I seem to get much better sound from the latter. What do I need to do to make pulseeffects as good as pulseaudio-equalizer?

wwmm pushed a commit that referenced this issue Feb 10, 2019
wwmm pushed a commit that referenced this issue Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants