Debian

升級核心後聲音不再響

  • February 24, 2018

我已將系統上的 Linux 核心更新為Linux 3.11-2-amd64 #1 SMP Debian 3.11.10-1 (2013-12-04) x86_64 GNU/Linux. 完成此操作後,聲音不再起作用。

分佈資訊( cat /etc/*-release):

PRETTY_NAME="Debian GNU/Linux jessie/sid"
NAME="Debian GNU/Linux"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"

當我執行命令lspci | grep -i audio時,它會列印以下內容:

00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Wrestler HDMI Audio
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01)

當我嘗試使用以下命令測試我的聲音時:

LC_ALL=C speaker-test -l 3 -t sine -c 1

我得到以下資訊:

speaker-test 1.0.27.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Sine wave rate is 440.0000Hz
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Access denied

Playback open error: -111,Connection refused

我該怎麼辦?

當我執行命令alsactl init時,它會列印:

Found hardware: "HDA-Intel" "ATI R6xx HDMI" "HDA:1002aa01,00aa0100,00100200" "0x1025" "0x0740"
Hardware is initialized using a generic method

所以當我嘗試執行時:pulseaudio -D它會列印:

E: [pulseaudio] main.c: Daemon startup failed.

應用-l

**** List of PLAYBACK Hardware Devices ****
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: ALC271X Analog [ALC271X Analog]
 Subdevices: 1/1
 Subdevice #0: subdevice #0

申請-L

default
   Playback/recording through the PulseAudio sound server
hdmi:CARD=Generic,DEV=0
   HD-Audio Generic, HDMI 0
   HDMI Audio Output
sysdefault:CARD=Generic_1
   HD-Audio Generic, ALC271X Analog
   Default Audio Device
front:CARD=Generic_1,DEV=0
   HD-Audio Generic, ALC271X Analog
   Front speakers
surround40:CARD=Generic_1,DEV=0
   HD-Audio Generic, ALC271X Analog
   4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic_1,DEV=0
   HD-Audio Generic, ALC271X Analog
   4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic_1,DEV=0
   HD-Audio Generic, ALC271X Analog
   5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic_1,DEV=0
   HD-Audio Generic, ALC271X Analog
   5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic_1,DEV=0
   HD-Audio Generic, ALC271X Analog
   7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

dmesg | grep 聲音

[    8.838666] input: HD-Audio Generic HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.1/sound/card0/input7
[    9.395442] input: HD-Audio Generic Headphone as /devices/pci0000:00/0000:00:14.2/sound/card1/input10
[    9.395704] input: HD-Audio Generic Mic as /devices/pci0000:00/0000:00:14.2/sound/card1/input11

lsmod

Module                  Size  Used by
cpufreq_userspace      12525  0 
cpufreq_stats          12777  0 
cpufreq_powersave      12454  0 
cpufreq_conservative    14184  0 
parport_pc             26300  0 
ppdev                  12686  0 
lp                     17074  0 
parport                35749  3 lp,ppdev,parport_pc
bnep                   17431  2 
rfcomm                 36903  0 
bluetooth             215917  10 bnep,rfcomm
binfmt_misc            16949  1 
nfsd                  255063  2 
auth_rpcgss            51036  1 nfsd
oid_registry           12419  1 auth_rpcgss
nfs_acl                12511  1 nfsd
nfs                   143940  0 
lockd                  79321  2 nfs,nfsd
fscache                45230  1 nfs
sunrpc                211258  6 nfs,nfsd,auth_rpcgss,lockd,nfs_acl
fuse                   78616  1 
loop                   26609  0 
uvcvideo               78960  0 
videobuf2_vmalloc      12816  1 uvcvideo
videobuf2_memops       12519  1 videobuf2_vmalloc
videobuf2_core         35029  1 uvcvideo
videodev              105100  2 uvcvideo,videobuf2_core
media                  18303  2 uvcvideo,videodev
joydev                 17063  0 
acer_wmi               30174  0 
snd_hda_codec_realtek    41059  1 
arc4                   12536  2 
sparse_keymap          12818  1 acer_wmi
ath9k                  94801  0 
radeon               1166155  3 
ath9k_common           12687  1 ath9k
ath9k_hw              390315  2 ath9k_common,ath9k
ath                    21417  3 ath9k_common,ath9k,ath9k_hw
mac80211              416244  1 ath9k
ttm                    69419  1 radeon
drm_kms_helper         35647  1 radeon
drm                   227730  5 ttm,drm_kms_helper,radeon
snd_hda_codec_hdmi     35769  1 
snd_hda_intel          39672  7 
snd_hda_codec         142551  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
kvm                   354353  0 
i2c_piix4              12623  0 
cfg80211              377915  3 ath,ath9k,mac80211
snd_hwdep              13148  1 snd_hda_codec
snd_pcm                84096  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc         17114  2 snd_pcm,snd_hda_intel
pcspkr                 12595  0 
psmouse                82028  0 
evdev                  17445  24 
serio_raw              12849  0 
k10temp                12618  0 
snd_seq                48834  0 
snd_seq_device         13132  1 snd_seq
snd_timer              26614  2 snd_pcm,snd_seq
i2c_algo_bit           12751  1 radeon
snd                    60869  23 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_hda_codec,snd_hda_intel,snd_seq_device
wmi                    17339  1 acer_wmi
rfkill                 18978  6 cfg80211,acer_wmi,bluetooth
i2c_core               24084  6 drm,i2c_piix4,drm_kms_helper,i2c_algo_bit,radeon,videodev
acpi_cpufreq           17299  0 
mperf                  12411  1 acpi_cpufreq
soundcore              13026  1 snd
processor              28326  3 acpi_cpufreq
video                  17844  1 acer_wmi
ac                     12668  0 
battery                13101  0 
button                 12944  0 
ext4                  457329  1 
crc16                  12343  2 ext4,bluetooth
mbcache                13034  1 ext4
jbd2                   82560  1 ext4
sg                     29971  0 
sd_mod                 44300  3 
crc_t10dif             12348  1 sd_mod
microcode              30309  0 
ehci_pci               12472  0 
thermal                17468  0 
thermal_sys            27268  3 video,thermal,processor
ohci_pci               12808  0 
ohci_hcd               25977  1 ohci_pci
ahci                   25096  2 
libahci                27121  1 ahci
ehci_hcd               44263  1 ehci_pci
xhci_hcd               89949  0 
libata                169120  2 ahci,libahci
usbcore               154086  6 uvcvideo,ohci_hcd,ohci_pci,ehci_hcd,ehci_pci,xhci_hcd
scsi_mod              178166  3 sg,libata,sd_mod
usb_common             12440  1 usbcore
r8169                  60070  0 
mii                    12675  1 r8169

grep -i 脈衝 / var / log / syslog

Dec 20 13:43:39 Demian pulseaudio[3565]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 13:43:39 Demian pulseaudio[3565]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 13:43:41 Demian pulseaudio[3631]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 13:43:41 Demian pulseaudio[3631]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 13:46:52 Demian pulseaudio[3731]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 13:46:52 Demian pulseaudio[3731]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 13:46:54 Demian pulseaudio[3735]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 13:46:54 Demian pulseaudio[3735]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 15:59:58 Demian pulseaudio[3736]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 15:59:58 Demian pulseaudio[3736]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 15:59:59 Demian pulseaudio[3739]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 15:59:59 Demian pulseaudio[3739]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 16:00:57 Demian pulseaudio[3945]: [pulseaudio] pid.c: Daemon already running.
Dec 20 16:11:57 Demian pulseaudio[3762]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 16:11:57 Demian pulseaudio[3762]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 16:11:59 Demian pulseaudio[3767]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 16:11:59 Demian pulseaudio[3767]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 16:13:47 Demian pulseaudio[3973]: [pulseaudio] pid.c: Daemon already running.
Dec 20 18:06:15 Demian pulseaudio[3911]: [pulseaudio] module-x11-publish.c: PulseAudio information vanished from X11!
Dec 20 20:15:22 Demian pulseaudio[3726]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 20:15:22 Demian pulseaudio[3726]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 20:15:24 Demian pulseaudio[3731]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 20:15:24 Demian pulseaudio[3731]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 20:20:36 Demian pulseaudio[3673]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 20:20:36 Demian pulseaudio[3673]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 20:20:37 Demian pulseaudio[3705]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 20:20:37 Demian pulseaudio[3705]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 21:36:34 Demian pulseaudio[3643]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 21:36:34 Demian pulseaudio[3643]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 21:36:36 Demian pulseaudio[3713]: [pulseaudio] authkey.c: Failed to open cookie file '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 21:36:36 Demian pulseaudio[3713]: [pulseaudio] authkey.c: Failed to load authorization key '/var/lib/gdm3/.config/pulse/cookie': No existe el fichero o el directorio
Dec 20 21:37:22 Demian pulseaudio[3950]: [pulseaudio] pid.c: Daemon already running.

好吧,我找到了解決方案:

rm -r  /home/user/.pulse*

並更改文件/etc/libao.conf

改變(舊)

default_driver=alsa
quiet

到(新)

default_driver=pulse
quiet

並重新啟動系統。

請嘗試重新安裝脈衝

  1. sudo apt-get remove –purge alsa-base pulseaudio
  2. sudo apt-get install alsa-base pulseaudio
  3. sudo alsa force-reload

然後重新啟動。

像這樣的 PID 檢查

sudo fuser -v /dev/dsp* /dev/snd/*

然後應該產生這樣的東西:

                    BEN.        PID ZUGR.  BEFEHL
/dev/snd/controlC0:  <user>      3985 F.... pulseaudio
/dev/snd/pcmC0D0p:   <user>      3985 F...m pulseaudio

引用自:https://unix.stackexchange.com/questions/105375