PDA

View Full Version : Gentoo sound issues.


BugenhagenXIII
05-12-2007, 09:37 PM
For a while before the 2007.0 installer wiped my hard-drive, I had my speakers unplugged, and was listening to music in Ubuntu with my usb headset. I ended up installing Gentoo (from the 2006.1 iso), updating, emerging Xorg-X11, gnome-light, etc.

Here's my problem: Sound doesn't work. Gentoo doesn't recognize the usb headset (which I expected, last time I tried Gentoo it didn't recognize it either), or, more importantly, my onboard sound card. I have no clue how to fix this.

I get this error when I try to start mpd(music player daemon):

ALSA lib confmisc.c:848:(snd_func_card_driver) cannot find card '0'
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:397:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1248:(snd_func_refer) error evaluating name
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:3972:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM default
No audio_output specified and unable to detect a default audio output device


I get a similar error when trying to get to gnome-volume-manager.

Relevant info:

lspci output:

00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:01.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to AGP Controller (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R350 [Radeon 9800 Pro]
01:00.1 Display controller: ATI Technologies Inc Radeon R350 [Radeon 9800 Pro] (Secondary)
02:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)



emerge --info:

localhost zach # emerge --info
!!! Invalid PORTDIR_OVERLAY (not a dir): '/root/catalyst/overlays/portage'
Portage 2.1.2.2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r2, 2.6.17-gentoo-r7 i686)
================================================== ===============
System uname: 2.6.17-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 10 May 2007 15:00:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python: 2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.61
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT=""
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=pentium4 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac aim alsa avahi avi bash-completion berkdb bitmap-fonts bonobo cairo cddb cdparanoia cdr cli cracklib crypt dbus dri dvd dvdr dvdread eds emacs emboss encode fam ffmpeg fftw firefox flac fortran gdbm gif gnome gpm graphviz gstreamer gtk hal iconv imagemagick ipod ipv6 isdnlog jabber java javascript jpeg ldap libg++ mad midi mikmod mp3 mpeg mysql ncurses nls nptl nptlonly ogg opengl pam pcre pdf pdflib perl png ppds pppd python quicktime rar readline reflection ruby sdl session spell spl ssl tcpd theora truetype truetype-fonts type1-fonts udev unicode unrar usb vorbis win32codecs x86 xml xorg xv xvid zlib"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol"
ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
VIDEO_CARDS="radeon vesa fglrx ati"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


If anyone here can help, it would be greatly appreciated, as I'd rather fix it without reinstalling everything. If you need some other bit of info I left out, let me know.

Khaos
05-12-2007, 10:43 PM
I'm not sure about USB headsets, but did you enable the right parts of the kernel pertaining to your device?

It also sounds like your ALSA isn't even set up for your default audio device (the Intel AC97).


cd /usr/src/linux
make menuconfig

Enable the following options with Y:
Device Drivers > Sound > Sound Card Support
Device Drivers > Sound > Advanced Linux Sound Architecture > Advanced Linux Sound Architecture
Device Drivers > Sound > Advanced Linux Sound Architecture > PCI devices > Intel/SiS/nVidia/AMD/ALi AC97 Controller
Device Drivers > Sound > Advanced Linux Sound Architecture > USB devices > USB Audio/MIDI driver

make && make modules_install

If you use make install, execute that too. Otherwise manually copy the new kernel image over to /boot.

Once you do this and reboot using the new kernel, give it a shot. If it still doesn't work, please post the output to:

lsusb
dmesg | grep -i audio
dmesg | grep -i usb

and please post your /usr/src/linux/.config file.

EDIT: Are you emerging alsa-drivers? I usually recommend trying to compile sound into the kernel first, and if that doesn't work, to then try alsa-drivers.

BugenhagenXIII
05-12-2007, 10:46 PM
I'm not sure about USB headsets, but did you enable the right parts of the kernel pertaining to your device?

It also sounds like your ALSA isn't even set up for your default audio device (the Intel AC97).


Yeah, I'm not really worried about the USB headset just yet. I'd much rather get the onboard working then worry about it. But I'll try you're suggestion and get back to you.

Khaos
05-13-2007, 01:50 AM
By the way, since you're going to be recompiling your kernel, you might as well update your kernel sources to 2.6.20-r8 while your at it.

