LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-11-2018, 01:18 PM   #1
Borg101
LQ Newbie
 
Registered: Jan 2018
Posts: 5

Rep: Reputation: Disabled
Default sound output changing on its own


Audio card 1, seemingly at random, switches from the default audio to audio card 2. I'm not sure if sleep mode is affecting this or not. All I know is it happens a handful of times a week, which is how often I am rebooting my computer. That being said, a reboot does not consistently replicate this issue. How can I stop this?

One last note....nothing is even plugged into card 2, so I have no clue as to why it is switching.

Below is the output from inxi -Fxz


System: Host: HTPC Kernel: 4.13.0-36-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Gnome 3.18.5 (Gtk 3.18.9-1ubuntu3.3)
Distro: Linux Mint 18.3 Sylvia
Machine: Mobo: ASRock model: Z97E-ITX/ac
Bios: American Megatrends v: P2.10 date: 04/29/2016
CPU: Quad core Intel Core i5-4690 (-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 27934
clock speeds: max: 3900 MHz 1: 3491 MHz 2: 3491 MHz 3: 3491 MHz
4: 3491 MHz
Graphics: Card: NVIDIA GM206 [GeForce GTX 960] bus-ID: 01:00.0
Display Server: X.Org 1.18.4 drivers: nvidia (unloaded: fbdev,vesa,nouveau)
Resolution: 1920x1080@60.00hz
GLX Renderer: GeForce GTX 960/PCIe/SSE2
GLX Version: 4.5.0 NVIDIA 384.111 Direct Rendering: Yes
Audio: Card-1 NVIDIA Device 0fba driver: snd_hda_intel bus-ID: 01:00.1
Card-2 Intel 9 Series Family HD Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture v: k4.13.0-36-generic
Network: Card-1: Intel Ethernet Connection (2) I218-V
driver: e1000e v: 3.2.6-k port: f040 bus-ID: 00:19.0
IF: enp0s25 state: up speed: 1000 Mbps duplex: full mac: <filter>
Card-2: Microsoft Xbox 360 Wireless Adapter usb-ID: 003-002
IF: null-if-id state: N/A mac: N/A
Drives: HDD Total Size: 8251.6GB (68.7% used)
ID-1: /dev/sda model: ST2000LM003_HN size: 2000.4GB
ID-2: /dev/sdb model: TOSHIBA_MD04ACA4 size: 4000.8GB
ID-3: /dev/sdc model: ST2000LM003_HN size: 2000.4GB
ID-4: /dev/sdd model: Samsung_SSD_850 size: 250.1GB
Partition: ID-1: / size: 213G used: 68G (34%) fs: ext4 dev: /dev/sdd2
ID-2: swap-1 size: 17.13GB used: 0.00GB (0%) fs: swap dev: /dev/sdd3
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 65.0C mobo: N/A gpu: 0.0:44C
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 211 Uptime: 3:21 Memory: 10469.4/15990.7MB
Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35
 
Old 03-11-2018, 02:10 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 12,533
Blog Entries: 9

Rep: Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393Reputation: 3393
a race condition?
can you decide to use only one card and blacklist the other (or its driver to be precise)?
i think it's also possible to explicitely define in which order the cards appear.
 
Old 03-11-2018, 02:41 PM   #3
Borg101
LQ Newbie
 
Registered: Jan 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
a race condition?
can you decide to use only one card and blacklist the other (or its driver to be precise)?
i think it's also possible to explicitely define in which order the cards appear.
Yes, I absolutely can...though I have no idea how to do that. I don't use card 2 at all.
 
Old 03-12-2018, 04:42 AM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,941
Blog Entries: 1

Rep: Reputation: 833Reputation: 833Reputation: 833Reputation: 833Reputation: 833Reputation: 833Reputation: 833
This only happens on reboot???

The default card has an index of 0. As listed in /proc/asound/cards. You can do some /etc/modprobe.d/ magic to hard set indexes, but by default they can CHANGE between boots. Especially with USB devices. Mostly a modern issue since motherboards have soundcards, graphics cards have soundcards, and webcams have soundcards (input only). Plus various modems, soundcards, and signaling devices. If NOT using pulseaudio you can override the default index, but you'll have to update it with each boot (when it changes on you) since they can change.

FILE: $HOME/.asoundrc
Code:
defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 0
With pulseaudio, it'll kind of figure it out. But it's quirky and sometimes you have to disable and re-enable the card to have it work again in pavucontrol. Even when nothing technically changed and for no known reason. And when the soundcard was already set and formerly working.

For USB devices, there could be current issues. Even with a powered USB hub, if you put too much load on it, it can get quirky. Plus bandwidth issues if you put storage devices, video devices, radio devices, and such on the same port.
 
Old 03-12-2018, 07:36 AM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
I would blacklist the module for the sound adapter you don't want. For pci bus cards use
Code:
$ lspci -vvv | grep -A 10 -i sound
and look at which module it's using. Then, go into /etc/modprobe.d/blacklist.conf, or some similar name, and put in a line like 'blacklist module_name'. If the file doesn't exist, make it. On reboot the module should not load, and the sound device should be disabled.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing default audio output to HDMI on Gnome 3 Pyrrhus Linux - Software 2 06-05-2016 03:49 AM
Changing the location a module is loaded from without changing the default path zOSGuy Linux - Newbie 2 09-28-2010 02:43 PM
Changing Default Audio Device - I have 2 sound cards Virtuality Linux - General 2 12-15-2007 10:28 PM
changing default sound levels FC6 decrepit Fedora 8 05-03-2007 07:03 AM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration