无法让 ALSA 识别声音设备 | Lenovo G560

无法让 ALSA 识别声音设备 | Lenovo G560

我是一个 Ubuntu 用户,在几年之后重新回归,所以我忘记了很多东西。

我的问题是 ALSA 根本不列出我的声卡。它找不到它。aplay 命令返回:aplay: device_list:221: no soundcard found...

我的硬件确实识别它:

:~$ lspci -v | grep -A7 -i "audio"

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
    Subsystem: Lenovo Device 38af
    Flags: bus master, fast devsel, latency 0, IRQ 11
    Memory at 9b100000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel modules: snd-hda-intel


01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
    Subsystem: Lenovo Device 392d
    Flags: bus master, fast devsel, latency 0, IRQ 5
    Memory at 93000000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel modules: snd-hda-intel**

我尝试了几种方法。这个:https://help.ubuntu.com/community/SoundTroubleshooting

更新的内核:https://askubuntu.com/questions/150215/my-sound-is-not-working-in-ubuntu-12-04

更新后,我的系统崩溃了,所以将内核更新到 3.5.0-45-generic

我猜你也想要这些规格:http://www.lapspecs.com/detail/lenovo+g560 || 这是 i5 430M'

每次启动时我都会收到有关 oss4-dkms 的错误报告:

适用于内核 3.5.0-45-generic (i686) 的 oss4-4.2-build2005 的 DKMS make.log

cp:无法统计`/lib/modules/3.5.0-45-generic/source/include/linux/limits.h':没有这样的文件或目录

我不知道该如何解决这个问题。非常感谢您的帮助!

答案1

问题解决了!我做了一些挖掘,找到了一个更新 ALSA 系统的脚本。 http://www.stchman.com/alsa_update.html

下载脚本后你需要赋予它执行权限,例如

chmod u+x alsa_setup.sh

#!/bin/sh

# This script will recompile the ALSA drivers for Ubuntu
# This procedure was gotten from
# https://help.ubuntu.com/community/HdaIntelSoundHowto
#
# Authored by Bob Nelson  [email protected]
#
# This script updated 9/6/2007


script_name="alsa_setup.sh"

# Script must run as root 
if [ $USER != "root" ]; then
        echo "You need to run this script as root."
        echo "Use 'sudo ./$script_name' then enter your password when prompted."
        exit 1
fi

# Install the required tools
apt-get -y install build-essential ncurses-dev gettext

# Install your kernel headers
apt-get -y install linux-headers-`uname -r`

# Change to users home folder
cd ~

# Get the files from www.stchman.com
wget http://www.stchman.com/tools/alsa/alsa-driver-1.0.16.tar.bz2
wget http://www.stchman.com/tools/alsa/alsa-lib-1.0.16.tar.bz2
wget http://www.stchman.com/tools/alsa/alsa-utils-1.0.16.tar.bz2

# make a new folder
mkdir -p /usr/src/alsa

# Change to that folder
cd /usr/src/alsa

# Copy the downloaded files to the newly made folder
cp ~/alsa* .

# Unpack the tar archive files
tar xjf alsa-driver*
tar xjf alsa-lib*
tar xjf alsa-utils*

#Compile and install alsa-driver
cd alsa-driver*
./configure --with-cards=hda-intel --with-kernel=/usr/src/linux-headers-$(uname -r)
make
make install

# Compile and install alsa-lib
cd ../alsa-lib*
./configure
make
make install

# Compile and install alsa-utils
cd ../alsa-utils*
./configure
make
make install

# Remove the archives as they are no longer needed
rm -f ~/alsa-driver*
rm -f ~/alsa-lib*
rm -f ~/alsa-utils*

# Add the following line to the file, replacing '3stack' with your model
echo -e '\n' >> /etc/modprobe.d/alsa-base
echo "options snd-hda-intel model=3stack" >> /etc/modprobe.d/alsa-base

# Reboot the computer
reboot

我仍然收到 oss4 错误。但是声音正常!

答案2

安装 OSS4 会禁用内核的内置声音驱动程序。(而对于您而言,OSS 中的错误会禁用 OSS 驱动程序。)

卸载 OSS4。

相关内容