USE="symlink" emerge -u gentoo-sources
ls -l /usr/src/linux to make sure the linux symlink points to your new sources
cd /usr/src/linux
cp /usr/src/linux-2.6.17-gentoo-r7/.config .config
make oldconfig


Then continue with your make menuconfigs and etc.

The use flag symlink should make it automatically update /usr/src/linux to point to your newest sources, so I would add it to your USE flags.

I'm just writing everything step by step for completeness' sake.

BugenhagenXIII
05-13-2007, 02:23 AM
I already tried updating to 2.6.20-r8. I used genkernel the first time. I edited menu.lst to point to the right places (I think), but it said that /dev/sda3 (my / partition) is not a valid root device. Same thing when doing it the way you described.

menu.lst:

default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz


title=Gentoo Linux
root (hd0,0)
kernel /boot/vmlinuz root=/dev/ram0 init=/linuxrc real_root=/dev/sda3 doscsi vga=791
initrd /initramfs-genkernel-x86-2.6.20-gentoo-r8

title=Gentoo backup
root (hd0,0)
kernel /kernel-genkernel-x86-2.6.17-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 doscsi vga=791
initrd /initramfs-genkernel-x86-2.6.17-gentoo-r7


Gentoo backup is the original install. Not sure why the new one says /dev/sda3 isn't valid.

I always have shit luck with kernel compilation.

Khaos
05-13-2007, 02:47 AM
So you built the 2.6.20 kernel using make menuconfig instead of genkernel?

Maybe you do not have support for your type of hard drive enabled (I am going to guess scsi?) in that kernel. When manually building your kernel, you have to enable everything you need; nothing is automatic. Be sure to look throroughly through the Device Drivers section of the kernel.

If you manually compiled your newer kernel and did not also make an initramfs image (if unsure, you didn't), then take out the initrd line in the newer entry.

Also, I use root, instead of real_root. Not sure what the difference is (if there is even one).

Garfunkel
05-13-2007, 02:59 AM
yep, that is outlined during the handbook, you have to enable everything for your hardware.

BugenhagenXIII
05-13-2007, 06:21 PM
I've tried updating the kernel in Gentoo at least five times before, always carefully checking all the options, but something always goes wrong. The first time it was the hardware thing, but then each subsequent time it's something else. I think I'm gonna just give the 2007.0 installer another go, or somehting. Thanks for the help, guys.

Khaos
05-14-2007, 02:36 AM
Compiling your kernel multiple times is perfectly normal. This month, I think I have recompiled it maybe 10 times to add support for my webcam and to enable support for other things I just missed.

But luckily it isn't hard and doesn't even take too long. It's all about efficiency. Why use, say, Ubuntu's kernel, which is huge because it supports all this hardware, when you can compile yours manually to be small because it supports only what you need it to?

Garfunkel
05-14-2007, 07:34 AM
ubuntu's kernel is actually quite small rob :) it's actually one of the smallest aut of mandriva, suse, fedora, debian etc. Larger then gentoo's yes, but it's fairly slim considering...

Hell, even my logitech cordless rumblepad 2 was detected PERFECTLY out of the box with edgy and feisty, even the model number and everything.

BugenhagenXIII
05-15-2007, 06:18 PM
Yeah, I was having too many problems with Gentoo to be bothered. I installed Feisty. Once I get another hard drive, I'll definitely be attempting it again, because when it's working, I love Gentoo.

Khaos
05-15-2007, 09:36 PM
Yeah, it's definately not an install-and-go distro; I think of it more as a project sometimes. Hopefully you'll get it working when you attempt it again. If you need help, don't be afraid to ask. ;-]

Garfunkel
05-16-2007, 04:56 AM
Exactly, I use feisty because it "just works" (TM) but Gentoo's cool to fiddle around with for experimental purposes. But because of my HSC and all i need my computer to work and can't really toy with it much.

BugenhagenXIII
05-16-2007, 05:14 AM
If I were to ever get Gentoo working completely, I'd use it as my primary OS. One of these days, one of these days.

Khaos
05-16-2007, 05:43 AM
Gentoo is my primary (only) OS. Just because it takes alot of work doesn't make only for experimental purposes, Garf. ;-] I enjoy the complete customizability so much, I know I would be fed up with Ubuntu and other distro's that try to do stuff/include programs for me. Like how I got fed up with Windows. Haha.

Garfunkel
05-16-2007, 08:09 AM
haha maybe, but ubuntu is NOT like windows!