Score:0

How do I blacklist a device itself in Ubuntu, not it's kernel module?

cn flag

I am using Kubuntu 20.04. This computer has an internal sound card (PCIX) and my display monitor has a sound device via HDMI. My sound equipment is attached to the internal sound card so it is preferred over the display monitor sound device which is a very poor quality.

In the Audio system settings module I have disabled the display sound device. When I boot into Kubuntu all is well and my internal sound card works as it should. After a while at random and especially if the monitor goes to sleep, the display sound device will re-enable itself on it's own, and it will show up as a second device in the system volume control. When this happens, no matter what I do (and I've tried quite a bit) my internal sound card won't operate anymore unless I re-disable the display sound device in the Audio system settings module and reboot (logout is insufficient).

I believe what is happening is that the display is deciding to re-initializing it's sound device (perhaps when waking from sleep) which in turn causes Kubuntu to disassociate the disabled setting with the newly detected (though identical) sound device thus defaulting to enabled. But the underlying problem in my opinion is that subsequently both sound devices seem to share the exact same kernel module.

lspci -v

01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)
        Subsystem: eVga.com. Corp. GP104 High Definition Audio Controller
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at df080000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
 
03:00.0 Audio device: Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series] (rev 01)
        Subsystem: Creative Labs SB1570 SB Audigy Fx
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at df304000 (64-bit, non-prefetchable) [size=16K]
        Memory at df300000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

I am interested in blacklisting GP104, but my limited research has shown that only kernel drivers can be blacklisted. That would be counterproductive in this case since it would also disable my desired sound device SB1570.

Any help would be appreciated.

ChanganAuto avatar
us flag
The solution is not disabling devices, is using let's say pavucontrol to set the default for the audio, the internal instead of HDMI.
NiGHTS avatar
cn flag
You wouldn't believe how many times I've tried this. Unless the undesired device is disabled and the OS rebooted (in that order) my internal sound card will not function. If I boot up with both devices enabled, though SB1570 is default in every respect, the sound output won't work from SB1570 unless I reboot as described. I blame the shared kernel modules, but I am not an expert on this topic.
cn flag
I assumed you are using alsa?
Score:1
cn flag

There is a sub-component used in this setup: 1 of them is using index=0 and the other is using index=1. You need to set

options snd_hda_intel index=1

(or 0) in the configuration file (/etc/modprobe.d/alsa-base.conf).

NiGHTS avatar
cn flag
I did this, and while I didn't see the other device auto-enable itself like before, the SB1570 device again stopped playing back audio.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.