Wednesday, June 22, 2016

linux sound problem -- alsamixer "cannot open mixer"

1- when we run alsamixer and it produce message like below
$ alsamixer
cannot open mixer: No such file or directory


2- then we can check directory /dev/snd/, we can see no sound card at all
$ ls /dev/snd/
seq  timer


3- and can also lsmod to see whether it load sound module and see no
$ sudo lsmod  | grep snd

4- so now we need to check whether we can see our sound card with lshw command
$  lshw -c multimedia
  *-multimedia:0 UNCLAIMED
       description: Audio device
       product: Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
       vendor: Intel Corporation
       physical id: 3
       bus info: pci@0000:00:03.0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: memory:c3610000-c3613fff
  *-usb:2
       description: Video
       product: HP Truevision HD
       vendor: DDFEQ01G45BBF6
       physical id: 9
       bus info: usb@3:9
       version: 0.04
       serial: 200901010001
       capabilities: usb-2.00
       configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
  *-multimedia:1 UNCLAIMED
       description: Audio device
       product: 8 Series/C220 Series Chipset High Definition Audio Controller
       vendor: Intel Corporation
       physical id: 1b
       bus info: pci@0000:00:1b.0
       version: 04
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: memory:c3614000-c3617fff



so we can see have have intel High Definition Audio Controller

*** solutions ***
1- we just load the module snd-hda-intel then the alsamixer will work and it can produce sound when play music
$ sudo modprobe snd-hda-intel

-lsmod after load snd-hda-intel
$ sudo lsmod  | grep snd
snd_hda_codec_hdmi     53248  0
snd_hda_codec_realtek    81920  1
snd_hda_codec_generic    77824  2 snd_hda_codec_realtek
snd_hda_intel          36864  0
snd_hda_codec         135168  4 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel
snd_hda_core           73728  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               106496  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_core
snd_timer              32768  1 snd_pcm
snd                    81920  8 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
soundcore              16384  1 snd


2 if we want to survive reboot we have to add snd-hda-intel to file /etc/modules-load.d/modules.conf

-- but this problem might be caused by installing oss4-base that conflict with alsa-base

so if we see oss4-base*.conf in /etc/modprobe.d
we just remove and purge oss4-base, the alsamixer and sound will start working normally after restart the system

$ sudo apt-get remove oss4-base
$ sudo apt-get purge oss4-base
$ sudo reboot

No comments:

Post a Comment