我有一台安装了 Ubuntu 12.04 的惠普笔记本电脑。我使用了 USB 耳机,不得不在“声音”设置中手动将主扬声器的声音静音。在我拔下耳机并重新启动笔记本电脑后(在睡眠模式后显示器无法打开的常见故障之后),“声音”设置中的输出设备列表为空。
重启笔记本电脑没有帮助,什么都没有改变。重新插入 USB 耳机也没有改变,也没有声音。我尝试运行谷歌搜索建议的命令(插入耳机)。结果是:
liliet@LilietNotebook:~$ pacmd No PulseAudio daemon running, or not
running as session daemon. liliet@LilietNotebook:~$ aplay
/usr/share/sounds/alsa/Front_Center.wav ALSA lib
pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave aplay:
main:682: audio open error: No such file or directory
liliet@LilietNotebook:~$ sudo aplay -l [sudo] password for liliet:
**** List of PLAYBACK Hardware Devices **** Home directory /home/liliet not ours. card 0: Generic [HD-Audio Generic], device 3:
HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1:
Generic_1 [HD-Audio Generic], device 0: ALC269VC Analog [ALC269VC
Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2:
Prestigio [Prestigio], device 0: USB Audio [USB Audio] Subdevices:
1/1 Subdevice #0: subdevice #0 liliet@LilietNotebook:~$ lspci -v |
grep -A7 -i "audio" 00:01.1 Audio device: Advanced Micro Devices, Inc.
[AMD/ATI] Wrestler HDMI Audio Subsystem: Hewlett-Packard Company
Device 1885 Flags: bus master, fast devsel, latency 0, IRQ 42 Memory
at f0344000 (32-bit, non-prefetchable) [size=16K] Capabilities:
<access denied Kernel driver in use: snd_hda_intel Kernel modules:
snd-hda-intel
-- 00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01) Subsystem: Hewlett-Packard Company Device 1885
Flags: bus master, slow devsel, latency 32, IRQ 16 Memory at
f0340000 (64-bit, non-prefetchable) [size=16K] Capabilities: <access
denied Kernel driver in use: snd_hda_intel Kernel modules:
snd-hda-intel
liliet@LilietNotebook:~$ sudo aptitude --purge reinstall
linux-sound-base alsa-base alsa-utils linux-image-`uname -r`
linux-ubuntu-modules-`uname -r` libasound2 sudo: aptitude: command not
found liliet@LilietNotebook:~$ speaker-test -c 6 -D
'surround51:CARD=PCH,DEV=0'
speaker-test 1.0.25
Playback device is surround51:CARD=PCH,DEV=0 Stream parameters are
48000Hz, S16_LE, 6 channels Using 16 octaves of pink noise ALSA lib
confmisc.c:768:(parse_card) cannot find card 'PCH' ALSA lib
conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver
returned error: No such device ALSA lib
confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib
conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned
error: No such device ALSA lib confmisc.c:1251:(snd_func_refer) error
evaluating name ALSA lib conf.c:4241:(_snd_config_evaluate) function
snd_func_refer returned error: No such device ALSA lib
conf.c:4720:(snd_config_expand) Evaluate error: No such device ALSA
lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM
surround51:CARD=PCH,DEV=0 Playback open error: -19,No such device
liliet@LilietNotebook:~$ speaker-test -c 6 -D
'surround51:CARD=PCH,DEV=0'
speaker-test 1.0.25
Playback device is surround51:CARD=PCH,DEV=0 Stream parameters are
48000Hz, S16_LE, 6 channels Using 16 octaves of pink noise ALSA lib
confmisc.c:768:(parse_card) cannot find card 'PCH' ALSA lib
conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver
returned error: No such device ALSA lib
confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib
conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned
error: No such device ALSA lib confmisc.c:1251:(snd_func_refer) error
evaluating name ALSA lib conf.c:4241:(_snd_config_evaluate) function
snd_func_refer returned error: No such device ALSA lib
conf.c:4720:(snd_config_expand) Evaluate error: No such device ALSA
lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM
surround51:CARD=PCH,DEV=0 Playback open error: -19,No such device
liliet@LilietNotebook:~$ alsa force-reload mkdir: cannot create
directory `/var/run/alsa': Permission denied /sbin/alsa: Warning:
Failed to create /var/run/alsa/. /sbin/alsa: Warning: Not keeping
list of removed modules because /var/run/alsa is absent. It will not
be possible automatically to reload these modules. Unloading ALSA
sound driver modules:/sbin/alsa: 135: /sbin/alsa: cannot create
/var/run/alsa/modules-removed: Directory nonexistent snd-usb-audio
snd-usbmidi-lib snd-hda-codec-realtek snd-hda-codec-hdmi snd-seq-midi
snd-hda-intel snd-hda-codec snd-hwdep snd-rawmidi snd-pcm
snd-seq-midi-event snd-seq snd-timer snd-seq-device snd-page-alloc.
mkdir: cannot create directory `/var/run/alsa': Permission denied
Loading ALSA sound driver modules: (none to reload).
liliet@LilietNotebook:~$ sudo alsa force-reload Unloading ALSA sound
driver modules: snd-usb-audio snd-usbmidi-lib snd-hda-codec-realtek
snd-hda-codec-hdmi snd-seq-midi snd-hda-intel snd-hda-codec snd-hwdep
snd-rawmidi snd-pcm snd-seq-midi-event snd-seq snd-timer
snd-seq-device snd-page-alloc (failed: modules still loaded:
snd-hda-codec-realtek snd-hda-codec-hdmi snd-hda-codec snd-hwdep
snd-pcm snd-timer snd-page-alloc). Loading ALSA sound driver modules:
snd-usb-audio snd-usbmidi-lib snd-hda-codec-realtek snd-hda-codec-hdmi
snd-seq-midi snd-hda-intel snd-hda-codec snd-hwdep snd-rawmidi snd-pcm
snd-seq-midi-event snd-seq snd-timer snd-seq-device snd-page-alloc.
liliet@LilietNotebook:~$ sudo dpkg -l | grep -e alsa -e pulseaudio ii
alsa-base
1.0.25+dfsg-0ubuntu1.1 ALSA driver configuration files ii alsa-hda-dkms
0.201210081115~precise1 HDA driver in DKMS format. ii alsa-utils
1.0.25-1ubuntu5.2 Utilities for configuring and using ALSA ii bluez-alsa
4.98-2ubuntu7.2 Bluetooth ALSA support ii bluez-alsa:i386
4.98-2ubuntu7.2 Bluetooth ALSA support ii gstreamer0.10-alsa
0.10.36-1ubuntu0.1 GStreamer plugin for ALSA ii gstreamer0.10-pulseaudio
0.10.31-1ubuntu1.2 GStreamer plugin for PulseAudio ii pulseaudio
1:1.1-0ubuntu15.4 PulseAudio sound server ii
pulseaudio-equalizer
2.7.0.2-2~webupd8~oneiric3 PulseAudio Equalizer - LADSPA plugin graphical user interface ii pulseaudio-module-bluetooth
1:1.1-0ubuntu15.4 Bluetooth module for
PulseAudio sound server ii pulseaudio-module-gconf
1:1.1-0ubuntu15.4 GConf module for PulseAudio
sound server ii pulseaudio-module-x11
1:1.1-0ubuntu15.4 X11 module for PulseAudio
sound server ii pulseaudio-utils
1:1.1-0ubuntu15.4 Command line tools for the
PulseAudio sound server
输出设备列表是空的,运行这些设备后仍然没有声音。
编辑:新命令尝试
liliet@LilietNotebook:~$ speaker-test
speaker-test 1.0.25
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
liliet@LilietNotebook:~$
编辑2
liliet@LilietNotebook:~$ pulseaudio
E: [pulseaudio] bluetooth-util.c: Property name not a string.
E: [pulseaudio] bluetooth-util.c: Property name not a string.
E: [pulseaudio] module-ladspa-sink.c: Master sink not found
E: [pulseaudio] module.c: Failed to load module "module-ladspa-sink" (argument: "sink_name=ladspa_output.mbeq_1197.mbeq master= plugin=mbeq_1197 label=mbeq control=3.6,3.3,3.3,3.6,3.0,3.6,3.0,3.6,3.0,3.3,3.0,4.3,4.0,3.3,3.0"): initialization failed.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.
答案1
Ubuntu 默认使用 pulseaudio。USB 耳机本质上是一个单独的音频卡,它只是处于“默认”位置。
安装pavucontrol
应用程序并使用它来测试和配置您的音频。在最后一个选项卡上禁用您不需要的那个。设置适当的默认值。
对于您发现的问题,请看这里:什么是“无法加载模块“module-ladspa-sink””错误?您可以安全地删除主目录中提到的所有配置文件 - pulseaudio 在默认情况下运行完美。