系统无声音

声卡/显卡/打印机/USB设备等硬件问题(网卡问题请发上面的网卡板块)
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

系统无声音

#1

帖子 denny616 » 2019-07-19 9:57

各位大佬,新装系统无声音,windows里面好好的,哪位帮忙看看(本人菜鸟,已网上搜过,所有硬件及系统信息如下)

[email protected]:/home/denny# lspci |grep Audio
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
01:00.1 Audio device: NVIDIA Corporation Device 0fbc (rev a1)

[email protected]:/home/denny# aplay -l
aplay: device_list:272: no soundcards found...

[email protected]:/home/denny# modprobe snd-hda-intel
modprobe: ERROR: ../libkmod/libkmod-module.c:192 kmod_module_parse_depline() ctx=0x55add587e260 path=/lib/modules/4.19.0-5-amd64/kernel/sound/pci/hda/snd-hda-codec.ko error=No such file or directory
modprobe: ERROR: ../libkmod/libkmod-module.c:192 kmod_module_parse_depline() ctx=0x55add587e260 path=/lib/modules/4.19.0-5-amd64/kernel/sound/pci/hda/snd-hda-codec.ko error=No such file or directory
modprobe: ERROR: could not insert 'snd_hda_intel': Unknown symbol in module, or unknown parameter (see dmesg)

应该是声卡没驱动了,下载了alsa驱动,编译老提示没内核文件

[email protected]:/usr/src/alsa/alsa-driver-1.0.25# ./configure --with-kernel=/lib/modules/4.19.0-5-amd64/source
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for current directory... /usr/src/alsa/alsa-driver-1.0.25
checking cross compile...
checking for directory with ALSA kernel sources... /usr/src/alsa/alsa-driver-1.0.25/alsa-kernel
checking for directory with kernel source... /lib/modules/4.19.0-5-amd64/source
checking for directory with kernel build... /lib/modules/4.19.0-5-amd64/source
checking for kernel linux/version.h ... no
The file /lib/modules/4.19.0-5-amd64/source/include/INCLUDE_VERSION_H does not exist.
Please install the package with full kernel sources for your distribution
or use --with-kernel=dir option to specify another directory with kernel

sources (default is /lib/modules/4.19.0-5-amd64/source).

[email protected]:/usr/src/alsa/alsa-driver-1.0.25# ./configure --with-kernel=/lib/modules/4.19.0-5-amd64/source/version.h
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for current directory... /usr/src/alsa/alsa-driver-1.0.25
checking cross compile...
checking for directory with ALSA kernel sources... /usr/src/alsa/alsa-driver-1.0.25/alsa-kernel
checking for directory with kernel source... Please install the package with full kernel sources for your distribution
or use --with-kernel=dir option to specify another directory with kernel
sources (default is /lib/modules/4.19.0-5-amd64/source).


[email protected]:/usr/src/alsa/alsa-driver-1.0.25# uname -r
4.19.0-5-amd64

[email protected]:/usr/src/alsa/alsa-driver-1.0.25# apt-get install linux-kernel-headers
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
注意,选中 'linux-libc-dev' 而非 'linux-kernel-headers'
linux-libc-dev 已经是最新版 (4.19.37-5)。
linux-libc-dev 已设置为手动安装。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。

[email protected]:/usr/src/alsa/alsa-driver-1.0.25# apt-get install linux-source
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
linux-source 已经是最新版 (4.19+105)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。

apt-get install pulseaudio
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
pulseaudio 已经是最新版 (12.2-4)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。

pulseaudio没用,alsa不能直接apt安装,编译又老提示没内核文件(其实有),哪位大佬帮我看看要怎么操作才能驱动,谢谢了
头像
astolia
论坛版主
帖子: 4029
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 664 次

Re: 系统无声音

#2

帖子 astolia » 2019-07-19 10:41

先安装pavucontrol,然后运行它设置一下输出设备,看是不是默认输出设备弄错了。
如果不行的话,再运行以下命令,把结果发上来

代码: 全选

lspci -nnk | grep Audio
lsmod | grep snd_
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#3

帖子 denny616 » 2019-07-19 10:55

输出设备里有
all output devices
hardware output devices
vitural output devices
选的前两个都试过

[email protected]:~$ lspci -nnk | grep Audio
00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 05)
Subsystem: ASUSTeK Computer Inc. 8 Series/C220 Series Chipset High Definition Audio Controller [1043:8576]
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fbc] (rev a1)

第二个命令普通用户和root执行都无输出.我直接lsmod贴出来
上次由 denny616 在 2019-07-19 11:48,总共编辑 1 次。
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#4

帖子 denny616 » 2019-07-19 11:47

