no sound on CMI8738 under KDE 4.1/4.2 - openSUSE 11.1

Here’s my new thread. I needed a couple days to test as much as I could before writing this post.

I have a sound issue on 1 machine with openSUSE 11.1 and KDE (4.1 and 4.2).

I cannot hear anything anymore out of my speakers after login/logout once in KDE. Sound worked before with all WMs under X (twm, ctwm, icewm, etc ), Gnome, Xfce, as well as in the console (while booting in runlevel 3 ) before and after running X. As soon as I start KDE, the sound device get muted … for ever, as if I would have turned off the speakers. I means that KDE (Phonon ?) must have left it in an usuable state : changed an access right ? created a wrong link ? or modified a property somewhere where it was not supposed to.

To isolate and reproduce the problem, I conducted several installs of openSUSE 11.1 on 4 machines, all of them with the same sound chip:

  • box1: M2NPV-VM (bios rev 140) + AMD Sempron 3200+ (single core, 64 bit)
  • box2: M2NPV-VM (bios rev 140) + AMD Athlon X2 3800+
  • box3: P5QL PRO + Intel Core2 Duo E8400
  • box4: A7V266-E + AMD Athlon XP1770+ (i386)

box4 is a rather old 32bit system but one of the best mainboards you could get ten years ago.

The problem affects only box1.
Boxes 1, 2 and 3 have onboard sound disabled and a PCI C-Media CMI8738. The models/revisions are slightly different from one card to another. It might not be relevant, since changing the soundcard in box1 didn’t solve the issue. Box 4 has a CMI8738 on board.

Sound was OK before I started KDE : listening to mp3 with mpg123, listening to audio streams and watching videos with mplayer, watching and hearing Flash videos in FF as well. I reproduced the same error after several fresh installs.

The following attempts to fix the problem didn’t have any effect:

  • rebooting
  • installing KDE 4.2 instead of KDE 4. 1
  • installing drivers from the alsa/alsa-update repository
  • replacing the soundcard in box1 with a similar one ( BTW inserted in another PCI slot)
  • flashing the BIOS of box1 (I only did that, so it would match the one in box2)
  • playing with alsamixer or other mixer programs (all levels look ok, nobody’s muted)
  • reconfiguring with alsaconf.

I suspect KDE to have picked a wrong device/channel and set it as the default at a level where a desktop environment is not supposed to intervene. Despite the fact that I don’t understand what it exactly did, I find that behaviour rather unacceptable (but I might have missed something). Back in Gnome, I can hear sound in Sound Preferences by choosing PCI 2nd DAC (Alsa) on the device rather than autodetect or PCI DAC/ADC (which I guess would be right and what KDE may have changed). But changing that setting doesn’t seem to affect programs output and wouldn’t probably do anything outside of Gnome.

I would’nt mind not having sound in KDE but I would like to be able to get back the sound as it was before KDE screwed it up, other than by reinstalling openSUSE.
So my simple question: what did KDE (Phonon ?) do to the sound devicel ? With that answer, I could probably find a way to prevent it to happen or reverse the sound state to its default. Comparing the listings of /etc and /dev before and after KDE didn’t bring any usefull information.

Box1 would have sound under openSUSE if I would reinstall the system and never use KDE. But I would’nt call it a satisfactory solution. Other Linux and Unixes installed on that machine do not have sound issues.

Thanks for any advice.

I would agree with that, and whether or not you get this to work, its likely best to raise a bug report. There is guidance here as to how you can do that: Submitting Bug Reports - openSUSE Be certain to select component “sound” as that will get the attention of the SuSE-GmbH sound developer, who is also an alsa sound developer. If you select KDE or kernel, IMHO it may not get his attention. Hence select “sound” as the component.

Reference your specific problem, with my feeble understanding, I would need more information as to the specifics of your hardware and software.

Note, the information I am going to ask for, is using methods documented in the openSUSE audio troubleshooting guide:
SDB:AudioTroubleshooting - openSUSE

Also, rather than use mp3 playing for a test, when testing if you have sound, please copy and paste the following speaker-test into a Gnome terminal or a kde konsole:

