How to set audio device priority in Linux Mint (PulseAudio)?

I use a T430 and would like to set up audio device priority between my laptop, bluetooth headphones, and external monitor. Essentially, I would like the headphones with highest priority, and when thats not connected, I would like it to route through the external monitor (Audio through miniDP port, provided by the nVidia driver). When the laptop isnt connected to either, then it should play through the internal speakers.

I can set the bluetooth headphones as a fallback device, but when its disconnected, it prefers the laptops internal speakers, and then I have to choose the external monitor ones. However, once I connect bluetooth headphones, I then have to make it route through the headphones again.

Is there a way to add a device as priority, and if unavailable, then to ignore it? I’m using Linux Mint 19.1 and PulseAudio 11.1 (if it matters)

Many thanks.

Sound does not work in many apps after upgrading to Ubuntu 18.04. I’m also trying to avoid Pulseaudio at all costs

Basically, I’m trying to get everything to use ALSA like I had on my old OS. Now with Ubuntu 18.04, I have some offline apps that sound great with ALSA but others such as firefox or Audacity that have no sound at all. I read from some online forums that you can get Alsa to run as the default sound device but I couldn’t figure out how to edit the config. I was only able to figure out how to disable Pulseaudio by setting the respawn to no and removing the ;. Anything beyond that was too confusing for me to understand but I really don’t want to be stuck without sound forever. Youtube and Audacity are important to me and I need to use them. Please help…

Crackling/static in Discord with default audio input port (PulseAudio)

Based on Crackling/static in Discord with default audio output port (PulseAudio) I was able to fix the static/crackling in Discord’s output, but now my friend is telling me that there’s also some crackling in my microphone, which isn’t the case on Windows for example. I was able to test and confirm this myself by going in to Discord’s settings and starting MIC TEST.

Internal Microphone Not Detected by Pulse Audio / PulseAudio Volume Control

I have a Lenovo X1 Carbon 7th Generation running Ubuntu 18.04.2 LTS.

I am unable to use the internal microphone, as the device does not appear to be detected at all by the system settings:

system

In pavucontrol, under the “Input Devices” tab I have “Port: Microphone (Unplugged)” as well as “Monitor of Built-in Audio Analog Stereo” with some random static, but no sound signal is actually being picked up (using for example arecord or any other audio recording software).

enter image description here

In the “Configuration” tab of pavucontrol, I’m using “Analog Stereo Duplex”, and have tried many other variants with no success.

enter image description here

Other things I’ve tried without success:

  1. Editing /usr/share/pulseaudio/alsa-mixer/paths/analog-output-speaker.conf, as described in this Launchpad Issue. This patch makes the “Internal Microphone” show up in the System Settings, but there is still no audio being detected.

  2. Editing /etc/modprob.d/alsa-base.conf using various different options, as described here, here, and here. Maybe someone has a line that worked for them?

  3. Setting the right channel to silence in pavucontrol, as described here.

  4. Muting/unmuting the Microphone (which is “Capture”) via alsamixer.

enter image description here

  1. aplay -L output is here .
  2. pactl list sources output is here.
  3. /proc/asound/cards output is:
~% cat /proc/asound/cards   0 [PCH            ]: HDA-Intel - HDA Intel PCH                       HDA Intel PCH at 0xea23c000 irq 167 

Microphone devices connected via the headphone jack or USB ports work fine, it is only the internal one that is not being picked up. Any help or ideas on getting the internal microphone to work would be greatly appreciated. Thanks.

How can I change PulseAudio port priorities?

I list sources and sinks as follows:

pactl list sources pactl list sinks 

The output I get is:

...     Ports:         analog-input-internal-mic: Internal Microphone (priority: 8900)         analog-input-headphone-mic: Microphone (priority: 8700)         analog-input-headset-mic: Headset Microphone (priority: 8800) ...     Ports:         analog-output-speaker: Speakers (priority: 10000)         analog-output-headphones: Headphones (priority: 9000, available)  

How do I change the priorities listed above and have them fixed at what I change them to? Note that I am not looking to set a default source and sink or to delete unwanted sources or sinks, I just want to be able to assign them different priorities.

