How to change audio source in linux (KDE Plasma)?

how do i change the audio source from rear port to front audio in linux? and also how do i adjust the left and right balance for speakers?

im using Arch Linux with KDE Plasma

something like this would be useful
Windows-10-Audio-Source

1 Like

welcome to the DLN Forum @apoorv569! :+1: :fist_right: :fist_left:

To answer your question, KDE Plasma does have a mechanism in the system tray to change all of that stuff. Since you are using Arch you should have 5.18. I created a video that shows how to do it and you’ll find that below. I have my panel on the top rather than the bottom so its not exactly what it would look like on the default setup so keep that in mind.

3 Likes

What did you use to record that video?

but i dont see any option for the front audio jack. in windows i had the option for selecting the front audio source as shown in the orignal post photo.

here is the screenshot of my current session the headphones are connected right now to the front jack but no option

and in windows i have this, the Realtek HD Audio 2nd output is my front panel audio jack

i have to disable the front panel jack, to enable it :stuck_out_tongue:, its a bug they never bothered to fix it

Sorry for posting 3 separate posts i was unable to post more than 1 image.

PS - i only use windows for a couple of games :stuck_out_tongue:

I recommend you use pavucontrol-qt.

Under the “Configuration” tab, you can change the profile for your sound card. You need to make sure that a profile is selected, that fits the port. If you are trying to use an analog output (like a regular 3.5mm jack), the profile selected must contain either Analog Output or Analog Duplex.

Now you can go to the “Output Devices” tab and select the desired port on the drop-down list.

To adjust left/right balance, you first need to unlock the channels, You do this by clicking the padlock on your device.

Now you should have sliders for both channels available.

2 Likes

i installed pavucontrol-qt. yes i got the left right balance thing but my front panel audio jack is still not showing

however i noticed that when i set the output device to headphones (unplugged) i get audio to both the speakers and headphones at the same time which is not what i want

the audio balance thing should be in kde’s default volume control panel its such a basic feature. like so many other basic features. just saying :confused:

If they show up as the same output, they will need to be split. I have not tried it, but it is covered in the ArchWiki PulseAudio/Examples page.

Personally, I use hardware to accomplish the same thing and I have three different solutions I use on different machines.

When gaming, I use my HyperX Cloud headset, which comes with a USB adapter, so they show up as their own separate sound card and it is therefore very easy to select them directly in the volume menu. You can achieve a similar result with something like this.

For more advanced audio, I use a mixer with a USB port. This also shows up as it’s own sound card and I control the channels directly on the knobs on the mixer.

On my work PC, I have speakers and headset that both use 3.5mm jack, so I have a little audio switch attached to my desk. Something similar to this.

If your monitor has a headphone port and supports HDMI audio extraction, you can plug your speakers or headset into the monitor and select your graphics card for audio output. Alternatively, you can purchase a HDMI audio extractor for $10-30 on Amazon depending on the features that you need.

And yes, pavucontrol-qt is much better than the build-in audio controller. If I remember correctly, pavucontrol-qt used to be shipped with Kubuntu/KDE Neon, but was replaced with the simpler interface we have today.
Everybody keeps complaining about too many options in KDE tools, so maybe that was why.

1 Like

i tried what the arch wiki showed i copied the the lines to /etc/pulse/default.pa, and changed the master = (my master device name as shown in pacmd list-sinks)

pacmd list-sinks only showed 2 sinks by default the HDMI and the HDA Intel PCH. so gave the master device name of HDA Intel PCH. it has now created 2 more sinks named speakers and headphones but i dont get any sound on either speakers or headphones i have to use output that was originally there the Line Out output.

is this a KDE issue that cant separate audio source or that i have mainline arch so i dont have pre configured stuff or is it a general issue? just curious.

I am no expert on Pulse Audio, but I am fairly sure that is the default config.
The desktop environment shouldn’t matter at all, since pulse is a daemon that is running outside of it. You can even install pulseaudio instead of pulseaudio-qt, to get the Gnome version if you prefer it (it runs fine on Plasma desktops).

so there is no solution to my problem then :confused:
cant switch from rear audio jack to front audio jack.

I have no doubt that it is possible, but there might be details that vary from card to card and requires adjustments to the configuration.
A bit of searching turned up these two threads, sadly unresolved.
pulseaudio split front and rear audio - ArchLinux Forums
pulse audio can’t split rear and front jack output - LinuxQuestions.org

I would normally suggest you try the forums for the distro you are using, but since there is a similar unresolved issue on the ArchLinux forums, you could try going directly to the PulseAudio Community.

However, as I mentioned before, there are many workarounds to this issue and they are cheap, easy and in my opinion, better than having to go into sound preferences every time you need to change from headphones to speakers or vice versa.

i have this exact post posted on level1tech’s forum - How to change audio source in linux (KDE Plasma)? - #9 by Odemia - Linux - Level1Techs Forums

someone suggested that should look at alsamixer while switching from speakers to headphones in pavucontrol-qt as i was getting audio from both speakers and headphones at the same time by doing that so i took a look and noticed something (i deleted the sinks i created before in /etc//pulse/default.pa)

when im using default line out output (on the left in pavucontrol-qt) im getting audio from speakers marked with orange the front in alsamixer controls the volume of rear jack which is called line out in both pavucontrol-qt and kde volume manager which the alsa mixer has a line control if u look at alsamixer 4th from the right (the headphones volume in alsa is at max right now but i dont get any sound)

but when i change to headphones (on the left in pavucontrol-qt) im getting audio in headphones (marked green) and speakers (marked orange) same time but if i lower the volume of front in alsamixer (marked orange) i get audio in only headphones which is the front panel audio jack

well according to archwiki i ran “pacmd list-sinks” command and got this output there were 2 sinks 1 was the GPU HDMI output which is not useful here the other one is →

        name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9039
        volume: front-left: 15823 /  24% / -37.03 dB,   front-right: 15823 /  24% / -37.03 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 1
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        card: 1 <alsa_card.pci-0000_00_1f.3>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC892 Analog"
                alsa.id = "ALC892 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf220000 irq 127"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "a170"
                device.product.name = "100 Series/C230 Series Chipset Family HD Audio Controller"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                alsa.mixer_name = "Realtek ALC892"
                alsa.components = "HDA:10ec0892,1462f972,00100302"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
                        properties:

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-lineout>

then according to wiki i added these lines in “/etc/pulse/default.pa”

load-module module-remap-sink sink_name=speakers sink_properties="device.description='Speakers'" remix=no master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right

load-module module-remap-sink sink_name=headphones sink_properties="device.description='Headphones'" remix=no master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right

then i got 2 sinks in the system tray widget after logging out and logging back in but none of those 2 sinks give any output nor speakers neither headphones

https://imgur.com/a/dzfJXJO

i recently added this thread to r/kde (Reddit) page. i posted this there no help so far. still looking for a solution.

wow absolutely no help, i have this thread 5 different places everywhere people stopped responding after a while no one asks me for some info or terminal output that i show or try to fix this. :confused:

I’m not sure I’m understanding what you are trying to achieve right.
I’m assuming you want to select which output port sound is routed through (headphone jack in the front or speaker jack in the back)

For me it is automatically detected by kde when I plug my headset in and I can just select if I want the headphones or the speakers.

Screenshot_20200605_160721

I build this system recently and haven’t made any pulse audio tweaks yet so this is with “stock” arch configs.

If you are trying to route only a part of the sound to the front jack and the rest to the back then I have no idea how to do that.

i finally found the solution on Level1Techs Forum. check the solution there if you are facing similar problem.