speaker-test -Dplug:front -c2 -l5 -twav
Note Linux is case sensitive, and “D” is not the same as “d”. To stop the above test, while the konsole/xterm has the mouse focus, press <CTRL><C> on the keyboard. Note you should check your mixer settings (kmix if using KDE, and alsamixer if using Gnome) to ensure that PCM and Master Volume are set around 95%. Once you have basic sound established you can back off to lower volume levels. Note the test for surround sound is different.

If that test yields errors (and its very very very common to get errors there), try instead this more simple test: speaker-test -c2 -l5 -twavYou should hear a female voice saying ‘FRONT LEFT’, ‘FRONT RIGHT’ five times. Its quite common that one of those speaker tests will work and one will NOT work, so don’t be distressed if that is the case. IF that test gives sound, stop now, post that the sound test gives sound, and we will look at other possible causes for your applications not giving you the sound you want (such as missing codecs, using the wrong packaged version … etc … ).

Try those speaker-tests as both a regular user, and with root permissions. If you have a headset, try with your headset plugged in, and also with your headset not plugged in (for speakers).

Do not use YaST > Hardware > Sound as your sound test, as it has a known bug for some hardware when it comes to testing sound.

Don’t forget to check your mixer (kmix in kde and alsamixer/amixer in gnome) moving up both PCM and master volume. Also to to YaST > Hardware > Sound … (its all noted in the troubleshooting guide I linked).

Assuming no sound, to provide more detailed information, can you with your PC connected to the internet, by opening a kde konsole and typing “su” (no quotes - enter root password) and then and typing and executing twice :
/usr/sbin/alsa-info.shthe first time it will ask to update. Select YES for the update. The second time that will run a diagnostic script and post the output to a web site on the Internet. It will give you the URL of the web site. Please post that URL here. JUST the URL.

Also, please copy and paste the following commands one line at a time into a gnome-terminal or a konsole and post here the output: rpm -qa | grep alsa
rpm -qa | grep pulse
rpm -q libasound2
uname -a
cat /etc/modprobe.d/sound

You can also check to see what sound device, if any, has seized the sound device, by typing:
lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*

You can always check to see if restarting your sound device (once booted to kde4) works by typing:
su -c ‘rcalsasound restart’
and enter root password when prompted, then test your sound.

If there is a problem with alsa, after doing that alsa restart attempt, you can type:dmesg > dmesg.txtand then open dmesg.txt with a text edit to see if there were any errors reported.

Thank you for responding so quickly.
These tests were the first thing I did. Let me try to explain how absurd it “sounds”. Everything looks right. Tests don’t show error messages, neither do programs started from the console. An (excellent) program like mplayer would tell you if it cannot access the sound device because it’s busy or unreachable. All levels appear at the maximum in alsamixer. I also unmuted everything, whether relevant or not (like phone, line, mic). Without any argument, speaker-test should produce the ordinary noise of the sea. On this computer, it does not. On another one, with the same mainboard, the same soundcard and exactly the same software installed, it does. So, under normal circonstances, you would think that the speakers are off ore broken, or the soundcard or the mainboard. Ok, but I’ve been installing openSUSE ten times on that computer and got everytime the same result: as long as I don’t start KDE, I can hear sound out of my speakers. After KDE, all sound tests or programs appear to work properly, mixer levels look fine but nothing, not even a hiss comes from the speakers. It is like KDE had cut the output from the soundcard to the speakers or redirect all sound activity nowhere or to a channel I don’t know about.

running lsof together with speaker-test produces the same (visual) output on all computers, showing that it addressed the sound device :

speaker-test -Dplug:front -c2 -l5 -twav & lsof | grep snd

speaker-test 1.0.18

Playback device is plug:front
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 16384
Period size range from 16 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
[1] 7669
mixer_app 7255 root 21r CHR 116,8 0t0 582867 /dev/snd/controlC0
speaker-t 7669 root mem CHR 116,6 582819 /dev/snd/pcmC0D0p
speaker-t 7669 root 4u CHR 116,6 0t0 582819 /dev/snd/pcmC0D0p

(mixer_app is the gnome volume applet)

‘rcalsasound restart’ went successfully and wrote the following log in dmesg :

C-Media PCI 0000:02:08.0: PCI INT A disabled
vendor=10de device=026f
C-Media PCI 0000:02:08.0: PCI INT A -> Link[APC1] -> GSI 16 (level, low) -> IRQ 16

