自 2014 年 3 月 2 日以来的最近一次更新后,我无法在 ubuntu 12.04 桌面上听音乐,也无法从应用程序听到任何其他声音。我能够从命令行执行以下测试
~$ speaker-test -Dplug:surround51 -c6 -l1 -twav
speaker-test 1.0.25
Playback device is plug:surround51
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 5440
Period size range from 32 to 2720
Using max buffer size 5440
Periods = 4
was set period_size = 1088
was set buffer_size = 5440
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 8.545722
音频测试中我能听到“左前”的声音,但没有其他声音。有什么建议吗?
以下是音频设备信息。
~$ lspci -nnk | grep -iA2 audio
00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) [1002:4383] (rev 40)
Subsystem: Hewlett-Packard Company Device [103c:2ac8]
Kernel driver in use: snd_hda_intel
--
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Turks/Whistler HDMI Audio [Radeon HD 6000 Series] [1002:aa90]
Subsystem: XFX Pine Group Inc. Device [1682:aa90]
Kernel driver in use: snd_hda_intel
以下是 AlasMixer 的信息
┌───────────────────────────── AlsaMixer v1.0.25 ──────────────────────────────┐
│ Card: HDA ATI SB F1: Help │
│ Chip: IDT 92HD89E2 F2: System information │
│ View: F3:[Playback] F4: Capture F5: All F6: Select sound card │
│ Item: Master [dB gain: 0.00] Esc: Exit │
│ │
│ ┌──┐ ┌──┐ ┌──┐ ┌──┐ ┌──┐ ┌──┐ ┌──┐ │
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ >
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ >
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ >
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ >
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ >
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ >
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ >
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │
│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │
│ ├──┤ ├──┤ └──┘ ├──┤ Mic In ├──┤ ├──┤ ├──┤ │
│ │OO│ │OO│ │OO│ │OO│ │OO│ │OO│ │
│ └──┘ └──┘ └──┘ └──┘ └──┘ └──┘ │
│ 100 100<>100 100<>100 100<>100 100<>100 100 100 │
│ < Master >Headphon PCM Front Front Mi Surround Center LFE │
└──────────────────────────────────────────────────────────────────────────────┘
我可以播放网络视频,不会崩溃或冻结,但任何网络应用程序都听不到任何声音。启动时我可以听到邦戈鼓的声音。
我下载了以下 mp3 文件并将其保存到我的音乐文件夹中。我使用下面的终端命令来播放 mp3 文件。
~/Music$ xmms2 play 02\ -\ Frozen.mp3
~/Music$
我无法听到 xmms2 播放 Frozen.mp3 的任何音频。
我从终端打开 VLC,并从 GUI 播放 mp3 文件。以下是播放 mp3 文件时 VLC 的终端反馈。
~$ vlc
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x2124108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Got bus address: "unix:abstract=/tmp/dbus-Wjn42ezXF0,guid=badc6b7aa96a1558a4e1655900000de8"
Connected to accessibility bus at: "unix:abstract=/tmp/dbus-Wjn42ezXF0,guid=badc6b7aa96a1558a4e1655900000de8"
Registered DEC: true
"sni-qt/6878" WARN 14:58:38.756 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE
Registered event listener change listener: true
QSpiAccessible::accessibleEvent not handled: "6" obj: QMenu(0x7feec4099610) ""
QSpiAccessible::accessibleEvent not handled: "7" obj: QMenu(0x7feec4099610) ""
QSpiAccessible::accessibleEvent not handled: "8008" obj: QObject(0x0) " invalid interface!"
QSpiAccessible::accessibleEvent not handled: "8008" obj: QSidebar(0x7feec41ff800, name = "sidebar") "sidebar"
FIXME: handle dialog start.
QSpiAccessible::accessibleEvent not handled: "8008" obj: QObject(0x0) " invalid interface!"
QSpiAccessible::accessibleEvent not handled: "8008" obj: QListView(0x7feec4205500, name = "listView") "listView"
QSpiAccessible::accessibleEvent not handled: "8008" obj: QObject(0x0) " invalid interface!"
FIXME: handle dialog end.
我没有听到 VLC 的任何声音。
以下是模拟输出文件。
~$ analog output
analog: analog version 6.0/Unix
analog: Warning D: Turning all pie charts off because OUTFILE is stdout and
CHARTDIR is unset
(For help on all errors and warnings, see /usr/share/doc/analog/docs/errors.html)
analog: Warning F: Failed to open logfile output: ignoring it
analog: Warning R: Turning off empty time reports
analog: Warning R: Turning off empty Request Report
analog: Warning R: Turning off empty File Type Report
analog: Warning R: Turning off empty Directory Report
analog: Warning R: Turning off empty Domain Report
analog: Warning R: Turning off empty Organisation Report
analog: Warning R: Turning off empty Search Word Report
analog: Warning R: Turning off empty Operating System Report
analog: Warning R: Turning off empty File Size Report
analog: Warning R: Turning off empty Status Code Report
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Web Server Statistics for Debian Linux System</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="robots" content="noindex,nofollow" />
<meta name="generator" content="analog 6.0/Unix" />
<style type="text/css" id="internalStyle">
h2 {
background-color: #A0C0F0;
width: 98%;
padding: 3px 6px;
}
table {
text-align: right;
margin-left: 30px;
background-color: #D0E0F0;
border-collapse: collapse;
}
th {
border-bottom: 1px solid #404050;
border-right: 1px dotted #606070;
border-top: none;
border-left: none;
padding: 0px 5px 1px 5px;
font-weight: bold;
background-color: #A0C0F0;
}
td {
padding: 0px 5px 1px 5px;
border-right: 1px dotted #606070;
border-left: none;
border-bottom: none;
border-top:none;
}
td.x {
font-family: monospace;
white-space: pre;
}
.xl {
text-align: left;
border-right: none;
}
.xr {
text-align: right;
border-right: none;
}
.bar {
text-align: left;
border-right: none;
}
tr.sub {background-color: #C0C0FF;
font-style: italic;
}
.repdesc {
font-style: italic;
}
.repspan {
font-style: italic;
}
.goto {
font-size: small;
}
.gensumtitle {
font-weight: bold;
}
.gototitle {
font-weight: bold;
}
.runtimetitle {
font-weight: bold;
}
img {
border-style: none;
}
a:link {
color: blue;
text-decoration: none;
}
a:visited {
color: purple;
text-decoration: none;
}
a:link:hover {
text-decoration: underline;
}
a:visited:hover {
text-decoration: underline;
}
a:link:active {
color: red;
text-decoration: underline;
}
a:visited:active {
color: red;
text-decoration: underline;
}
</style>
</head>
<body>
<div class="header"><h1><a name="Top" id="Top" href="http://www.analog.cx/"><img src="/analog/analogo.png" alt="" /></a> Web Server Statistics for <a href="/">Debian Linux System</a></h1>
<p class="analysisspan">Program started at Sun-02-Mar-2014 17:10.</p>
</div>
<div class="gensum"><h2><a name="gensum" id="gensum">General Summary</a></h2>
<p class="goto">(<span class="gototitle">Go To</span>: <a href="#Top">Top</a> | General Summary)</p>
<p class="repdesc">This report contains overall statistics.</p>
<p class="gensumlines">
<span class="gensumtitle">Successful requests:</span> 0
</p>
</div><div class="footer"><p class="credit">This analysis was produced by <a href="http://www.analog.cx/">analog 6.0</a>.
<br /><span class="runtimetitle">Running time:</span> Less than 1 second.
</p>
<p class="goto">(<span class="gototitle">Go To</span>: <a href="#Top">Top</a> | <a href="#gensum">General Summary</a>)</p>
</div>
</body>
</html>
下面是两次发出的 echo get current desk 命令。
~$ echo $XDG_CURRENT_DESKTOP
~$ echo $XDG_CURRENT_DESKTOP
~$
以下是 GDM 会话命令。
~$ echo $GDMSESSION
mate
~$
下面是ubuntu桌面环境的安装尝试。
~$ sudo apt-get install ubuntu-desktop
Reading package lists... Done
Building dependency tree
Reading state information... Done
ubuntu-desktop is already the newest version.
The following packages were automatically installed and are no longer required:
libgconf-2-4:i386 libatk1.0-0:i386 libidn11:i386 gir1.2-ubuntuoneui-3.0
libnss3:i386 libdbus-glib-1-2:i386 libncurses5-dev octave-common
libcairo2:i386 libreadline6-dev libdatrie1:i386 libgdk-pixbuf2.0-0:i386
libtinfo-dev libpixman-1-0:i386 libcurl3:i386 libxft2:i386 liboctave1
libthai0:i386 libnspr4:i386 libxss1:i386 libjasper1:i386
libubuntuoneui-3.0-1 libxtst6:i386 libhdf5-serial-dev thunderbird-globalmenu
libpango1.0-0:i386 libxcb-render0:i386 librtmp0:i386 libxcb-shm0:i386
libgtk2.0-0:i386 libreadline-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
~$
尝试使用 Rhythmbox 播放音乐文件并收到以下错误:“无法开始播放,未设置错误时发生问题。这是 Rhythmbox 或 GStreamer 中的一个错误。”
下面是用于从 alsamixer 选择通用音频输出的 F6 命令。上面发布的 alsamixer 终端是默认终端,它似乎与名为 HDA ATI SB 的终端相同。alsamixer F6 命令有三个选项可供选择:“-(默认)”、“0 HDA ATI SB”或“1 HD-Audio Generic”,但这些选项都不会从音乐文件产生任何声音。
┌───────────────────────────── AlsaMixer v1.0.25 ──────────────────────────────┐
│ Card: HD-Audio Generic F1: Help │
│ Chip: ATI R6xx HDMI F2: System information │
│ View: F3:[Playback] F4: Capture F5: All F6: Select sound card │
│ Item: S/PDIF Esc: Exit │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ ┌──┐ │
│ │OO│ │
│ └──┘ │
│ < S/PDIF > │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
下面的图片是我能找到的最接近声音设置的菜单。
下图是选定的声音设置选项选项卡,其中打开了其他菜单以提供更多信息。
答案1
使用以下命令后我的音频正常工作:
sudo apt-get autoremove pulseaudio
更新并重启电脑后,音频就可以正常工作了。来自 Hectic Geek – Application Software & OS Reviews 的 Gayan 在下面发布了一篇文章如何在 Ubuntu Linux 中删除 PulseAudio 并使用 ALSA?Gayan 详细解释了问题的本质。Gayan 解释说 Pulseaudio 负责管理软件到 Alsa 的音频,而 Alsa 负责管理硬件的音频。Pulseaudio 在将音频数据传递给 Alsa 时偶尔会出现处理不当的问题。只需删除 Pulseaudio 并让 Alsamixer 接管即可消除所有音频处理不当的问题。