Cannot stop pulseaudio in ubuntu studio 18.04

I do not want pulseaudio to start automatically, as I need jack to start first so that it can capture alsa. For some reason, pulseaudio keeps respawning:

$   ps aux | grep pulseaudio gdm        883  0.0  0.1 1156168 11452 ?       S<l  23:06   0:00 /usr/bin/pulseaudio --start --log-target=syslog ben       1334  0.0  0.1 1442008 13352 ?       S<l  23:06   0:00 /usr/bin/pulseaudio --start --log-target=syslog 

What I’ve tried:

I’ve set respawn = no in /etc/pulse/client.conf (nothing in ~/.config/pulse either)

I’ve disabled pulseaudio service and socket

systemctl --user disable pulseaudio.service systemctl --user disable pulseaudio.socket sudo systemctl disable pulseaudio 

Also why is gdm starting its own pulseaudio instance? If I try to kill that it respawns also. I looked in gdm’s homedir and there is no pulse config. I also tried masking pulseaudio socket/service for my user and gdm. The thing keeps respawning and I have no idea why.

Activating sound via pulseaudio on local machine while remotely logged in

Essentially, I am looking for an answer to this question:

How do I activate PulseAudio when only being logged in via ssh?

I see a bunch of responses on how to tunnel audio over SSH, play sound from a remote machine, etc. My task seems simpler.

I have my Ubuntu machine (just switched to Ubuntu from ~15 years of Fedora, so I hope folks will go easy on me) sitting next to me, it’s not headless, but I don’t normally log into it via the KB/Monitor. I do, though, log into it via ssh, use screen -x to re-attach to an existing session, where I have all of my long running processes.

One such process is streaming music, which is installed and works fine, assuming I have logged into the console.

But, I rarely do that. Otherwise, I just get the null sink. I have tried to set options in pa-prefs, and I want to heed the advice saying PulseAudio should not be run as –system in such an environment, but I can’t seem to find a way to get this working short of running pulseaudio as –system or running my audio streaming SW as root.

Help is absolutely appreciated. However, I.d like to keep the solution simple (SO, I’d prefer to not run the app locally, export the sound to a remote sink, and then run anotehr app on another machine to get sound, or more esoteric solutions like that). The Linux box has speakers itself, I just want to use them.

Jim

The priority of pulseaudio is not in the range of 0 to 139

The answer Process ‘niceness’ vs. ‘priority’ – Ask Ubuntu explained that

In linux system priorities are 0 to 139 in which 0 to 99 for real time and 100 to 139 for users. nice value range is -20 to +19 where -20 is highest, 0 default and +19 is lowest. relation between nice value and priority is :

However, the minus value appeared from the htop’s monitor

What’s the problem?

enter image description here

PulseAudio not selecting correct default sink, but using it?

I have a pair of USB speakers set as my default sink in pulseaudio, but they are never selected as default on boot. Audio does go through them by default, though. Or to put it another way, Ubuntu says the Dell Docking Station audio (see below) is selected, but the audio comes out the USB speakers. I have to go into settings and select the USB speakers to be able to adjust the volume.

Here’s a brief overview of my audio devices and how they’re connected:

$   pacmd list-sinks | grep -e 'name:' -e 'index:'   * index: 0     name: <alsa_output.usb-1130_USB_AUDIO-00.analog-stereo>     index: 1     name: <alsa_output.usb-DisplayLink_Dell_D3100_USB3.0_Dock_1610132157-02.analog-stereo>     index: 2     name: <alsa_output.pci-0000_00_1f.3.analog-stereo> 

The USB speakers are <alsa_output.usb-1130_USB_AUDIO-00.analog-stereo>, which are plugged into one of the USB ports on the above named Dell USB Docking Station. The output named for the USB dock is the audio jack on the dock itself.

In my default.pa file, the default sink is set with set-default-sink alsa_output.usb-1130_USB_AUDIO-00.analog-stereo

I do not intend to use the audio jack on the USB dock, so flat out disabling that audio device can be an option, so long as I’m able to use other USB audio devices.