如何在 Ubuntu 22.04.3 LTS 上调试无音频

如何在 Ubuntu 22.04.3 LTS 上调试无音频

安装更新后,我突然发现所有程序都没有音频和视频播放。它在同一硬件上的另一个操作系统上运行正常。我也试过几张声卡,但都没有成功。

系统:

Linux land 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

我该如何调试?我甚至不知道从哪里开始。

我在 dmesg 中看到这个:

  726.053889] INFO: task pulseaudio:4079 blocked for more than 241 seconds.
[  726.053900]       Not tainted 6.2.0-26-generic #26~22.04.1-Ubuntu
[  726.053903] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  726.053905] task:pulseaudio      state:D stack:0     pid:4079  ppid:3996   flags:0x00000002
[  726.053913] Call Trace:
[  726.053916]  <TASK>
[  726.053921]  __schedule+0x2b7/0x5f0
[  726.053933]  ? snd_pcm_hw_rule_add+0x156/0x1b0 [snd_pcm]
[  726.053963]  schedule+0x68/0x110
[  726.053969]  schedule_preempt_disabled+0x15/0x30
[  726.053975]  __mutex_lock.constprop.0+0x3d8/0x770
[  726.053979]  ? snd_pcm_hw_rule_add+0x156/0x1b0 [snd_pcm]
[  726.054000]  __mutex_lock_slowpath+0x13/0x20
[  726.054004]  mutex_lock+0x3e/0x50
[  726.054008]  dpcm_fe_dai_open+0x43/0x340 [snd_soc_core]
[  726.054055]  ? snd_pcm_hw_constraints_init.isra.0+0x4c0/0x580 [snd_pcm]
[  726.054076]  snd_pcm_open_substream+0x8d/0x170 [snd_pcm]
[  726.054097]  ? _raw_spin_lock_irqsave+0xe/0x20
[  726.054103]  snd_pcm_open.part.0+0xe1/0x210 [snd_pcm]
[  726.054123]  ? __pfx_default_wake_function+0x10/0x10
[  726.054129]  snd_pcm_playback_open+0x56/0x90 [snd_pcm]
[  726.054150]  snd_open+0xb9/0x1f0 [snd]
[  726.054168]  chrdev_open+0xc4/0x250
[  726.054172]  ? fsnotify_perm.part.0+0x76/0x1a0
[  726.054178]  ? __pfx_chrdev_open+0x10/0x10
[  726.054182]  do_dentry_open+0x167/0x450
[  726.054187]  vfs_open+0x2d/0x40
[  726.054191]  do_open+0x235/0x4f0
[  726.054197]  ? open_last_lookups+0x9b/0x3c0
[  726.054204]  path_openat+0x11d/0x2a0
[  726.054209]  do_filp_open+0xb2/0x160
[  726.054216]  ? __check_object_size+0x23/0x30
[  726.054223]  ? alloc_fd+0xad/0x1a0
[  726.054229]  do_sys_openat2+0xb3/0x180
[  726.054234]  __x64_sys_openat+0x55/0xa0
[  726.054239]  do_syscall_64+0x59/0x90
[  726.054244]  ? syscall_exit_to_user_mode+0x2a/0x50
[  726.054250]  ? do_syscall_64+0x69/0x90
[  726.054254]  ? __fget_light+0xb5/0x160
[  726.054259]  ? exit_to_user_mode_prepare+0x3b/0xd0
[  726.054266]  ? syscall_exit_to_user_mode+0x2a/0x50
[  726.054270]  ? do_syscall_64+0x69/0x90
[  726.054274]  ? exit_to_user_mode_prepare+0x3b/0xd0
[  726.054280]  ? syscall_exit_to_user_mode+0x2a/0x50
[  726.054284]  ? do_syscall_64+0x69/0x90
[  726.054288]  ? sysvec_apic_timer_interrupt+0x4e/0xb0
[  726.054292]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  726.054299] RIP: 0033:0x7f907bb14764
[  726.054304] RSP: 002b:00007ffc73b63a40 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
[  726.054309] RAX: ffffffffffffffda RBX: 0000000000080802 RCX: 00007f907bb14764
[  726.054311] RDX: 0000000000080802 RSI: 00007ffc73b63ae0 RDI: 00000000ffffff9c
[  726.054314] RBP: 00007ffc73b63ae0 R08: 0000000000000000 R09: 00007ffc73b63857
[  726.054316] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000080802
[  726.054318] R13: 00007f9074231eb2 R14: 00007ffc73b63ae0 R15: 0000000081204101
[  726.054322]  </TASK>

答案1

显然,首先要尝试的是回滚更新。例如安装精确的上一个软件包版本并将其搁置,以避免以后进行不必要的更新。

另一个要尝试的方法是确定哪里出了问题。ALSA 驱动程序、pulseaudio 或其他东西。尝试aplay -l列出设备并使用它们aplay从原始硬件到更高级别测试设备。也可以尝试paplay

检查alsa-info报告内容以寻找可能的提示。

这就是我给初学者的所有建议。当您找到导致错误的软件包时,不要忘记报告错误。

相关内容