Set default audio device in preferences >> sound >> input

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
HackerCop
Level 1
Level 1
Posts: 7
Joined: Fri Apr 02, 2021 8:17 am

Set default audio device in preferences >> sound >> input

Post by HackerCop »

Hello, I have a Dell Inspiron 3482 laptop running Linux Mint 20.1 Ulyssa with the Cinnamon desktop, here's the result of inxi -Fxxxrz

Code: Select all

System:
  Kernel: 5.4.0-70-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 4.8.6 wm: muffin 4.8.1 dm: LightDM 1.30.0 
  Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: Dell product: Inspiron 3482 v: 1.7.1 serial: <filter> 
  Chassis: type: 10 serial: <filter> 
  Mobo: Dell model: 0DYPY5 v: A01 serial: <filter> UEFI: Dell v: 1.7.1 
  date: 07/22/2020 
Battery:
  ID-1: BAT1 charge: 29.1 Wh condition: 33.6/42.0 Wh (80%) volts: 12.3/11.4 
  model: COMPAL PABAS0241231 type: Li-ion serial: <filter> 
  status: Discharging 
CPU:
  Topology: Quad Core model: Intel Pentium Silver N5000 bits: 64 type: MCP 
  arch: Goldmont Plus rev: 1 L2 cache: 4096 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 8755 
  Speed: 2007 MHz min/max: 800/2700 MHz Core speeds (MHz): 1: 2007 2: 1964 
  3: 2363 4: 2212 
Graphics:
  Device-1: Intel UHD Graphics 605 vendor: Dell driver: i915 v: kernel 
  bus ID: 00:02.0 chip ID: 8086:3184 
  Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 605 (GLK 3) v: 4.6 Mesa 20.2.6 
  direct render: Yes 
Audio:
  Device-1: Intel vendor: Dell driver: snd_hda_intel v: kernel 
  bus ID: 00:0e.0 chip ID: 8086:3198 
  Sound Server: ALSA v: k5.4.0-70-generic 
Network:
  Device-1: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter 
  vendor: Dell driver: ath10k_pci v: kernel port: f040 bus ID: 02:00.0 
  chip ID: 168c:0042 
  IF: wlp2s0 state: up mac: <filter> 
  Device-2: Qualcomm Atheros type: USB driver: btusb bus ID: 1-4:2 
  chip ID: 0cf3:e009 
Drives:
  Local Storage: total: 238.47 GiB used: 170.73 GiB (71.6%) 
  ID-1: /dev/nvme0n1 model: PC SN520 NVMe WDC 256GB size: 238.47 GiB 
  speed: 15.8 Gb/s lanes: 2 serial: <filter> rev: 20240012 scheme: GPT 
Partition:
  ID-1: / size: 24.79 GiB used: 15.38 GiB (62.1%) fs: ext4 
  dev: /dev/nvme0n1p7 
Sensors:
  System Temperatures: cpu: 48.0 C mobo: N/A sodimm: 30.0 C 
  Fan Speeds (RPM): N/A 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
  1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com ulyssa main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  Active apt repos in: /etc/apt/sources.list.d/spotify.list 
  1: deb http://repository.spotify.com stable non-free
  Active apt repos in: /etc/apt/sources.list.d/vscode.list 
  1: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
Info:
  Processes: 234 Uptime: 1h 43m Memory: 7.59 GiB used: 1.61 GiB (21.2%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 


and I'm not getting audio output when I plug in headphones. So I went to preferences >> sound, lanched that and then went to the input tab and for my auxiliary (headphone) output to work the "Internal Microphone Built in audio" device must be selected, see screenshot https://ibb.co/hm1c1M2 The problem is that linux mint never selects this device by default meaning that I get no headphone output so every time I use headphones I have to select it manually. Is there a way to tell it to use the "Internal Microphone Built in audio" device by default when I plug something in. Thanks this is my first post so please let me know if I'm doing anything wrong.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
it-place
Level 3
Level 3
Posts: 188
Joined: Thu Jul 05, 2018 4:42 am

Re: Set default audio device in preferences >> sound >> input

Post by it-place »

Hi HackerCop,

I had a similar problem on a Dell notebook. I had to setup the sound for my headphones everytime I've restarted my system. :? My solution is to store the alsa settings in a config-file and reload them within an logon-script. To save your sound settings execute:

Code: Select all

alsactl --file $HOME/.config/asound.state store
To load this config execute:

Code: Select all

alsactl --file $HOME/.config/asound.state restore
Then you can use a little bash-script which can be autostarted using the Startup Application program.

Regards - Oliver
HackerCop
Level 1
Level 1
Posts: 7
Joined: Fri Apr 02, 2021 8:17 am

Re: Set default audio device in preferences >> sound >> input

Post by HackerCop »

Thanks for your quick reply Oliver really appreciated it however its still not quite working :?: I set my audio device correctly then I executed the top command:

Code: Select all

alsactl --file $HOME/.config/asound.state store 
and then added the second command to my startup applications like this: https://ibb.co/RYTPDHL (I've never used startup applications before I'm a linux noob but it looks very useful) hope I've done it right .

The problem is that when I click run now on my startup script it works but whenever I unplug and plug back in the headphones then the sound device changes and I have to set it back. I've tried restarting my computer obviously as its a startup script but the problem returns when I unplug and plug in again. Do you have any ideas?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Set default audio device in preferences >> sound >> input

Post by MrEen »

It's possible using PulseAudio Volume Control (pavucontrol) instead of Cinnamon's Sound Settings will fix this.

If not, it would be good to see this output in working and non working cases:

Code: Select all

curl https://gitlab.freedesktop.org/pulseaudio/pulseaudio/raw/master/src/utils/pa-info?inline=false | bash | nc termbin.com 9999
VinxR101
Level 1
Level 1
Posts: 2
Joined: Tue Apr 19, 2022 12:23 am

Re: Set default audio device in preferences >> sound >> input

Post by VinxR101 »

MrEen wrote: Sat Apr 03, 2021 2:31 pm It's possible using PulseAudio Volume Control (pavucontrol) instead of Cinnamon's Sound Settings will fix this.

If not, it would be good to see this output in working and non working cases:

Code: Select all

curl https://gitlab.freedesktop.org/pulseaudio/pulseaudio/raw/master/src/utils/pa-info?inline=false | bash | nc termbin.com 9999
It is a shame Pavucontrol does not have an applet to dock, but it did solve my problem, thanks mate!
Locked

Return to “Sound”