ubuntuusers.de

Kein Ton aus ASUS Zenbook

Status: Gelöst | Ubuntu-Version: Ubuntu 22.04 (Jammy Jellyfish)
Antworten |

Marant--

Anmeldungsdatum:
4. April 2022

Beiträge: 744

Heißt also: ext. Kopfhörer: erkannt auf Pin 0x21 ext. Mikrofon: erkannt auf Pin 0x19

Ja

  • PIN 0x21 KH

  • Pin 0x19 ext.Mic

Das ist nicht veränderbar. Wobei

Pin 0x17 (Internal Speaker)

veränderbar ist.

Im Win Dump steht bei KH:

********** Wid=[0x21] **********
<VREF Hi-Z> <Input Disable><Output Enabled><H-Phn Enabled><Jack is plugged><EAPD=0>
Output MUX select to index 0x01 <WID=0x03>
Amplifier Gain :
    Output Amplifier Gain :
        <Gain Number of step=0, 0dB Offset=0, Step Size=0.00 dB,From 0.00dB to 0.00dB>
        => Index 00 <WID=0x02> Mute L:0 R:0 , Gain L:0.00dB(0x00) R:0.00dB(0x00)
Power State : [PS-Act : D0], [PS-Set : D0]

Momentan ist in dmesg zu sehen:

[    5.451486] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC294: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[    5.451491] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    5.451494] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    5.451495] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[    5.451496] snd_hda_codec_realtek ehdaudio0D0:    inputs:

Von (ext.) Mic ist bisher nichts zu seheh, also mal testweise ändern. Geht gleich weiter..

Marant--

Anmeldungsdatum:
4. April 2022

Beiträge: 744

Da Du ja mit der selbst gesetzten Firmware kein Änderung festgestellt hattest, dann mal per hdajackretask um das zu veranschaulichen. Ich schreibe es mal etwa ausführlicher für Andere die das nachvollziehen wollen. Bsp. ext Mic verfügbar machen.(hier Pin 0x19)

Was braucht es dazu

pavucontrol

(Test würde auch auf ALSA Ebene gehen mit arecord und speaker-test, Pavucontrol macht sich besser)

sowie Terminal mit Multi-Window Fähigkeit (sonst wirds beim Testen schnell nervig)

Los gehts im Multi-W. Terminal(mehrere Fenster erzeugen):

Zuvor alle selbst gesetzten HDA Optionen/Firmware entfernen.

Dann PA deaktivieren:

systemctl --user stop pulseaudio.socket pulseaudio.service

Im anderen Terminal Fenster anzeigen:

sudo dmesg | grep hda

Im anderen Terminal Fenster starten:

hdajackretask

In hdajackretask auf Realtek u. aktivieren "Show unconnected Pins" ("Advanced Override" kommt später.)

Pin 0x19 aktivieren und Mic wählen. Dann auf "Apply now"

Jetzt

sudo dmesg | grep hda

Dort sollte nun bei "inputs"

0x19 Mic

auch bei

sudo hdajacksensetest -a -c <Karte>

stehen. Jetzt starten von PA

systemctl --user start pulseaudio.socket pulseaudio.service
pavucontrol -t 4

Als Eingabegerät sollte das Mic auftauchen.

