You are not logged in.
My problem is that for whatever reason i turn my monitor off, or it goes in standby, whan it resumes, pulseaudio switches to hdmi audio because i want to use module-switch-on-connect for usb headsets, and the latter does not support a parameter to exclude some devices.
I already tried to put blacklist=snd_hda_codec_hdmi in /etc/modprobe.d/hdmi_audio_blacklist.conf and rebooted or even put it directly on the Linux commandline via modprobe.blacklist=snd_hda_codec_hdmi, but it just get loaded, probably because it is marked somewhere as an hard dependancy of some other module.
I've read that one has to disable snd_hda_intel too, but i'd like to keep it.
rmmod -f snd_hda_codec_hdmi does work, but i wonder if there is a better/safer way.
Thanks!
Last edited by kokoko3k (2020-02-29 18:04:18)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
The next pulseaudio release will feature a blacklist option for the switch-on-connect module where you can specify the HDMI device to be ignored for sink switching purposes.
FWIW if blacklisting is insufficient you could also set up an install snd_hda_codec_hdmi /usr/bin/true that should prevent it from being loaded regardless.
Offline
Great to hear about the new pulseaudio module option, thanks!
set up an install snd_hda_codec_hdmi /usr/bin/true
I think i can wait for it, but (out of cuiosity) what is the meaning of the above statement, how can it work?
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
See the blue box in https://wiki.archlinux.org/index.php/Ke … probe.d/_2
Offline
Oh wow, one can't stop learning, thanks^2.
-EDIT-
For other people reference, using the /bin/true trick does not serve this specific purpose; weird things happen.
Compare the output of relevant commands run on the default system:
> lsmod|grep snd
snd_usb_audio 278528 1
snd_usbmidi_lib 40960 1 snd_usb_audio
snd_rawmidi 45056 1 snd_usbmidi_lib
snd_seq_device 16384 1 snd_rawmidi
mc 61440 2 videodev,snd_usb_audio
snd_hda_codec_hdmi 65536 1
snd_hda_intel 53248 2
snd_hda_codec 159744 2 snd_hda_codec_hdmi,snd_hda_intel
snd_hda_core 102400 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_hwdep 20480 2 snd_usb_audio,snd_hda_codec
snd_pcm 135168 5 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
snd_timer 40960 1 snd_pcm
snd 110592 16 snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_timer,snd_pcm,snd_rawmidi
soundcore 16384 1 snd
> pactl list sinks short
0 alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1 module-alsa-card.c s16le ch 2 48000 Hz SUSPENDED
1 alsa_output.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo module-alsa-card.c s32le ch 2 48000 Hz SUSPENDED
> pacmd list|grep hdmi
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
device.string = "hdmi:0,1"
device.profile.name = "hdmi-stereo-extra1"
hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
active port: <hdmi-output-1>
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor>
output:hdmi-stereo: Uscita «Digital Stereo (HDMI)» (priority 5900, available: no)
output:hdmi-surround: Uscita «Digital Surround 5.1 (HDMI)» (priority 800, available: no)
output:hdmi-surround71: Uscita «Digital Surround 7.1 (HDMI)» (priority 800, available: no)
output:hdmi-stereo-extra1: Uscita «Digital Stereo (HDMI 2)» (priority 5700, available: unknown)
output:hdmi-stereo-extra2: Uscita «Digital Stereo (HDMI 3)» (priority 5700, available: no)
output:hdmi-surround-extra2: Uscita «Digital Surround 5.1 (HDMI 3)» (priority 600, available: no)
output:hdmi-surround71-extra2: Uscita «Digital Surround 7.1 (HDMI 3)» (priority 600, available: no)
output:hdmi-stereo-extra3: Uscita «Digital Stereo (HDMI 4)» (priority 5700, available: no)
output:hdmi-surround-extra3: Uscita «Digital Surround 5.1 (HDMI 4)» (priority 600, available: no)
output:hdmi-surround71-extra3: Uscita «Digital Surround 7.1 (HDMI 4)» (priority 600, available: no)
active profile: <output:hdmi-stereo-extra1>
alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1/#0: GP106 High Definition Audio Controller Digital Stereo (HDMI 2)
alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor/#0: Monitor of GP106 High Definition Audio Controller Digital Stereo (HDMI 2)
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
...with the output after using the /bin/true workaround:
# cat /etc/modprobe.d/hdmi_audio_blacklist.conf
# https://wiki.archlinux.org/index.php/Kernel_module#Using_files_in_/etc/modprobe.d/_2
# Ref: https://bbs.archlinux.org/viewtopic.php?pid=1889824#p1889824
install snd_hda_codec_hdmi /bin/true
> lsmod | grep snd
snd_usb_audio 278528 1
snd_usbmidi_lib 40960 1 snd_usb_audio
snd_rawmidi 45056 1 snd_usbmidi_lib
snd_seq_device 16384 1 snd_rawmidi
mc 61440 2 videodev,snd_usb_audio
snd_hda_codec_generic 94208 1
ledtrig_audio 16384 1 snd_hda_codec_generic
snd_hda_intel 53248 0
snd_hda_codec 159744 2 snd_hda_codec_generic,snd_hda_intel
snd_hda_core 102400 3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec
snd_hwdep 20480 2 snd_usb_audio,snd_hda_codec
snd_pcm 135168 4 snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
snd_timer 40960 1 snd_pcm
snd 110592 12 snd_hda_codec_generic,snd_seq_device,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_timer,snd_pcm,snd_rawmidi
soundcore 16384 1 snd
> pactl list sinks short
0 alsa_output.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo module-alsa-card.c s32le ch 2 48000 Hz SUSPENDED
> pacmd list|grep hdmi
Default sink name: alsa_output.pci-0000_01_00.1.hdmi-stereo
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo>
device.string = "hdmi:0"
device.profile.name = "hdmi-stereo"
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: unknown)
active port: <hdmi-output-0>
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor>
output:hdmi-stereo: Uscita «Digital Stereo (HDMI)» (priority 5900, available: unknown)
active profile: <output:hdmi-stereo>
alsa_output.pci-0000_01_00.1.hdmi-stereo/#1: GP106 High Definition Audio Controller Digital Stereo (HDMI)
alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor/#1: Monitor of GP106 High Definition Audio Controller Digital Stereo (HDMI)
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: unknown)
..As you can see hdmi is still present (wth!); plus, input sink from my usb soundcard is gone.
Also never-seen modules appeared (snd_hda_codec_generic, ledtrig_audio)
I don't really want/need to dig into this at it would be overcomplicated, but i've had to drop it here.
Last edited by kokoko3k (2020-02-29 18:23:10)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
I have suffered from this problem during the past couple of weeks. It will be fixed in the next stable release of pulseaudio, which isn't out yet.
However, running this systemd unit at boot by enabling seems to work before pulseaudio starts for a user seems to work. Obviously it's not the clean way, but it works unlike the other options.
[Unit]
Description=Remove HDMI module on boot
[Service]
ExecStart=rmmod -f snd_hda_codec_hdmi
[Install]
WantedBy=multi-user.target
--
JSkier
Offline
As a workaround please disable that feature by editing /etc/pulse/default.pa and commenting or removing load-module module-switch-on-port-available and reboot the system.
Offline