标题:[实践OK]ubuntu16.04没有声音的解决方法,Ubuntu 17.04解决Analog Devices AD1986A声卡没声音的方案 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Sat, 14 May 2016 23:43:24 +0000 作者:jackxiang 地址:http://jackxiang.com/post/8700/ 内容: 背景:最后卡开机画面了,无论咋apt-get重新安装都不行,Ubuntu16.04下没有声音的解决方法,平时用Firefox或Chrome下的Flash插件。最后重新安装后好了。 由于这个笔记本太老了华硕A8F,还是大学时候的老笔记本了,后来装了Ubuntu16.04发现它运行并不快,再就是Ubuntu16.04的后面版本Ubuntu17.04吧,也是一个过渡版本, 于是,装了一个Ubuntu17.04的ubuntu 17.04 gnome3版本,觉得性能要好一些,可能和这个gnome3是C写的有关吧,再就是Ubuntu想用这个KDE做手机端,现在没有做得起来,还是回到了gnome3,我觉得是一个明智的选择,其实现在很少有人装Linux,再就是很多装Linux的人都是GEEK,笔记本配置都不会高到哪儿去这才是真实情况啊。 Ubuntu17.04吧,这个版本的声卡不发声,于是按最后的方法做了一下配置好了,折腾了好久,不容易,这也是开源的一个实实在在的问题,如果自由微软收费合理又系统不错,还是用Win10吧,前提你有钱买好点的硬件。 Intel GMA950,http://blog.chinaunix.net/uid-2595338-id-2139474.html http://ubuntuforums.org/showthread.php?t=205449 (1)检查系统 aplay -l 应该能看到安装的声卡设备,否则应该就是驱动安装失败了。 etual@Hikari:~$ aplay -l **** PLAYBACK硬件设备列表 **** 卡 0: Intel [HDA Intel], 设备 0: ALC662 Analog [ALC662 Analog] 子设备: 0/1 子设备:#0: subdevice #0 卡 0: Intel [HDA Intel], 设备 1: ALC662 Digital [ALC662 Digital] 子设备: 1/1 子设备:#0: subdevice #0 (2)检查一下系统设备是否有检测到声卡 lspci -v 应该能看到类似的: 00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02) Subsystem: ASUSTeK Computer Inc. NM10/ICH7 Family High Definition Audio Controller Flags: bus master, fast devsel, latency 0, IRQ 29 Memory at feb3c000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Capabilities: [100] Virtual Channel Capabilities: [130] Root Complex Link Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel (3)通过ubuntu的APT-GET安装,好吧,我就是通过这个搞回来的驱动,推荐! 首先,将原来的卸载干净 sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils 千万注意,因为依赖关系,多删除了部分东西,必须装回来,否则重启后就进不了桌面了。 出现进入不了桌面一是ctrl alt f到f7,再就是恢复模式了:http://m.blog.csdn.net/article/details?id=9199939 sudo apt-get install gdm ubuntu-desktop 下面就是安装了 sudo apt-get install linux-sound-base alsa-base alsa-utils 恩,经过漫长的下载安装,重启后,我的UBUNTU又在发出声音了,yeah~~~ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 最后就是修改一下音量,顺便保存一下: alsamixer 调节好之后保存 sudo alsactl store 0 到此就完毕了,继续听歌,yeah~~~ 有兴趣的看看原文吧,还有不少东西的呢: http://ubuntuforums.org/showthread.php?t=205449 没有声音的原因是因为当前用户没有使用声卡相关设备的权限: ls -l /dev/snd 查看了一下,发现用户权限为 root 用户组为audio 解决方法为将当前用户加入audio组就可以了。 使用usermod -a -G audio username 就可以解决啦。 实践如下: [jackxiang@jackX ~]$ ls -l /dev/snd 总用量 0 drwxr-xr-x 2 root root 60 5月 14 23:10 by-path crw-rw----+ 1 root audio 116, 2 5月 14 23:10 controlC0 crw-rw----+ 1 root audio 116, 8 5月 14 23:10 hwC0D0 crw-rw----+ 1 root audio 116, 9 5月 14 23:10 hwC0D1 crw-rw----+ 1 root audio 116, 4 5月 14 23:10 pcmC0D0c crw-rw----+ 1 root audio 116, 3 5月 14 23:10 pcmC0D0p crw-rw----+ 1 root audio 116, 5 5月 14 23:23 pcmC0D1p crw-rw----+ 1 root audio 116, 7 5月 14 23:10 pcmC0D6c crw-rw----+ 1 root audio 116, 6 5月 14 23:10 pcmC0D6p crw-rw----+ 1 root audio 116, 1 5月 14 23:10 seq crw-rw----+ 1 root audio 116, 33 5月 14 23:10 timer [jackxiang@jackX ~]$ id uid=1000(jackxiang) gid=1000(jackxiang) 组=1000(jackxiang),129(wireshark) [jackxiang@jackX ~]$ usermod -a -G audio jackxiang usermod: Permission denied. usermod:无法锁定 /etc/passwd,请稍后再试。 [jackxiang@jackX ~]$ sudo su - id发现其是jackxiang,不是root,则把jackxiang和root一起加到组里面去: chmod -R a+rwx /dev/snd [root@jackX ~]# usermod -a -G audio jackxiang [root@jackX ~]# usermod -a -G audio root 参考:http://blog.sina.com.cn/s/blog_5ce530a10100kyxf.html —————————————————————————————— /home/xiangdong/下载/alsa-driver-1.0.25/SUPPORTED_KERNELS cat /home/xiangdong/下载/alsa-driver-1.0.25/SUPPORTED_KERNELS The alsa-drivers in this package are designed for the following kernels: - Vanilla 3.0 to 3.2 - Vanilla 2.6.18 to 2.6.39 It's not guaranteed that they work with any newer version than above or modified kernels by distributors. It might be eventually possible to build the alsa-drivers with older modified kernels by distributors (2.6.9+). These kernels have backported many things from more recent vanilla kernels. http://blog.csdn.net/ldl22847/article/details/8616921 http://blog.chinaunix.net/uid-30031530-id-5177359.html http://blog.chinaunix.net/uid-20069582-id-227907.html 太旧了,下面这个版本: Linux xiangdong-A8F 4.10.0-21-generic Ubuntu 10.04是我使用的第一个Linux系统,一开始就碰上这种问题让我很恼火,也折腾很长时间没搞定,终于在Ubuntu中文论坛上找到了yechao1989提供的解决办法,我把它粘过来留着以后自己可能还有用。我的本子是联想天逸F40,声卡为Analog Devices AD1986A。 1.检测声卡 代码: sudo head -1 /proc/asound/card0/codec#0 2.修改配置文件 代码: sudo gedit /etc/modprobe.d/alsa-base.conf 找到如下段: 代码: # Keep snd-pcsp from being loaded as first soundcard options snd-pcsp index=-2 注销下面语句 代码: #options snd-pcsp index=-2 添加下面语句 代码: options snd-hda-intel model=laptop-eapd 3.重启电脑 再试下喇叭,ok啦 但紧接着又出现让人郁闷的问题了,耳机喇叭一起响,按照如下方法也没有用: 打开新立得,安装gnome-alsamixer,运行,在“Headphone Jack Sense”打勾,插上耳机喇叭不再同时响了。 再找找办法吧 这个驱已经Ok了,只做下设置: /home/xiangdong/下载/alsa-driver-1.0.25/alsa-kernel/Documentation/HD-Audio-Models.txt AD1986A ======= 6stack 6-jack, separate surrounds (default) 3stack 3-stack, shared surrounds laptop 2-channel only (FSC V2060, Samsung M50) laptop-eapd 2-channel with EAPD (ASUS A6J) laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100) ultra 2-channel with EAPD (Samsung Ultra tablet PC) samsung 2-channel with EAPD (Samsung R65) samsung-p50 2-channel with HP-automute (Samsung P50) 如果系统原来已经有 ALSA 驱动,但是没有识别声卡或者声音驱动有问题。那么理论上只需要在两个地方做改动: 添加 /etc/modprobe.d/sound 文件,内容为: alias snd-card-0 snd-hda-intel alias sound-slot-0 snd-hda-intel vi /etc/modprobe.d/alsa-base.conf # options snd-pcsp index=-2 options snd-hda-intel model=laptop-eapd Generated by Jackxiang's Bo-blog 2.1.1 Release