[email protected]:~$ lsmod
Module Size Used by
binfmt_misc 20480 1
intel_rapl 24576 0
x86_pkg_temp_thermal 16384 0
intel_powerclamp 16384 0
coretemp 16384 0
joydev 24576 0
kvm_intel 245760 0
kvm 724992 1 kvm_intel
irqbypass 16384 1 kvm
crct10dif_pclmul 16384 0
crc32_pclmul 16384 0
ghash_clmulni_intel 16384 0
sg 36864 0
mei_me 45056 0
eeepc_wmi 16384 0
mei 118784 1 mei_me
asus_wmi 32768 1 eeepc_wmi
iTCO_wdt 16384 0
iTCO_vendor_support 16384 1 iTCO_wdt
intel_cstate 16384 0
sparse_keymap 16384 1 asus_wmi
rfkill 28672 2 asus_wmi
evdev 28672 13
pcc_cpufreq 16384 0
wmi_bmof 16384 0
pcspkr 16384 0
intel_uncore 135168 0
button 16384 0
wmi 28672 2 asus_wmi,wmi_bmof
intel_rapl_perf 16384 0
nvidia_drm 45056 2
drm_kms_helper 200704 1 nvidia_drm
drm 483328 5 drm_kms_helper,nvidia_drm
nvidia_modeset 1048576 7 nvidia_drm
nvidia 14405632 242 nvidia_modeset
ipmi_devintf 20480 0
ipmi_msghandler 65536 2 ipmi_devintf,nvidia
parport_pc 32768 0
ppdev 20480 0
lp 20480 0
parport 57344 3 parport_pc,lp,ppdev
ip_tables 28672 0
x_tables 45056 1 ip_tables
autofs4 49152 2
ext4 733184 2
crc16 16384 1 ext4
mbcache 16384 1 ext4
jbd2 122880 1 ext4
crc32c_generic 16384 0
fscrypto 32768 1 ext4
ecb 16384 0
sd_mod 61440 4
ata_generic 16384 0
hid_generic 16384 0
usbhid 57344 0
hid 135168 2 usbhid,hid_generic
crc32c_intel 24576 4
ata_piix 36864 3
libata 270336 2 ata_piix,ata_generic
ehci_pci 16384 0
ehci_hcd 94208 1 ehci_pci
aesni_intel 200704 0
scsi_mod 245760 3 sd_mod,libata,sg
usbcore 290816 3 ehci_pci,usbhid,ehci_hcd
aes_x86_64 20480 1 aesni_intel
r8169 86016 0
crypto_simd 16384 1 aesni_intel
cryptd 28672 3 crypto_simd,ghash_clmulni_intel,aesni_intel
glue_helper 16384 1 aesni_intel
realtek 20480 0
libphy 77824 3 r8169,realtek
i2c_i801 28672 0
lpc_ich 28672 0
usb_common 16384 1 usbcore
thermal 20480 0
fan 16384 0
video 45056 1 asus_wmi
头像
astolia
论坛版主
帖子: 4029
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 664 次

Re: 系统无声音

#5

帖子 astolia » 2019-07-19 16:10

看起来确实是驱动文件的问题,但这也很奇怪。
debian的linux-image-4.19.0-5-amd64包安装后snd-hda-intel相关驱动都是齐备的,但你那里却在加载时显示No such file or directory。
有可能是文件损坏了,先重新安装一遍linux-image-4.19.0-5-amd64包

代码: 全选

sudo apt install --reinstall linux-image-4.19.0-5-amd64.deb
如果之后modprobe snd-hda-intel还报同样的错,就按它的提示运行dmesg,看最后部分有没有其他错误信息
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#6

帖子 denny616 » 2019-07-19 16:52

[email protected]:/usr/src/alsa/alsa-driver-1.0.25# lsmod |grep snd
snd_hda_codec_hdmi 57344 1
snd_hda_codec_realtek 122880 1
snd_hda_codec_generic 86016 1 snd_hda_codec_realtek
snd_hda_intel 45056 0
snd_hda_codec 151552 4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core 94208 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep 16384 1 snd_hda_codec
snd_pcm 114688 4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer 36864 1 snd_pcm
snd 94208 8 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
soundcore 16384 1 snd

重装image后有snd_hda_intel了,但是pulseaudio还是显示没有可以配置的声卡,alsa driver驱动还是提示同样的问题
执行modprobe snd_hda_intel和modprobe snd-hda-intel都无输出也无提示
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#7

帖子 denny616 » 2019-07-19 18:06

[email protected]:/home/denny# aplay -v
ALSA lib conf.c:3652:(config_file_open) cannot access file /etc/alsa/conf.d/10-rate-lav.conf
ALSA lib conf.c:3572:(snd_config_hooks_call) function snd_config_hook_load returned error: 没有那个文件或目录
ALSA lib conf.c:4026:(snd_config_update_r) hooks failed, removing configuration
aplay: main:828: audio open error: 没有那个文件或目录
[email protected]:/home/denny# aplay -l
**** List of PLAYBACK Hardware Devices ****
ALSA lib conf.c:3652:(config_file_open) cannot access file /etc/alsa/conf.d/10-rate-lav.conf
ALSA lib conf.c:3572:(snd_config_hooks_call) function snd_config_hook_load returned error: 没有那个文件或目录
ALSA lib conf.c:4026:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:281: control open (0): 没有那个文件或目录
ALSA lib conf.c:3652:(config_file_open) cannot access file /etc/alsa/conf.d/10-rate-lav.conf
ALSA lib conf.c:3572:(snd_config_hooks_call) function snd_config_hook_load returned error: 没有那个文件或目录
ALSA lib conf.c:4026:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:281: control open (1): 没有那个文件或目录
上次由 denny616 在 2019-07-22 9:07,总共编辑 1 次。
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#8