(mglw. in "pavucontrol -t 5"(Reiter Konfiguration der betreff. Karte) schauen ob "Duplex" bzw. "Ein/Ausgang" gewählt ist.

Dauerhaft lässt sich das dann in "hdajackretask" mit "Install boot override" machen. PA zuvor wieder deaktivieren + aktivieren.

Detaillierte Infos/bzw. Setzen in hdajackretask mit Anhaken von "Advanced Override".

Also vllt. probierst Du erstmal das.

LutzB3

(Themenstarter)

Anmeldungsdatum:
3. Mai 2022

Beiträge: 31

Danke für die detaillierte Anleitung und Deine Ausdauer. So bin ich ja auch die letzten Tage vorgegangen. 😉

Das Problem kommt, wie bereits beschrieben, wenn ich in hdajackretask auf "Apply" klicke. Im Terminal stehen dann die gesetzten Optionen und der Prozess hängt.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
lutz@zenbook:~$ hdajackretask 
0x12 0x40000000
0x13 0x411111f0
0x14 0x411111f0
0x15 0x411111f0
0x16 0x411111f0
0x17 0x90170110
0x18 0x411111f0
0x19 0x03a19020
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x40451a45
0x1e 0x411111f0
0x1f 0x411111f0
0x21 0x03211020
1

In dmesg kommt eine neue Zeile hinzu und dann nach einiger Zeit ein Stacktrace:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[  188.394887] snd_hda_codec_realtek ehdaudio0D0: hda-codec: reconfiguring
[  363.496294] INFO: task tee:7731 blocked for more than 120 seconds.
[  363.496307]       Tainted: P           O      5.15.0-27-generic #28-Ubuntu
[  363.496311] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  363.496314] task:tee             state:D stack:    0 pid: 7731 ppid:  7691 flags:0x00004002
[  363.496323] Call Trace:
[  363.496327]  <TASK>
[  363.496332]  __schedule+0x23d/0x590
[  363.496345]  ? call_rcu+0xe/0x10
[  363.496355]  schedule+0x4e/0xb0
[  363.496361]  schedule_timeout+0xfb/0x140
[  363.496367]  ? call_rcu+0xe/0x10
[  363.496372]  ? __cond_resched+0x1a/0x50
[  363.496378]  ? __dentry_kill+0x14a/0x190
[  363.496384]  __wait_for_common+0xab/0x150
[  363.496390]  ? usleep_range_state+0x90/0x90
[  363.496401]  wait_for_completion+0x24/0x30
[  363.496409]  snd_card_free+0x9c/0xb0 [snd]
[  363.496428]  soc_cleanup_card_resources+0x2c5/0x2e0 [snd_soc_core]
[  363.496460]  snd_soc_del_component_unlocked+0x131/0x170 [snd_soc_core]
[  363.496486]  snd_soc_unregister_component_by_driver+0x3b/0x50 [snd_soc_core]
[  363.496512]  devm_component_release+0x11/0x20 [snd_soc_core]
[  363.496549]  release_nodes+0x3d/0xa0
[  363.496558]  devres_release_all+0x97/0xd0
[  363.496565]  __device_release_driver+0x1b7/0x290
[  363.496572]  device_release_driver+0x29/0x40
[  363.496577]  snd_hda_codec_reset+0x2a/0x70 [snd_hda_codec]
[  363.496599]  reconfig_store+0x43/0x90 [snd_hda_codec]
[  363.496618]  dev_attr_store+0x14/0x30
[  363.496623]  sysfs_kf_write+0x3b/0x50
[  363.496631]  kernfs_fop_write_iter+0x134/0x1c0
[  363.496637]  new_sync_write+0x114/0x1a0
[  363.496645]  vfs_write+0x1cd/0x260
[  363.496651]  ksys_write+0x67/0xe0
[  363.496655]  __x64_sys_write+0x19/0x20
[  363.496659]  do_syscall_64+0x59/0xc0
[  363.496666]  ? exit_to_user_mode_prepare+0x37/0xb0
[  363.496672]  ? syscall_exit_to_user_mode+0x27/0x50
[  363.496676]  ? do_syscall_64+0x69/0xc0
[  363.496682]  ? exit_to_user_mode_prepare+0x37/0xb0
[  363.496687]  ? irqentry_exit_to_user_mode+0x9/0x20
[  363.496691]  ? irqentry_exit+0x19/0x30
[  363.496695]  ? exc_page_fault+0x89/0x160
[  363.496698]  ? asm_exc_page_fault+0x8/0x30
[  363.496704]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[  363.496710] RIP: 0033:0x7ff6509cfa37
[  363.496716] RSP: 002b:00007ffd24763ef8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  363.496722] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007ff6509cfa37
[  363.496725] RDX: 0000000000000002 RSI: 00007ffd24764030 RDI: 0000000000000003
[  363.496728] RBP: 00007ffd24764030 R08: 0000000000000002 R09: 0000000000000001
[  363.496730] R10: 00000000000001b6 R11: 0000000000000246 R12: 0000000000000002
[  363.496733] R13: 0000564860b3b4a0 R14: 00007ff650ad0a00 R15: 0000000000000002
[  363.496737]  </TASK>

