[SOLVED] Sound card works on Ubuntu, on Windows, but only sporadically on Debian Lenny
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Sound card works on Ubuntu, on Windows, but only sporadically on Debian Lenny
My intended main system is a debian Lenny (kernel 2.6.26-2), but I have also a ubuntu (9.something I guess, kernel 2.6.22) and windows 7 on the same pc.
The sound card is a VIA VT1708B.
The weird thing is, it works normally in Windows, apparently normally in Ubuntu (I don't recall if I have the correct control over volume; more on that later), and only every now and then with Debian Lenny.
Apparently, rebooting from ubuntu increases the odds of it working on Lenny, but may be just a fluke.
I had also in the same PC another Lenny install, that one was installed initially from either netinstall or CD image, and I went on installing "everything" from the command line, as it couldn't install any X/DE (apparently it was having some quarrels with the onboard ethernet).
On that install, the sound was working consistently, the only problem was that I didn't have volume control in the correct, conventional manner. Kmix (KDE's volume control) didn't have "PCM" or "master" but only "line" and other "soundless" stuff (I don't understand much of that). I was able to change the volume on applications such as Kaffeine, and some "kicker" (KDE3's taskbar) applet whose name I don't remember, but was still something other than "master" or "pcm".
The boot had a series of error messages, something with amixer, I still have lots of error messages, but I don't remember if they're the same.
I've reinstalled debian from DVD, now it found a consistent driver for the ethernet, but for some reason the sound does not work all the time.
It may have been just a coincidence, but it worked for the first time after I installed KDE (on reboot), and in the previous install I've used KDE too. Ubuntu has sound on Gnome, however.
I also had a Squeeze install for little while, but I'm not sure if it had sound or not, I guess it had. Even though I've found threads about Squeeze not having sound with the same sound card. I think I'll reinstall Squeeze just to test (well, not really, I actually find it more interesting than Ubuntu), as Ubuntu is somewhat buggy for some reason (it keeps trying to check its partition, and fails for some reason, but then I do control+D and it continues normally).
I haven't found anything very clear about this situation, I'll keep googling and trying to learn the whole ALSA stuff, what is just configuration, what is a driver, what the kernel has to do with everything, and I'll update the thread just in case I find something. Meanwhile, I'll appreciate any help.
While it's possible that the rebooting has something to do with your hardware, it's not likely. In order to narrow your Google search, try this:
Reboot into Debian. Immediately after rebooting, open a terminal window and type the following:
dmesg > dmesg.txt
lspci -v | less
Now look for your soundcard info. E.g. mine is the following:
00:0c.0 Multimedia audio controller: ESS Technology ES1978 Maestro 2E (rev 10)
Subsystem: Toshiba America Info Systems ES1978 Maestro-2E Audiodrive
Flags: bus master, medium devsel, latency 64, IRQ 11
I/O ports at fc00 [size=256]
Capabilities: <access denied>
Kernel driver in use: ES1968 (ESS Maestro)
Kernel modules: radio-maestro, snd-es1968
But in my dmesg output there is only one line listed:
es1968: clocking to 48000
Note the driver (module) name given by lspci: ES1968. Hence the apparent discrepancy in naming. This is because the ES1968 driver supports several ESS chipsets. (Of course, my sound is working. Yours may have a bunch of error messages, making it easier to spot.)
And back in that saved /tmp/dmesg.txt file, search for the driver (module) name. E.g. in my case I would do this:
cat dmesg.txt | grep -i es1968
Now would also be a good time to mention the system manual pages to you, (providing you don't use them already). Wondering what that -i is doing with grep, or what the heck grep is?
will tell you what you need to know. ("man man" will give you an overview of the method. Especially note the -k option, which is also provided by the "apropos" command.) And searching makes life infinitely easier.
(while in the man page)
(and hit enter)
That's how you begin to discover the power of *nix operating systems.
And back to that dmesg output. If there are error messages, use them (the relevant parts, if necessary line by line.) as search terms in Google, and you may be surprised at what you find.
There is also a cheat of sorts you may want to try. It sounds like you did a massive install which should have included everything, while I prefer a slimmer install. For that reason, I have to take additional steps to enable sound after installing Debian on my laptop.
Do you have Synaptic installed? If you do, make sure the following programs are installed.
There is another route to take on this, and you need to get to root anyway to finish this process. Go back to that terminal and do the following.
<enter your root password>
Make sure you have lines similar to this. (You will no doubt choose different mirrors.
Choosing to use "non-free" and "debian-multimedia" is as much a political decision as anything. The wonders of GNU licensing...)
## Security Updates ##
# 5.0 "Lenny" #
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
## Debian Volatile ## debian.org/volatile ##
# The ftp3.nrc.ca mirror won't validate with the security key!
deb http://debian.mirror.cambrium.nl/debian-volatile/ lenny/volatile main contrib non-free
## Lenny Mirrors ## http://www.debian.org/mirror/index.en.html ##
deb http://debian.yorku.ca/debian/ lenny main contrib non-free
deb-src http://debian.yorku.ca/debian/ lenny main contrib non-free
## Debian Multimedia ## http://debian-multimedia.org/ ##
# Here is the location of the security key:
deb http://mirror.csclub.uwaterloo.ca/debian-multimedia/ lenny main
Save the file (ctrl o) and exit (ctrl x). Now in your terminal, still as root, type:
I ran into a problem with this a while back because I had an onboard Soundcard (IEC958) and a USB Creative Fatal1y headset/mic attached during my install. It registered the Headset as a 2nd sound card and caused me all kinds of grief. I never knew which sound card would be used when I opened an app unless I specified it in the configs of that app. Needless to say when my hard drive crashed and I rebuilt my system I removed the USB headset and everything is happy with Debian Lenny.
Thanks for the answer. I had most of that covered already, but it's inspiring to see this sort of newbie-friendly answers, and it's even something I should do more often myself (but more often than not, somebody came first when there was something I already knew!)
I hadn't libasound2-plugins installed, and I didn't do the dmesg short before boot yet, but the lspci made me a bit suspicious of a situation like the one worm5252 described. My main board manual (and some sound-related GUI applications as well) say the sound card is a via vt1708b, as I've said, but the lspci says it's a "Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller". I didn't buy a non-onboard sound card, and I don't see any obvious sound card installed by mistake on the back of my PC, so I think that the possibilities are:
- that these apparent two distinct sound cards are just "synonyms", somewhat like ofaring described (that's what I hope);
- there are motherboards with two onboard soundcards these days and I bought one without even knowing (unlikely);
- that Debian Lenny's detection of the soundcard is not being done by a single "process", but independently, twice or more, and some of these detections go wrong.
It will appear even when the sound works, and it appears even in ubuntu, where it works correctly (apparently) in all aspects (I've checked, the sound control is done over Master and PCM).
I actually found that in a ubuntu forum in German, I'm going to do a google translate to see what they've found around there. This is just from memory and finding it there, I didn't do the dmesg short after reboot, I'm going to do it now.
edit: the German forum thread had actually just two messages from the same guy, who seems to be not much less lost than I am. I've found another command to get the sound card name, though:
head -n 1 /proc/asound/card0/codec*
Codec: VIA VIA VT1708B 8-Ch
An update of what I think that helps incrasing the odds of the sound working on Lenny: not rebooting from one OS to Lenny immediately, but turning it off and turning it on again after a little while. It's weird (and a bit scary), but when I was looking for information regarding the ethernet board, I've found a message board topic where a guy said that after he installed the driver on Slackware, it does not work immediately when he reboots on Windows, but he has to turn it off for a little while. That's what gave me the idea, actually. Weird, very weird.
Have you tried manually loading the snd-hda-intel module?
modprobe -v snd-hda-intel
If my understanding is correct, the Intel HDA controller is the soundcard chipset (hardware), and "Via vt1708b" refers to the codec running the chipset. It looks like you aren't alone in your struggles.
Last edited by ofaring; 02-14-2010 at 05:09 PM.
Sorry for not answering before. Thanks for the replies and links.
"modprobe -v snd-hda-intel" does not give me any output, and no apparent difference, unless I got to restart something like "/etc/init.d/whatever restart" (maybe alsa), to make it work, which I didn't. I'll try right now actually. [...] (it's actually /etc/init.d/alsa-utils restart). Nope, didn't help. The same messages I get at boot.
Alsaconf's ending messages are:
Setting default volumes...
amixer: Mixer default load error: Invalid argument
Saving the mixer setup used for this in /var/lib/alsa/asound.state.
/usr/sbin/alsactl: get_control:249: Cannot read control info '2,0,0,Front Playback Volume,0': Invalid argument
The same "invalid argument" message appears when trying to run alsamixer:
alsamixer: function snd_mixer_load failed: Invalid argument
I have sound consistently, though, apparently I confirmed the weird thing of turning the PC off, rather than just restarting, when coming from windows to linux. I've been using it solely on linux most of the time, and the only problem is that I can't control the sound volume through any "mixer", only some through some applications such as juk, kaffeine, etc. Juk will sometimes have some weird bug and keep repeating a sound instead of actually playing any song, and won't recover even if I kill it and restart it. I don't know if it has to do with the configuration issue or if it's something that would happen anyway. I've just installed MPC/MPD as a replacement and I'll eventually discover.
As soon as I have more time I'll try what seems to be a solution I saw here:
Nope. It did some compilation-like stuff or whatever it does, said to restart alsa, I did, I did the "modprobe -v snd-hda-intel", but now I get a new error message:
WARNING: Error inserting snd_hwdep (/lib/modules/2.6.26-2-686/updates/alsa/acore/snd-hwdep.ko): Unknown symbol in module, or unknown parameter (see dmesg)
head -6 /proc/asound/card0/codec#0
Codec: VIA VT1708B 8-Ch
Function Id: 0x1
Vendor Id: 0x1106e721
Subsystem Id: 0x10192683
Revision Id: 0x100100
Oddly enough it ceased to work completely in arch linux, but that's a different matter altogether, probably some sloppy upgrade I did. As a matter of fact, I'm not sure it ever played on arch itself, maybe only when I was chrooting arch from debian. In debian it's still semi-ok, with volume being adjustable only on individual programs or "physically", at the speakers. I didn't try ubuntu again yet.
many thanks. It didn't work yet, but probably only because I'm in some odd situation with the kernel sources, so I'm not being able to make the "make" work.
I guess I may have to clean some stuff, like having only the sources for a single kernel, or perhaps I'll have to/be able to do it if I just compile my kernel in a "standard" way, rather than keep trying to fix the "debian way" to make this work, which I may have messed somehow.
By the way, on arch, it's working, and I guess it's normal, even though I'd expect the kmix mixer to have more levers. I think I simply hadn't installed it early on.
I'll "bump" the topic for a good reason, I've found a reasonably decent solution.
Sometime after posting this topic, I switched to Debian Squeeze (which was, and still is, as of today, testing), but the problem persisted. I had sound , but no global controls of volume, only on specific applications (VLC, mplayer, etc), and, of course, on the microsystem I use as speakers.
I tried dozens of solutions I've found (most about changes on alsa-base.conf), all related with intel sound on linux, some of which actually have made things even worse (no sound at all), others just changed the error messages, but overall, none worked perfectly.
I had not tried to compile the kernel yet, as some things were hinting me it was not the case, my ALSA version already was the one that was supposed to work.
For whatever reason, I tried the liquorix kernel yesterday, and, voilá, everything worked after I rebooted on it. Still had sound, and sound with global controls. It scared me a bit at first as the volume was very low, so I thought I had no sound at all for a little while, but then I was able to run alsamixer (which wouldn't run with the standard kernel) and just raise it.
The liquorix kernel is a kernel that some users of debian and derivates (mostly, I guess) use to optimal desktop performance (debian's standard kernels are said to be in a compromise between server and desktop). It's based on "zen" (zenwalk, I guess, which is a derivative of slackare).
Only one day with it, no complains at all, even though I didn't perceived any difference except that the sound works as it should. I didn't do any sort of benchmarking though.
So, that's it. I don't know if this kernel or kernel changes in configuration or patches are a solution for everyone who has problems with intel sound on linux, but I've not found many posts pointing to the kernel as a key element for the solution, so I think this post is worth being made.
Just a finale note: it may be a bit more complex (if possible at all) to have the liquorix kernel (2.6.34) on debian Lenny, whose kernel is 2.6.30 or .28, if I recall. And the update to debian Squeeze may be a bit tricky too, I tried it earlier this year, and I ended out without Xorg/graphics mode, and not being able to continue the update to Squeeze, or turn back to Lenny. I've installed Squeeze as a fresh install. It may have been fixed since then, but beware, it worth checking a bit more instead of just doing the normal release upgrading procedure.