Outils pour utilisateurs

Outils du site


issue142:mon_histoire

Years ago, I bought an “Asus Xonar Essence STX sound card. The sound is great and support under Linux is OK. The Xonar card is connected via fiber cable to a “Canton DM55” sound bar below my screen. My PC also has a GeForce GTX 560 Ti Nvidia graphic card installed. Therefore there are two potential sources for the sound: Nvidia via HDMI and the Xonar sound card. For my music-collection, I use QuodLibet, Mpv to watch videos, and Audacious for listening to radio stations.

Il y a des années, j'ai acheté une carte son « Asus Xonar Essence STX ». Le son était excellent et le support sous Linux est convenable. La carte Xonar est connectée par fibre optique à une barre de son « Canton DM55 » sous mon écran. Une carte graphique GeForce GTX 560 Ti de Nvidia est aussi installée dans mon PC. Ainsi, deux sources sonores sont disponibles : la Nvidia via le HDMI et la carte son Xonar.

Pour ma collection musicale, j'utilise QuodLibet, Mpv pour regarder les vidéos et Audacious pour écouter les stations de radio.

Every time I boot Linux, Nvidia and Xonar are discovered in a different order, as seen in Alsamixer: - default 0 Nvidia 1 Xonar STX 2 HD Pro Webcam C920 or: - default 0 Xonar STX 1 Nvidia 2 HD Pro Webcam C920 QuodLibet and/or Mpv started sometimes without sound. But Audacious never had a problem finding the right Xonar S/PDF port.

Chaque fois que je démarre Linux, Nvidia et Xonar sont détectées dans un ordre différent, comme je le vois dans Alsamixer :

  1. default

0 Nvidia

1 Xonar STX
2 HD Pro Webcam C920 

ou :

  1. default

0 Xonar STX

1 Nvidia
2 HD Pro Webcam C920

QuodLibet et/ou Mpv démarraient parfois sans le son. Mais Audacious n'a jamais eu de problème pour trouver correctement Xonar.

After several attempts, and some extensive searching on the Internet, I found a hint: It says in an aside that some programs accept symbolic names. I queried the symbolic names with: aplay -L iec958:CARD=STX,DEV=0 Xonar STX, Multichannel IEC958 (S/PDIF) Digital Audio Output ⇐== for Canton-DM55 ⇐== and defined the symbolic name to use alsa in: QuodLibet>File>Preferences>Playback>Output Pipeline: alsasink device=iec958 and in Mpv: ~/.conf/mpv/mpv.conf: audio-device=alsa/iec958

Après plusieurs tentatives, et une recherche étendue sur Internet, j'ai trouvé un indice : il est dit dans un aparté que certains programmes acceptent les noms symboliques. J'ai fait une requête des noms symboliques avec :

aplay -L

iec958:CARD=STX,DEV=0
Xonar STX, Multichannel
IEC958 (S/PDIF) Digital Audio Output <=== pour la Canton-DM55 <===

et défini le nom symbolique à utiliser dans ALSA dans :

QuodLibet>File>Preferences>Playback>Output Pipeline:
alsasink device=iec958

et dans Mpv:

~/.conf/mpv/mpv.conf: audio-device=alsa/iec958

QuodLibet and Mpv seem to belong to these “some” programs, the sound is working fine, Audacious has still no problems, but Firefox remained silent. I tried to fix that with: cat ~/.asoundrc defaults.pcm.!card STX default.pcm.!device 1 defaults.ctl.!card STX Finally there is sound in Firefox, but not for long … after some restarts it didn’t work any longer. I tried other browsers (Vivaldi, Chromium) – all remained silent.

Quolibet et Mpv semblent appartenir à ces « certains » programmes, le son fonctionne bien. Audacious n'a toujours pas de problème, mais Firefox restait silencieux.

J'ai essayé de résoudre ça avec :

cat ~/.asoundrc

defaults.pcm.!card STX
default.pcm.!device 1
defaults.ctl.!card STX

Enfin, il y avait du son dans Firefox, mais pas pour longtemps…, après quelques redémarrages, il ne fonctionnait plus. J'ai essayé d'autres navigateurs (Vivaldi, Chromium), tous restaient muets.

