未检测到声音设备

我刚刚在新的联想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:  driver:  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  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:  

我应该提一下,我事先没能在这台机器上发出任何声音。

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

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

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

我重新启动了。 现在它有效! 🙂

我有同样的问题,结果是因为我使用root登录gdm并且在这种情况下pulseaudio无法正确启动但是如果你运行pulseaudio -D它可以正常工作

增加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