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

KDE changing setting in pavucontrol required for audio output #104

Closed
joshirio opened this issue Nov 3, 2017 · 8 comments
Closed

KDE changing setting in pavucontrol required for audio output #104

joshirio opened this issue Nov 3, 2017 · 8 comments

Comments

@joshirio
Copy link

joshirio commented Nov 3, 2017

Hi, this is not really a bug report but I think it should be specified somewhere that on KDE (tested on Arch Linux and Manjaro KDE) pulseeffects requires manual intervention through the pavucontrol application to get audio output working. This is required on each start of pulseeffects and is not preserved after exit.

Steps required to get audio working:

  1. open pavucontrol, change to "Recording" tab, this is how it looks without pulseeffects running
    1_pulseeffects_not_started_yet

  2. start pulseeffects, now pavucontrol looks like this:
    2_pulseeffects_started_but_no_sound

  3. in pavucontrol change the second entry (first one doesn't work) of "Pulseeffetcs: record stream from" setting to "Monitor of pulseffects(app)"
    3_pulseeffects_started_with_sound

Maybe there's a way to apply that setting automatically on pulseeffects start?
And it's a bit odd, that there are two identical entries for "record stream from..." but only the second one works.

@wwmm
Copy link
Owner

wwmm commented Nov 3, 2017

Hi, could you perform the test below with PulseEffcts closed?

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(execute in a terminal python3 test.py):

#!/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

@wwmm
Copy link
Owner

wwmm commented Nov 3, 2017

The reason why I ask this test can be seen in this issue #1. It is not the first time this problem happens and I never understood why it happens only to a few people. What is happening is that for some reason gstreamer is not obeying the set_property command to used to set the recording device.

I never had this issue in any of my machines but I use gnome in all of them. So it could be desktop related. The correct devices are hard coded in PulseEffects. We just have to find out why in some installations gstreamer is ignoring these settings. Maybe there is some kind of global setting or application telling it to do otherwise

@wwmm
Copy link
Owner

wwmm commented Nov 3, 2017

The entries with record stream from... are not identical. It is Pavucontrol that is displaying them like this. there is not much I can do.

One of them must record from PulseEffects_apps in order to apply effects for applications and in case you have a recording application running there should be another one recording from the default microphone in order to apply effects for microphone output.

Other entries with record stream from... will be related to the application volume level meter

@joshirio
Copy link
Author

joshirio commented Nov 3, 2017

Yes here's the result while running test.py and pavucontrol:
screenshot_20171103_161920

Looks like it's working?

@joshirio
Copy link
Author

joshirio commented Nov 3, 2017

Now this is strange after running the commands above and after unloading with pacmd unload-module... Starting PulseEffects now works correctly without changing any setting.

Need to test that again after reboot.

EDIT: yes works even after reboot. So maybe after installing PulseEffects a reboot is required? Or after changing pavucontrol settings once a reboot is required to make it work automatically? Or can it be that the commands from above changed something and now it works?

@wwmm
Copy link
Owner

wwmm commented Nov 3, 2017

What happened in your machine is not the same that happened to other people. Otherwise the test code would not have worked. But I don't know why you faced this problem. There is no reason to reboot the system after installing PulseEffects. I did not have to do this in any of my non development machines. It should not be needed to restart Pulseaudio too.

Pulseaudio tries to remember the input and output devices set in Pavucontrol. So it is possible that it is working because it remembers the right device.

if pacmd unload-module helped it is possible that there were other null sinks loaded that somehow conflicted with PulseEffects null sinks. The output of the command pacmd list-modules has any null sink module besides the ones from PulseEffects?

@joshirio
Copy link
Author

joshirio commented Nov 3, 2017

result of pacmd list-modules:

Without PulseEffects running

27 module(s) loaded.
    index: 0
	name: <module-device-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the volume/mute state of devices"
		module.version = "11.1"
    index: 1
	name: <module-stream-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the volume/mute/device state of streams"
		module.version = "11.1"
    index: 2
	name: <module-card-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore profile of cards"
		module.version = "11.1"
    index: 3
	name: <module-augment-properties>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Augment the property sets of streams with additional static information"
		module.version = "11.1"
    index: 4
	name: <module-switch-on-port-available>
	argument: <>
	used: -1
	load once: no
	properties:
		
    index: 5
	name: <module-udev-detect>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Detect available audio hardware and load matching drivers"
		module.version = "11.1"
    index: 6
	name: <module-alsa-card>
	argument: <device_id="0" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1">
	used: 0
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "ALSA Card"
		module.version = "11.1"
    index: 7
	name: <module-bluetooth-policy>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Frédéric Dalleau, Pali Rohár"
		module.description = "Policy module to make using bluetooth devices out-of-the-box easier"
		module.version = "11.1"
    index: 8
	name: <module-bluetooth-discover>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "João Paulo Rechi Vita"
		module.description = "Detect available Bluetooth daemon and load the corresponding discovery module"
		module.version = "11.1"
    index: 9
	name: <module-bluez5-discover>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "João Paulo Rechi Vita"
		module.description = "Detect available BlueZ 5 Bluetooth audio devices and load BlueZ 5 Bluetooth audio drivers"
		module.version = "11.1"
    index: 10
	name: <module-esound-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "ESOUND protocol (UNIX sockets)"
		module.version = "11.1"
    index: 11
	name: <module-native-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Native protocol (UNIX sockets)"
		module.version = "11.1"
    index: 12
	name: <module-gconf>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "GConf Adapter"
		module.version = "11.1"
    index: 13
	name: <module-device-manager>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Keep track of devices (and their descriptions) both past and present and prioritise by role"
		module.version = "11.1"
    index: 14
	name: <module-default-device-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the default sink and source"
		module.version = "11.1"
    index: 15
	name: <module-rescue-streams>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "When a sink/source is removed, try to move its streams to the default sink/source"
		module.version = "11.1"
    index: 16
	name: <module-always-sink>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Hält stets ein Ziel geladen, selbst wenn dies ein Null-Ziel ist"
		module.version = "11.1"
    index: 17
	name: <module-intended-roles>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically set device of streams based on intended roles of devices"
		module.version = "11.1"
    index: 18
	name: <module-suspend-on-idle>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "When a sink/source is idle for too long, suspend it"
		module.version = "11.1"
    index: 19
	name: <module-console-kit>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Create a client for each ConsoleKit session of this user"
		module.version = "11.1"
    index: 20
	name: <module-systemd-login>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Create a client for each login session of this user"
		module.version = "11.1"
    index: 21
	name: <module-position-event-sounds>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."
		module.version = "11.1"
    index: 22
	name: <module-role-cork>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Mute & cork streams with certain roles while others exist"
		module.version = "11.1"
    index: 23
	name: <module-filter-heuristics>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Detect when various filters are desirable"
		module.version = "11.1"
    index: 24
	name: <module-filter-apply>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Load filter sinks automatically when needed"
		module.version = "11.1"
    index: 25
	name: <module-x11-publish>
	argument: <display=:0>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "X11 credential publisher"
		module.version = "11.1"
    index: 26
	name: <module-cli-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Command line interface protocol (UNIX sockets)"
		module.version = "11.1"

With PulseEffects running and active

29 module(s) loaded.
    index: 0
	name: <module-device-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the volume/mute state of devices"
		module.version = "11.1"
    index: 1
	name: <module-stream-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the volume/mute/device state of streams"
		module.version = "11.1"
    index: 2
	name: <module-card-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore profile of cards"
		module.version = "11.1"
    index: 3
	name: <module-augment-properties>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Augment the property sets of streams with additional static information"
		module.version = "11.1"
    index: 4
	name: <module-switch-on-port-available>
	argument: <>
	used: -1
	load once: no
	properties:
		
    index: 5
	name: <module-udev-detect>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Detect available audio hardware and load matching drivers"
		module.version = "11.1"
    index: 6
	name: <module-alsa-card>
	argument: <device_id="0" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1">
	used: 1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "ALSA Card"
		module.version = "11.1"
    index: 7
	name: <module-bluetooth-policy>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Frédéric Dalleau, Pali Rohár"
		module.description = "Policy module to make using bluetooth devices out-of-the-box easier"
		module.version = "11.1"
    index: 8
	name: <module-bluetooth-discover>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "João Paulo Rechi Vita"
		module.description = "Detect available Bluetooth daemon and load the corresponding discovery module"
		module.version = "11.1"
    index: 9
	name: <module-bluez5-discover>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "João Paulo Rechi Vita"
		module.description = "Detect available BlueZ 5 Bluetooth audio devices and load BlueZ 5 Bluetooth audio drivers"
		module.version = "11.1"
    index: 10
	name: <module-esound-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "ESOUND protocol (UNIX sockets)"
		module.version = "11.1"
    index: 11
	name: <module-native-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Native protocol (UNIX sockets)"
		module.version = "11.1"
    index: 12
	name: <module-gconf>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "GConf Adapter"
		module.version = "11.1"
    index: 13
	name: <module-device-manager>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Keep track of devices (and their descriptions) both past and present and prioritise by role"
		module.version = "11.1"
    index: 14
	name: <module-default-device-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the default sink and source"
		module.version = "11.1"
    index: 15
	name: <module-rescue-streams>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "When a sink/source is removed, try to move its streams to the default sink/source"
		module.version = "11.1"
    index: 16
	name: <module-always-sink>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Hält stets ein Ziel geladen, selbst wenn dies ein Null-Ziel ist"
		module.version = "11.1"
    index: 17
	name: <module-intended-roles>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically set device of streams based on intended roles of devices"
		module.version = "11.1"
    index: 18
	name: <module-suspend-on-idle>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "When a sink/source is idle for too long, suspend it"
		module.version = "11.1"
    index: 19
	name: <module-console-kit>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Create a client for each ConsoleKit session of this user"
		module.version = "11.1"
    index: 20
	name: <module-systemd-login>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Create a client for each login session of this user"
		module.version = "11.1"
    index: 21
	name: <module-position-event-sounds>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."
		module.version = "11.1"
    index: 22
	name: <module-role-cork>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Mute & cork streams with certain roles while others exist"
		module.version = "11.1"
    index: 23
	name: <module-filter-heuristics>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Detect when various filters are desirable"
		module.version = "11.1"
    index: 24
	name: <module-filter-apply>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Load filter sinks automatically when needed"
		module.version = "11.1"
    index: 25
	name: <module-x11-publish>
	argument: <display=:0>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "X11 credential publisher"
		module.version = "11.1"
    index: 26
	name: <module-cli-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Command line interface protocol (UNIX sockets)"
		module.version = "11.1"
    index: 31
	name: <module-null-sink>
	argument: <sink_name=PulseEffects_apps sink_properties=device.description='PulseEffects(apps)'device.class='sound' channels=2 rate=44100>
	used: 3
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Getaktetes NULL-Ziel"
		module.version = "11.1"
    index: 32
	name: <module-null-sink>
	argument: <sink_name=PulseEffects_mic sink_properties=device.description='PulseEffects(mic)'device.class='sound' channels=2 rate=44100>
	used: 0
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Getaktetes NULL-Ziel"
		module.version = "11.1"

No idea what to look at, I hope this is somehow useful, but since it is working fine now I can't reproduce the state that led to the issue.

@wwmm
Copy link
Owner

wwmm commented Nov 3, 2017

It is ok. I see nothing that would give a hint to the cause of the problem.

For now I will close this issue. Feel free to reopen it if the problem returns.

@wwmm wwmm closed this as completed Nov 3, 2017
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

2 participants