I disabled in BIOS the sound-chip on the mainboard a long time ago. Now I looked for a way to disable the Nvidia audio. However, I didn’t find any button or option in the “Nvidia X server settings” in the newest linux-driver (390.87). Searching the internet again, I found another hint: the kernel module snd_hda_intel is causing trouble! sudo lspci -vv … 01:00.1 Audio device: NVIDIA Corporation GF114 HDMI Audio Controller (rev a1) Subsystem: CardExpert Technology GF114 HDMI Audio Controller … Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel … 03:04.0 Multimedia audio controller: C-Media Electronics Inc CMI8788 [Oxygen HD Audio] Subsystem: ASUSTeK Computer Inc. Virtuoso 100 (Xonar Essence STX) … Kernel driver in use: snd_virtuoso Kernel modules: snd_virtuoso

Dans le BIOS, j'avais désactivé le composant du son sur la carte-mère, il y a longtemps. Maintenant, je cherchais une façon de désactiver la carte audio Nvidia. Cependant, je n'ai trouvé ni un bouton ni une option dans « Nvidia X server settings » (paramètres de Nvidia pour X Server) dans le tout nouveau pilote Linux (390.87).

En cherchant à nouveau sur Internet, j'ai trouvé une autre piste : le module du noyau snd_hda_intel pose des problèmes !

sudo lspci -vv

… 01:00.1 Audio device: NVIDIA Corporation GF114 HDMI Audio Controller (rev a1) Subsystem: CardExpert Technology GF114 HDMI Audio Controller … Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel … 03:04.0 Multimedia audio controller: C-Media Electronics Inc CMI8788 [Oxygen HD Audio] Subsystem: ASUSTeK Computer Inc. Virtuoso 100 (Xonar Essence STX) … Kernel driver in use: snd_virtuoso Kernel modules: snd_virtuoso

To prevent Linux from loading snd_hda_intel during startup I defined a blacklist: /etc/modeprobe.d/blacklist.conf: blacklist snd_hda_intel After a restart Alsamixer shows - default 0 Xonar STX 1 HD Pro Webcam C920 the Nvidia is no longer in the list! After enabling card and port with Alsamixer I did an alsactl store After another restart Firefox remained silent; Audacious and QuodLibet with sound, as before.

Pour empêcher Linux de charger snd_hda_intel pendant le démarrage, j'ai défini une liste noire :

/etc/modeprobe.d/blacklist.conf:

blacklist snd_hda_intel

Après redémarrage, Alsamixer montre :

  1. default

0 Xonar STX

1 HD Pro Webcam C920

La Nvidia n'est plus dans la liste ! Après avoir activé la carte et le port dans Alsamixer, j'ai fait un

alsactl store

Suite à un nouveau redémarrage, Firefox restait silencieux, mais Audacious et Quolibet avaient du son, comme avant.

At least the Xonar remained always in position 0. Somebody had written the sound MUST be configured in pavucontrol for Firefox: pavucontrol >Configuration>Profile>Digital Stereo Duplex(IEC958) >Configuration>Output Device>Port>Digital Output (S/PDIF) >Configuration>Input Device>Port>Digital Input (S/PDIF) After another restart, the sound worked fine in Audacious, Mpv, QuodLibet AND Firefox (finally!).

Au moins, la Xonar restait toujours en position 0.

Quelqu'un a écrit que le son doit être configuré dans pavucontrol pour Firefox :

pavucontrol

Configuration>Profile>Digital Stereo Duplex (IEC958)
Configuration>Output Device>Port>Digital Output (S/PDIF)
Configuration>Input Device>Port>Digital Input (S/PDIF)

Après un autre démarrage, le son fonctionnait bien dans Audacious, Mpv, Quolibet ET Firefox (enfin !).

P.S. I’ve used Linux since 1996, first S.U.S.E, then, around 2004 I switched to Ubuntu, and 2013 to Mint. At the moment, I play around with MX-Linux with XFCE. And yes, sound was always kind of a problem.

P.S. : J'utilise Linux depuis 1996, d'abord S.U.S.E., puis, vers 2004, je suis passé à Ubuntu et, en 2013, à Mint. À ce moment-là, j'ai essayé MX-Linux avec XFCE. Et oui, le son a toujours été une sorte de problème.

References: https://superuser.com/questions/53957/what-do-alsa-devices-like-hw0-0-mean-how-do-i-figure-out-which-to-use https://wiki.gentoo.org/wiki/ALSA#Hardware_detection https://techgage.com/news/disabling_nvidias_hdmi_audio_under_linux/

Références : https://superuser.com/questions/53957/what-do-alsa-devices-like-hw0-0-mean-how-do-i-figure-out-which-to-use

https://wiki.gentoo.org/wiki/ALSA#Hardware_detection

https://techgage.com/news/disabling_nvidias_hdmi_audio_under_linux/

issue142/mon_histoire.txt · Dernière modification : 2019/03/13 15:33 de andre_domenech