Sound is working fine-- I can test my sound card in YAST and get sound when I play audio or video files using kaffine. But when I try to use amarok or banshee I get only silence, even when I just try to play system sounds. Any thoughts?
Tried messing around with things more this evening. Still no luck. I did find some weirdness in the multimedia settings of the configure desktop widget. There are a bunch of sound cards/devices detected. Now in YAST it detects my video card (I guess because I talks over HDMI) and my sound card. I leave the HDMI device not configured and move on. But in desktop settings I see 9 devices, and only the first one produces sound when I press the test button. The preferred device is:
HDAATI SB (ALC889A Analog) → this works when I press test and is “card 0, dev0”
After that comes:
HDAATI SB (ALC889A Digital) → This does not work when I press test and is card 0, dev1
Then there are a bunch of NVIDIA HDMI devices, which I’m guessing is my video card being misidentified again, and
HDAATI SB, ALC889A Digital (IEC958 (S/PDIF) Digital Audio Out)
Which doesn’t show up in YAST. Clicking on the “Backend” tab, the only one present is xine-- which works fine on both audio and video files.
All of this tells me nothing but maybe it will mean something to somebody else out there. Why would sound work fine in some applications and not in others?
Are you a KDE user? Since you note you tried kaffeine I assume that is the case, but if it is not the case, then I have just typed a bunch of things needlessly (so I have my fingers crossed - and NOTE in future it would help if you specify your desktop for sound issues, because the way sound is handled is DIFFERENT between KDE and Gnome).
Ok, so typically problems can occur with system sounds (and also firefox) not playing for a few reasons:
(1) an application has seized the audio device and is NOT sharing it, or
(2) your sound simply is not setup properly for system to use (and the latest amarok uses the ‘system’ sound). I don’t know about banshee.
(3) you don’t have the necessary codecs
**Item 1 - an application has seized the audio device **
So, lets look at item-1, an application has seized the audio device. Linux is notorious for having this problem, which is one reason why pulse audio is gaining momentum. caf4926’s suggestion of " rcalsasound restart " will restart your Linux sound (including reseting KDE’s control of sound) and that should break the hold any application may have on the audio device. Then the sound ‘may’ work for those apps until the next sound app seizes the device and refuses to share it, when you will have the exact same problem again.
You can check to see what app has seized the audio device, by checking to see what are the open files associated with the audio device. The way to check those open files is by typing the following:
lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*
note that is /dev/snd/* for syntax.
Now what you see there will make no sense initially. You need to run that very command MANY times, when sound works and when it does not work, until eventully the meaning of it will make sense, and you understand what it states. So don’t post the output here and expect us to understand it, as we won’t. As noted, it need to be running many times under different circumstances so one can learn what files are open in what cases.
Of course, even knowing an application has seized the audio device and is not sharing it is no solution. It only helps point to the problem. What would be nice is if applications would share the audio device with other applications. I know of 2 ways to achieve this, one is via “alsa API” (which I use) and the other is via “pulse audio” (which is the way of the future, but I do NOT know how to tune that). So lets look at what I do know. …
In the case of the “alsa API”, as long as an application uses the alsa API then it will share the audio device with other applications that use the alsa API. So clearly then the trick is to ensure all applications, including the desktop, use the alsa API. The way in which I do that is to install the application xine-ui (in addition to libxine1) from packman packagers if possible. And then for each multimedia application I set its output audio mode to use the alsa API. This can be a bit tricky, as each application will give this alsa API a different name, and it can be a trial and error to find the correct output audio mode. Sometimes it is called ‘alsa’ and other times called ‘oss’ (which calls the alsa emulation of oss using the alsa API). For pulse audio users (who have pulse active) note that specifying an application to use the ‘alsa oss’ emulation may block your pulse audio … so be careful there.
For KDE desktop users, that means you need to run xine, and go to settings (ensuring permissions set to ‘master of the known universe’) and then set the output audio mode. Then go to KDE’s kmenu > Configure desktop > multimedia > backend and select xine as the backend (as xine is now set to use the alsa API (via oss possibly)). The EXACT menu sequence in Configure desktop is changing rapidly with different KDE versions, so I can NOT be precise here.
**ITEM-2 - Setup KDE for system sound **
Now its possible you did the above and still amarok won’t play sound. System sounds still won’t work. Firefix won’t play sound. That could be because you have more than one sound device on your PC, and you have amarok, firefox, system setup to play sound to the sound device which is NOT connected, and you have YaST sound/alsa configuration setup to play sound to the device that is connected (and ergo kaffeine plays sound).
So check if the order of sound devices in KDE’s kmenu > Configure desktop > Multimedia is the same as the order of sound devices in YaST’s > Hardware > Sound.
Another obvious thing to check (which many new users miss) is ALWAYS check the PCM volume levels are turned up, as those can change dynamically each time an application is started.
**ITEM-3 - you don’t have the necessary codecs **
Its possible too, that you do not have the necessary codecs, as there is not one global location for codecs in Linux that all applications use. Rather ffmepg has its own codecs, as does mplayer as does vlc. So one needs to feed all these with the appropriate codecs, and the easiest way to do that, is to follow the guide caf4926 created here: Multi-media and Restricted Format Installation Guide and also note jdmcdaniel3 wrote a script to diagnose your sound setup to help point out where problems may lay MultiMedia Checker or mmcheck - Check Your openSUSE MultiMedia Setup in Just 16 Steps
**The above is all changing **
Ok, its not ALL changing, but it is evolving. Eventually pulse audio will be used everywhere, and when that happens there will be specific gui/controls to help tune this easier. Apps such as “pavucontrol” and “padevchooser” will be available to assist users who have pulse audio enabled to do all of the above. I have NOT used those apps so I can offer no real advice there. Sorry.
… hmmm … and if you ‘managed somehow’ to read all the above, you can understand better why my wife gets irritated with me sometimes as I jump on a podium.
A special thanks to oldcpu for an extremely educational post.
I remember some debate, or maybe complaining is a better term, on these forums around release 11.1 or 11.2 about pulseaudio not working in a lot of cases. Unfortunately I never paid much attention to those posts because sound always worked for me. Oops.
A quick clarification: yes, I’m a KDE user.
Restarting the sound system didn’t work for me. There were a handful of libs that weren’t being pulled from pacman (which is strange because I lowered pacman’s priority to 10 and left all the others at default) but I’ve corrected that.
I doubt that I have a codec issue, since the problem is the same for ogg, mp3, wav files, and even system sounds.
Moving backwards to item 2-- that was my initial train of thought, and it’s why I posted about the different devices in KDE’s kmenu > Configure desktop > Multimedia. In the case of both YAST and KDE’s configure desktop, the first card on the list works and will play a test sound from the configuration app. YAST sees “SBx00 Azalia (Intel HDA)”, and KDE’s Configure sees “HDAATI SB (ALC889A Analog)”
Both YAST and configure also seem to see my video card (the only Nvidia device in my computer is my video card). Which strikes me as sort of weird. Configure also seems to detect a digital output from my on-board sound card “HDAATI SB (ALC889A Digital)” which doesn’t play test sounds. Now… Firefox has sound. Or at least the flash plug-in for firefox has sound. What other way is there to test sound on Firefox?
This leads me to the unfortunate conclusion that things are configured correctly but one application is somehow locking up the use of the sound card, as oldcpu suggests in (1).
lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/apc/.gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 31729 apc 29u CHR 116,9 0t0 617817 /dev/snd/controlC0
pulseaudi 31729 apc 36u CHR 116,9 0t0 617817 /dev/snd/controlC0
When I am not playing a sound file (amarok, xine, all other sound-playing software that I’m aware of closed) :
lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*
lsof: WARNING: can’t stat() fuse.gvfs-fuse-daemon file system /home/apc/.gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 31729 apc 29u CHR 116,9 0t0 617817 /dev/snd/controlC0
pulseaudi 31729 apc 36u CHR 116,9 0t0 617817 /dev/snd/controlC0
So.
Now I feel even more clueless.
Should pulseaudio not be running? Is that what’s messing me up? Or is it that something is preventing amarok from opening the audio stream files it wants to open?
Thats good news and important information. Firefox uses your ‘system’ sound and hence that suggests your KDE desktop is setup properly to play sound.
So IMHO you now need to focus on the applications (what audio mode) and check to see if any application has seized the sound device. When you note running ‘rcalsasound restart’ did not help, that suggests that maybe one application has not seized the audio device.
A useful test is to boot openSUSE, then as soon as you finish booting (BEFORE doing anything else) run ‘rcalsasound restart’ with root permissions. That will ensure that if KDE has locked up the sound device, it will let it go. Then as a regular user type ‘kmix’ to restart the mixer (as that would have been stopped by restarting the sound with ‘rcalsasound restart’). Then BEFORE doing any thing else, launch banshee. Note I said Banshee. I did NOT say Amarok. Does Banshee play sound now?
Reference Amarok and your graphic (yes graphic) hardware, … do you have a 32-bit openSUSE-11.3 KDE4 with the proprietary nVidia graphic driver ? if so, the only way to get amarok running properly is to type:
strace amarok
That is a very wicked bug in 32-bit openSUSE-11.3 w/KDE4 and proprietary nVidia driver. Solution may not be coming any time soon. Gnome/Xfce/LXDE users do not have this bug. Users of ATI, Intel graphic hardware do not have this bug. User of nVidia hardware with nouveau driver or nv driver do not have this bug. And 64-bit users do not have this bug.
Only users of 32-bit openSUSE-11.3 KDE4 with proprietary nVidia graphic driver have this bug, and it affects MANY applications, such as amarok, vlc, virtual box, … etc …
Ok. Haven’t had much time to play around with this, but I managed to get amarok working today.
1st:
I made certain that all the gstreamer, vlc and zine packages matched-- ie that I wasn’t taking some from opensuse, some from packman.
When I did that, I got new options for the backend the multimedia panel of the “configure desktop” kde app. Before, I had only xine (and xine seemed to be working), but now I have Xine, VLC, and gstreamer. Playing test sounds in xine and VLC back-ends workes, but gstreamer does not.
Which led me to
2nd:
I changed the backend to VLC
The video lan client back-end left me with fewer sound devices (only two) both of which work for playing test sounds. Amarok is now functional.
However other system sounds are not. Sortof not. I’m not sure. Amarok plays the system ring when it finishes it’s playlist, but typing “beep” into a terminal produces no sound. Also, Kmuddy, my favorite mud client, can’t play audio files.
So things are much better, but not exactly perfect.
I have that problem in an X200 Thinkpad, Intel audio and basically non proprietary drivers, and it sometimes work and sometimes does not. Started with Flash player inside Firefox, no sound at all but Banshee will be OK. I played around by disabling Pulse audio but other things got worst. Finally I noticed that in Pulse Audio console, there is a Playbak tab where you can see which applicaitons are using the audio and volume at the same time. However, when I clicked on the down arrow at the speaker icon of any applicaiton (in this case Banshee), I have an option of Move Stream and Terminate Stream, and at the move stream option there are other two option, HDA Intel Conexant - Digital and HDA Intel Conexant - Analog. Well, every single song played by Banshee, that setting is changed from Analog to Digital, and in Digital, sound disappears. It has to be set to Analog in order to hear the sound on the speaker, but Banshee keeps changing that setting to Digital, after every songs starts. I am focusing on how to make Pulse audio to keep that setting without changing now, I hate more Windows than any other OS and that is what keeps me troubleshooting Linux but lately it seems to me that is getting worst arrggggg.
Good luck