帖子 denny616 » 2019-07-19 19:26

dmesg的信息如下:

[ 8573.081362] snd_hda_intel 0000:01:00.1: Disabling MSI
[ 8573.081365] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[ 8573.095845] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC887-VD: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
[ 8573.095846] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 8573.095848] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[ 8573.095848] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 8573.095849] snd_hda_codec_realtek hdaudioC0D0: dig-out=0x11/0x0
[ 8573.095850] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 8573.095851] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 8573.095852] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 8573.095853] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 8573.106929] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[ 8573.106986] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[ 8573.107038] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[ 8573.107088] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[ 8573.107138] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[ 8573.776149] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input14
[ 8573.776234] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#9

帖子 denny616 » 2019-07-19 20:02

[email protected]:/proc/asound$ cat cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7200000 irq 26
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xf7080000 irq 17
[email protected]:/proc/asound$ cat devices
2: [ 0- 0]: digital audio playback
3: [ 0- 0]: digital audio capture
4: [ 0- 1]: digital audio playback
5: [ 0- 2]: digital audio capture
6: [ 0- 0]: hardware dependent
7: [ 0] : control
8: [ 1- 3]: digital audio playback
9: [ 1- 7]: digital audio playback
10: [ 1- 0]: hardware dependent
11: [ 1] : control
33: : timer
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#10

帖子 denny616 » 2019-07-22 15:40

哪位大佬能帮忙看看问题的可能原因?
头像
astolia
论坛版主
帖子: 4029
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 664 次

Re: 系统无声音

#11

帖子 astolia » 2019-07-22 19:54

你在7楼贴的东西应该是这个bug https://bugs.debian.org/cgi-bin/bugrepo ... bug=912755
需要升级安装最新的包。

代码: 全选

sudo apt update
sudo apt install --reinstall libasound2 libasound2-data libasound2-plugins alsa-base alsa-utils
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#12

帖子 denny616 » 2019-07-22 20:14

BugLink: http://bugs.launchpad.net/bugs/1782689

On modern laptop, there are more and more platforms
have two GPUs, and each of them maybe have audio codec
for HDMP/DP output. For some dGPU which is no output,
audio codec usually is disabled.

In currect HDA audio driver, it will set all codec as
VGA_SWITCHEROO_DIS, the audio which is binded to UMA
will be suspended if user use debugfs to contorl power

In HDA driver side, it is difficult to know which GPU
the audio has binded to. So set the bound gpu pci dev
to vga_switcheroo.

if the audio client is not the third registration, audio
id will set in vga_switcheroo enable function. if the
audio client is the last registration when vga_switcheroo
_ready() get true, we should get audio client id from bound
GPU directly.


要关掉NVIDIA gpu audio?
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#13

帖子 denny616 » 2019-07-22 20:17

astolia 写了:
2019-07-22 19:54
你在7楼贴的东西应该是这个bug https://bugs.debian.org/cgi-bin/bugrepo ... bug=912755
需要升级安装最新的包。

代码: 全选

sudo apt update
sudo apt install --reinstall libasound2 libasound2-data libasound2-plugins alsa-base alsa-utils
[email protected]:/home/denny# apt-get install --reinstall libasound2 libasound2-data libasound2-plugins alsa-base alsa-utils
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
没有可用的软件包 alsa-base,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到

E: 软件包 alsa-base 没有可安装候选

去掉这个包把其他的重装后,可以播放了,不过耳机没声音
[email protected]:~/下载$ aplay 4113612100.mp3
Playing raw data '4113612100.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono
图片
图片
图片
上次由 denny616 在 2019-07-22 20:26,总共编辑 2 次。
头像
astolia
论坛版主
帖子: 4029
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 664 次

Re: 系统无声音

#14

帖子 astolia » 2019-07-22 20:20

把命令中的alsa-base删掉再运行
denny616
帖子: 21
注册时间: 2008-04-17 17:15
系统: Debian 10
送出感谢: 0
接收感谢: 0

Re: 系统无声音

#15

帖子 denny616 » 2019-07-22 20:31

astolia 写了:
2019-07-22 20:20
把命令中的alsa-base删掉再运行
去掉这个包把其他的重装后,可以播放了,不过耳机没声音,看上图
[email protected]:~/下载$ aplay 4113612100.mp3
Playing raw data '4113612100.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono
回复

回到 “常用硬件支持”