Im Hintergrund wurde von hdajackretask ein Skript in /tmp angelegt, was jetzt natürlich noch nicht entfernt wurde:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
lutz@zenbook:/tmp/hda-jack-retask-WSOPL1$ cat script.sh 
#!/bin/sh
echo "0x12 0x40000000" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x13 0x411111f0" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x14 0x411111f0" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x15 0x411111f0" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x16 0x411111f0" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x17 0x90170110" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x18 0x411111f0" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x19 0x03a19020" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x1a 0x411111f0" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x1b 0x411111f0" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x1d 0x40451a45" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x1e 0x411111f0" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x1f 0x411111f0" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo "0x21 0x03211020" | tee /sys/class/sound/hwC1D0/user_pin_configs 2>>/tmp/hda-jack-retask-WSOPL1/errors.log
echo 1 | tee /sys/class/sound/hwC1D0/reconfig 2>>/tmp/hda-jack-retask-WSOPL1/errors.log

In dem vorgesehenen errors.log steht leider noch nichts drin. Es ist der letzte Befehl im Skript, welcher hängt.

   7659 pts/1    Ss     0:00      \_ bash
   7667 pts/1    Sl+    0:01          \_ hdajackretask
   7691 pts/1    S+     0:00              \_ /bin/sh /tmp/hda-jack-retask-WSOPL1/script.sh
   7731 pts/1    D+     0:00                  \_ tee /sys/class/sound/hwC1D0/reconfig

Irgendwie mag der Codec kein Reconfigure. Könnte das an dem noch aktivierten Secure Boot liegen?

Marant--

Anmeldungsdatum:
4. April 2022

Beiträge: 744

Dann führe hdajackretask doch mal mit "Install boot override"/ Neustart (ohne Apply now) aus. Der müsste die 2 Dateien auch so anlegen.

Habe hier festgestellt, daß sich "sudo alsa-force" nicht mehr ausführen lässt. Hängt beim Module entladen. Habe aber keine Lust dem nachzugehen. 😬

Secure Boot: Schalte es halt aus, solange Win nicht gestartet wird.

LutzB3

(Themenstarter)

Anmeldungsdatum:
3. Mai 2022

Beiträge: 31

Abschalten von Secure Boot bringt auch keine Änderung. Der Patch von hdajackretask wurde beim Boot zwar im dmesg aufgeführt (wie mein Patch vorher auch), jedoch ohne irgendwelche Auswirkungen.

[    2.369489] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    2.370672] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[    2.370757] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[    2.372260] snd_hda_intel 0000:01:00.1: Disabling MSI
[    2.372278] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[    2.372308] snd_hda_intel 0000:01:00.1: Applying patch firmware 'hda-jack-retask.fw'
[    4.842517] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5
[    4.842522] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[    5.010357] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC294: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[    5.010361] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    5.010363] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    5.010364] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[    5.010365] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[    5.467821] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
[    5.467827] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
[    5.467927] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi3 overwritten
[    5.467929] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi2 overwritten
[    5.467932] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi1 overwritten
[    5.467934] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Codec Output Pin1 overwritten
[    5.467936] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Codec Input Pin1 overwritten
[    5.467940] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Analog Codec Playback overwritten
[    5.467943] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Digital Codec Playback overwritten
[    5.467946] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Alt Analog Codec Playback overwritten
[    5.467950] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Analog Codec Capture overwritten
[    5.467953] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Digital Codec Capture overwritten
[    5.467956] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Alt Analog Codec Capture overwritten
[    5.467964] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[    5.467965] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4
[    5.467966] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 5
[    5.467967] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 6
[    5.467968] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 7
[    5.467969] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 8
[    5.487558] input: sof-hda-dsp Headphone as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input53
[    5.487679] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input54
[    5.487773] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input55
[    5.487863] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input56
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
lutz@zenbook:~$ cat /lib/firmware/hda-jack-retask.fw 
[codec]
0x10ec0294 0x10431b42 0

[pincfg]
0x12 0x40000000
0x13 0x411111f0
0x14 0x411111f0
0x15 0x411111f0
0x16 0x411111f0
0x17 0x90170110
0x18 0x411111f0
0x19 0x03a19020
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x40451a45
0x1e 0x411111f0
0x1f 0x411111f0
0x21 0x03211020

LutzB3

(Themenstarter)

Anmeldungsdatum:
3. Mai 2022

Beiträge: 31

