未检测到声音设备

未检测到声音设备

我刚刚在一台新的联想 E470 机器上安装了 Ubuntu 16.04 LTE。没有检测到声音设备,我的意思是:

在此处输入图片描述

同样,没有检测到输入设备。以下信息可能有用: aplay -l返回

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

无论如何,音频设备存在:sudo lspci -v返回(除其他外)

00:1f.3 Audio device: Intel Corporation Device 9d71 (rev 21)
    Subsystem: Lenovo Device 505b
    Flags: bus master, fast devsel, latency 64, IRQ 16
    Memory at f4420000 (64-bit, non-prefetchable) [size=16K]
    Memory at f4410000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [50] Power Management version 3
    Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

我尝试强制重新加载 alsa:sudo alsa force-reload返回

Terminating processes: 10509 (failed: processes still using sound devices: 30977(pulseaudio)).
Unloading ALSA sound driver modules: snd-seq-midi snd-seq-midi-event snd-seq snd-rawmidi snd-seq-device snd-hda-codec-hdmi snd-hda-intel snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-timer (failed: modules still loaded: snd-hda-codec-hdmi snd-hda-intel snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-timer).
Loading ALSA sound driver modules: snd-seq-midi snd-seq-midi-event snd-seq snd-rawmidi snd-seq-device snd-hda-codec-hdmi snd-hda-intel snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-timer.

在 pacmd 中列出接收器:pacmd

Welcome to PulseAudio 8.0! Use "help" for usage information.
>>> list-sinks

1 sink(s) available.
  * index: 0
    name: <alsa_output.pci-0000_00_1f.3.hdmi-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: IDLE
    suspend cause: 
    priority: 9950
    volume: front-left: 53740 /  82% / -5.17 dB,   front-right: 53740 /  82% / -5.17 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 370.83 ms
    max request: 64 KiB
    max rewind: 64 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 371.52 ms; range is 0.50 .. 371.52 ms
    card: 0 <alsa_card.pci-0000_00_1f.3>
    module: 6
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 0"
        alsa.id = "HDMI 0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "3"
        alsa.card = "0"
        alsa.card_name = "HDA Intel"
        alsa.long_card_name = "HDA Intel at 0xf4420000 irq 126"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1f.3"
        sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "9d71"
        device.form_factor = "internal"
        device.string = "hdmi:0"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo"
        device.profile.description = "Digital Stereo (HDMI)"
        device.description = "Built-in Audio Digital Stereo (HDMI)"
        alsa.mixer_name = "Intel Kabylake HDMI"
        alsa.components = "HDA:8086280b,17aa505b,00100000"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "video-display"
    active port: <hdmi-output-0>

我应该说一下,我之前无法在这台机器上发出任何声音。

提前感谢您的时间,如果我可以提供更多有用的信息,请告诉我。

答案1

我意识到我忘了尝试排除 pulseaudio 故障,这可能是对 的反应所暗示的sudo alsa force-reload。根据pulseaudio 页面,我跑

rm -r ~/.config/pulse; pulseaudio -k

然后我重启了。现在一切正常!:)

答案2

我遇到了同样的问题,结果是因为我使用 root 登录到 gdm,在这种情况下 pulseaudio 无法正确启动,但如果你运行以下命令,它就可以正常工作:

pulseaudio -D

答案3

增加 inotify 监视的数量可以解决这个问题。

遵循以下指导https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Daemon_startup_failed

pulseaudio -v给出了错误:

E:[pulseaudio] module-udev-detect.c:您显然用完了 inotify 监视,可能是因为 Tracker/Beagle 将它们全部拿走了。我希望大家先做功课,修复 inotify,然后再使用它来监视整个目录树,因为当前的 inotify 在这方面肯定没用。请务必给 Tracker/Beagle 的家伙发一封信,抱怨他们对 inotify 的使用不当。

添加一行来etc/sysctl.conf修复这个问题:

fs.inotify.max_user_watches = 524288

相关内容