Not to mention how many times I checked to make sure that I didn’t turned off the speakers, allthough it wasn’t necessary because this computer hangs on a KVM/sound switch together with another one wich hasn’t any sound issue. Not to mention that I also tried to remove the KVM switch. And I have to repeat this because it is the most important information in that debugging process : the sound is working under any circumstance (console or X + any wm but KDE) as soon as I don’t start KDE. After running KDE once, the speakers are definitely quiet untill I reinstall the system.

Do you know a way to find out which channel of the soundcard is currently used ? And a command to redirect the sound output to the right channel, in case what KDE did was to send the sound output to nowhere ?

I provided the tools that I use for diagnosing audio problems in my above post ( script, rpm command, dmesg, lsof … etc … ).

The audio troubleshooting guide provides guidance for unmuting in the mixer, and tuning one’s settings, and the script lists the mixer settings, so that when the URL (provided by is posted, those trying to help can do a quality check on such settings. One can also use an noupload option, to have the output sent to a text file, where the text file can be sent to a paste bin site, as that is useful in cases where a user’s PC does not have direct internet.

From what I can discern from your post, you believe that you have investigated thoroughly already what I have asked, and do not want the quality check I can provide (by providing output, and output of the rpm and cat commands I asked you provide info on) . Thats perfectly fair and ok. Not everyone wants someone else learning over their shoulder doing the sort of review and quality check that I would perform. You also have a differerent approach in mind wrt redirect sound to channels and such, and I wish you best of luck in following that approach, but its not an approach I have the knowledge to help you on. Sorry.

There is some pulse audio information here, in case it is pulse audio in KDE that is causing you problem on that specific PC:
Sound-concepts - openSUSE - pulse audio

I gave the wrong link above. I had intended to give this link from the audio troubleshooting guide:
SDB:AudioTroubleshooting - openSUSE - pulse audio problems

Well… I didn’t say that. As a Unix sysadmim, I tend not to believe anything but I often suspect things (and be wrong or be right but keep trying to solve problems). I know the time and effort it requires to help computer users - I have been doing that for about 20 years - and I’m myself always grateful for any help. I did in fact run and send the output. I didn’t mention it in my previous post because it was already long enough. Sorry about that.

I didn’t provide the rpm output because I mentionned that I had exactly the same software installed on 4 computers and only 1 is concerned by this sound issue. So I thought that looking at the software at this point wouldn’t bring us that far. I also previously mentionned that I installed with and without the alsa/alsa-update repositories and that it didn’t make any difference.

But, ok, sorry again, here is it :

rpm -qa | awk ‘/alsa|pulse|libasound.2/ { print }’ | sort

uname -a

Linux bareil #1 SMP 2009-03-31 14:50:44 +0200 x86_64 x86_64 x86_64 GNU/Linux

#cat /etc/modprobe.d/sound
options snd slots=snd-cmipci

9ftC.leFtcOMtGx0:CMI8738/C3DX PCI Audio Device

alias snd-card-0 snd-cmipci

From what I can tell, pulse isn’t actually running (on any computer). All I have seen from pulse for now in a “connection refused”. I will certainly have to ask myself why sooner or later. But I don’t miss it and when I read “This is the approach that is taken by other systems such as Apples CoreAudio and the Windows Vista audio subsystem and has a number of advantages”, I’m afraid I won’t see the benefit from today to tomorrow.

But wait! … a propos Windows … Here comes the funny part!

I just started an XP Virtual Machine using VirtualBox, not even for the purpose of debbuging this sound problem. And guess what! I suddenly heard the XP login sound. So I shut down the Virtual Machine, exited VirtualBox and ran mplayer with an audio stream. Nothing to hear: speakers mute as “usual”. I then opened VirtualBox and started a virtual machine (with alsa emulating an ICH AC97 controller) and I suddendly heard the radio in my Gnome session, shut down the VirtualBox again and the sound muted back.

Conclusion : if KDE screws up your sound, start a Windows VM and enjoy your favorite radio channel again.

lsof | grep snd
mplayer 6818 root mem CHR 116,6 582819 /dev/snd/pcmC0D0p
mplayer 6818 root 5r CHR 116,2 0t0 582728 /dev/snd/timer
mplayer 6818 root 6u CHR 116,6 0t0 582819 /dev/snd/pcmC0D0p
VirtualBo 6884 root mem CHR 116,7 582838 /dev/snd/pcmC0D0c
VirtualBo 6884 root mem CHR 116,6 582819 /dev/snd/pcmC0D0p
VirtualBo 6884 root 49r CHR 116,2 0t0 582728 /dev/snd/timer
VirtualBo 6884 root 50u CHR 116,7 0t0 582838 /dev/snd/pcmC0D0c
VirtualBo 6884 root 51r CHR 116,2 0t0 582728 /dev/snd/timer
VirtualBo 6884 root 52u CHR 116,6 0t0 582819 /dev/snd/pcmC0D0p
mixer_app 7255 root 21r CHR 116,8 0t0 582867 /dev/snd/controlC0

Of course I do not intend to do that. And the OS running is the VM doesn’t matter. I did it again with a Linux VM and it worked too.
‘rcalsasound restart’ restarts alsa successfully but doesn’t bring the sound back. Virtualbox does, as soon as I fire up a virtual machine with sound enabled.

Sounds crazy, eh?

If VirtualBox had been cleanly designed, it would emulate sound on another channel in order not to perturb sound activity in the host (just guessing). So admitting Kde (or whoever handles sound in KDE) had arbitrarly and durabily replaced the default channel with an alternate one, attempting to address sound in a virtual machine would open a channel that programs running in the host might be able to use if they don’t get another one. I’m aware that this is just a theory.

You just get the alsa mantra around here…

Try using the pavdevchooser, paman or some of the other tools. Try starting the daemon from the command line(Sorry no I don’t know how or what) Sorry trying to find tools now.

I can’t really help as I don’t use P/A. As for not sure whether your using it or not. Afaik unless you disabled it I’m pretty sure you are, is it not showing up in ps aux?

Though not sure what is happening but if I was to guess I would expect it is failing you get no sound. So you open VM this somehow restarts P/A which now means it plays. Is there not P/A log?

Any way hopefully that’ll give you some further stuff to investigate.

rpm -ql pulseaudio-utils seems it has a few there. Perhaps some of those can help you further

I checked with ps aux I have it for my user with /usr/bin/pulseaudio

Also try running it from the cli seems quite verbose from my brief testing.

These tools are typically of more help for Gnome users. I suspect they are not installed in the KDE 4.1/4.2 setup, although as a KDE-3.5.10 user I do not know.

I posted links about some of the pulse utilities here:
openSUSE Forums - View Single Post - PulseAudio

Run mplayer using the front end “smplayer”. And then from smplayer try some of the different audio output modules and see if any of those help.

Please also confirm you tried all 3 sound tests from the audio troubleshooting guide that I linked, and did not stop after the first one or two.

Unless I missed it not sure those tools are packaged at all for Suse. Though the documentation around Suse’s implementation of P/A is hazy at the best.

But from what I saw in man pulseaudio there is a fair bit to go on…

I didn’t say that I run the KDE setup. During the openSUSE setup, I picked Gnome and installed the system with as few mouse clicks as possible, i.e. I never scroll up and down in the packages list and select anything at that point (I have been doing that a lot in the past and I know how time consuming it could be). I personally don’t use KDE or Gnome (as Linus Torvald, as he wask asked about the best choice years ago - I wonder what he thinks noawdays, but I would be surprised if he likes KDE ), other than for configuring and testing purpose. After the installation completes, I open a terminal and execute my own install script. It does a lot of settings (describing it would be far beyond that post). Under openSUSE, I use zypper and try to make the best use of depencies : installing patterns first, then packages. The first thing I do is to link /var/cache/zypp/packages to a directory in my fileserver, otherwise I would have to download the same stuff hundred times, making everyone unhappy. So, Kde and Gnome are installed, Xfce and some other simple window managers too. I modified startx to take the name of the window manager or a computer name in the lan (in case of xdmcp login). Alternatively I can use xdm or kdm. The new gdm version shipped whit openSUSE is a regression - I’m sorry to say that but I won’t use it.

The pulse utils are installed. Allthough a sound server like pulse might offer a solution by bulding an interface between the hardware and the programs, pulse is not running at that point. So it didn’t cause the problem I’m trying to understand and solve.

I ran the first tests described on the AudioTroubleshooting page even before I started posting here.

speaker-test -Dplug:front -c2 -l5 -twav

speaker-test -c2 -l5 -twav

and also


None of them produced any sound.
I don’t know what device names the -D option handles, but I think speaker-test lacks an option for the device number on which it should output the sound. No wonder that it stays mute if it only takes device 0 on soundcard 0, - the one that has been neutralized by KDE (more details to come).

I also run alsaconf with no success. I’ve been using alsaconf on Debian since the “beginning”. What I always found funny about alsaconf, it that it might interfere with one of my xinit environment variable. So whenever it asks if it should overwrite a file, it is one of my wm config file. Anyway, just a funny story. But yes I did run alsaconf (in the console) without success.

I ran as you pointed to it. But I will take a closer look at its output.

I guess I should run these tests again after a fresh install and before running KDE (I never boot into KDE since I run the Gnome setup and immetiadely switch into runlevel 3). I should also save the output of before an after I run KDE and make a diff.

well … I didn’t cat /proc/asound. Sorry.

cat /proc/asound/{version,modules,cards}

Advanced Linux Sound Architecture Driver Version 1.0.17.
0 snd_cmipci
0 [CMI8738 ]: CMI8738 - C-Media CMI8738
C-Media CMI8738 (model 37) at 0xbc00, irq 16

However I mentionned that I replaced the soundcard with another one, so the /proc/asoud info would have been different.

The pulse utils are installed. Allthough a sound server like pulse might offer a solution by bulding an interface between the hardware and the programs, pulse is not running at that point. So it didn’t cause the problem I’m trying to understand and solve.

It is installed and should be running even more so in a gnome one…
PulseAudio - openSUSE has been since 11 for gnome installs, I checked my 11.1 KDE4 I have no gnome at all.

I really suspect your problem is P/A and the fact it isn’t running and VM starts it… But Suse docs are scarce to non-existent.

When I tried to remove libpulse0 it tried downgrading to 4.1.3 due to a dep on openjdk <shrug>

Yep! I got the same idea yesterday - inspired by VirtualBox - but I was to tired to post my conclusion.
I’m not a “front end” fan and never used smplayer (except once recently trying to get the TV tuner of a radeon aiw to work - a completely different problem I should maybe address later in another thread). But I attempted to output sound to another device. My theory about KDE having switched “channels” was half correct, at least the idea, because there were “devices” rather than “channels” (I don’t have the technical knowledge about that ).

With mplayer, the following command would output the sound to the first device of the first sound card using alsa driver:

mplayer -ao alsa:device=hw=0.0 <file>

As this is the defaut, these parameters are optional.
Actually, pulse is the default sound output under openSUSE, but mplayer uses alsa as a second choice if it doesn’t find pulse.

The above command produces sound of the 3 computers not affected by the problem. To hear something on the one which has the sound issue, I used :

mplayer -ao alsa:device=hw=0.1 <file>

which means : output sound to soundcard 0 device 1. It does work (under Gnome, other X environments and console).
Under Kde, it was not enough, I also had to open the sound preferences, show Advanced devices, select “C-Media CMI8738 (model 37) (C-Media PCI 2nd DAC)” and move it to the top of the list. Then I could hear sound using mplayer, but still had to explicitely specify the sound output I described above in the command line.(!)

OK, it’s a hack, not a satisfactory solution for a user. A user would still complain that he has no sound(like for example in FF ). It only works with programs like mplayer which let you explicitely specify the device number for the sound output. A more satisfactory workaround would be to reset the default sound output to the first device of the soundcard, as it was before KDE messed it up. I don’t know how to do that. So if somebody knows … that’s the workaround.

Beyond that problem, I believe (well, sometimes I believe stuff too) that this behaviour is not acceptable. Whether KDE can handle sound or not should remain KDE’s problem. It should not permanently disable a sound device (even on broken harware) and the kernel should never let that happen.

I can only point you to the scary picture discussed it a bit here but my understanding is it has nothing to do with KDE which I think is phonon(Hell I haven’t got a clue anymore)

Its one of the pulse audio sinks(Mmm what does that mean) I think the scary diagram says it more. If you follow this thread you’ll get to what one of the KDE devs thinks bit dated but I wonder whether there opinion has changed much…

volume very feeble - openSUSE Forums

How about the google

By the way you can find the P/A tools mentioned by Oldcpu think on OSS, I reckon one of these may assist you here, guessing padevchooser…

You’re right. I wrote a couple times KDE (Phonon?), then at some point got rid of the phonon part.