Entgegen aller Warnungen im BIOS werden die Schlüssel vom Secure Boot übrigens nicht gelöscht, wenn man das aus-/einschaltet. Eine Sorge weniger. Das Windows steht also noch für weitere Tests zur Verfügung.

Marant--

Anmeldungsdatum:
4. April 2022

Beiträge: 744

Also die falsch gesetzten Pins und das Verhalten dürften m.M.n. 2 Paar Schuhe sein. Ob hier ein anderer Kernel/Firmware momentan was bringt, muss selbst erst mal dem nachgehen. Hatte das noch nicht.

LutzB3

(Themenstarter)

Anmeldungsdatum:
3. Mai 2022

Beiträge: 31

Wo kann ich denn sehen, mit welchen Optionen der Ubuntu Kernel gebaut wurde? Vielleicht fehlt da einfach eine Option.

Marant--

Anmeldungsdatum:
4. April 2022

Beiträge: 744

Naja, mache dazu ein neues Thema im dazu besser passenden Unterforum auf.

LutzB3

(Themenstarter)

Anmeldungsdatum:
3. Mai 2022

Beiträge: 31

Habe die Kernel Konfiguration gefunden. Befindet sich bei Ubuntu und einigen anderen Distros unter /boot. Abgesehen von CONFIG_SND_DEBUG sind alle empfohlenen Optionen gesetzt (Quelle: https://www.kernel.org/doc/html/latest/sound/hd-audio/notes.html).

Da sich Secure Boot anscheinend problemlos an-/abschalten lässt, habe ich auch den aktuellen 5.17.6 Mainline Kernel getestet. Leider auch damit das selbe Verhalten: kein Ton und beim neu konfigurieren hängt der Prozess.

Marant--

Anmeldungsdatum:
4. April 2022

Beiträge: 744

Was Du noch ohne viel Aufwand probieren könntest wäre ein 20.04 Livesystem zu starten und da die Änderungen anwendest. Da Neustart ausfällt, Neuladen mit "sudo alsa force-reload" erzwingen bzw. "Apply now" in hdajackretask. Funktioniert das, dann eben die dmesg Ausgaben(Treiber/Module) vergleichen.

LutzB3

(Themenstarter)

Anmeldungsdatum:
3. Mai 2022

Beiträge: 31

Leider identisches Verhalten mit einem 20.04.4 Livesystem. Sobald neu konfiguriert werden soll, hängt der Prozess.

Marant--

Anmeldungsdatum:
4. April 2022

Beiträge: 744

Mir ist noch etwas eingefallen. Manchmal half es die Karten zu tauschen. Also momentan ist die analoge die 1, besser ist es, wenn dieser die 0 zugewiesen wurde.

Das Zweite wäre, Der_hier setzt nur hda-verb. Also

sudo hda-verb ..

Das schon mal probiert?

Nvidia deaktivieren(im UEFI/BIOS), dann probieren(Kartennummer wird sich ändern), wäre noch eine Option.

LutzB3

(Themenstarter)

Anmeldungsdatum:
3. Mai 2022

Beiträge: 31

Danke für Deine Ausdauer!

Ich hatte inzwischen auch das aktuelle Fedora Image ausprobiert. Dort ist Kernel 5.17.5 sowie pipewire als Soundserver enthalten. Auch dort das identische Problem. Ich hatte sogar auf jegliche benutzerdefinierten Einträge verzichtet und direkt das Reconfigure auf der Shell angestoßen. Der Prozess bleibt hängen.

Inzwischen habe im mir im Kernel mal die https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_realtek.c angesehen.

Für den alc294 taucht dort einiges an Patches und Quirks auf, aber eine schnelle Suche nach meiner Pinconfig hat zu keinem Ergebnis geführt. Das sehe ich mir nochmal in Ruhe an.

Ich meine, auch mal nur mit hda-verb gearbeitet zu haben, kann es aber nicht beschwören. Also mache ich das nochmal. Auch die anderen Tipps verfolge ich die nächsten Tage.

Marant--

Anmeldungsdatum:
4. April 2022

Beiträge: 744

Mach das doch mal fix.

Nvidia deaktivieren.

aplay -l

Dürfte nur noch "Card 0" vorh. sein.

Dann per "hda-verb" bzw. prüfen ob gesetzt werden kann. Habe die Vermutung dann geht es.