LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 06-26-2004, 11:36 PM   #1
Lord Zoltar
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 200

Rep: Reputation: 30
sound and ALSA problems in Slack 9.1, KDE 3.2.2


Just migrated from RedHat 9 to Slackware 9.1 (just days before 10 came out! sigh...)
I am having trouble getting sound to work. When I log in to a KDE session, I get the following message:

Sound server informational message:
Error while initializing the sound driver:
device: default can't be opened for playback (Permission denied)
The sound server will continue, using the null output device.

When I run kmix from the command line, I get:

$ kmix
kmix: ERROR: Alsa mixer cannot be found.
Please check that the soundcard is installed and the
soundcard driver is loaded.
kmix:
kmix: ERROR: Alsa mixer cannot be found.
Please check that the soundcard is installed and the
soundcard driver is loaded.
kmix:

Not sure what is going on here. The card worked fine under RedHat.
 
Old 06-27-2004, 02:59 AM   #2
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Are the modules loaded? Use alsamixer instead of kmix.
 
Old 06-27-2004, 06:59 PM   #3
Lord Zoltar
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 30
What modules should I be checking for, and how do I check?
I just tried playing an mp3 with Noatun. It played it, and the oscilloscope looked like the song was playing, I just couldn't hear anything. I went to the volume control, and nothing is muted. Also, when I try to play audio CD's, it's as if the CD doesn't exist. none of the programs recognize it.
 
Old 06-27-2004, 07:26 PM   #4
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
You check the modules with lsmod. Post the results here.
 
Old 06-27-2004, 10:44 PM   #5
Lord Zoltar
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 30
$ lsmod
Module Size Used by Not tainted
radeon 102340 1
snd-pcm-oss 37252 0
snd-mixer-oss 11992 0 [snd-pcm-oss]
uhci 24496 0 (unused)
ehci-hcd 16872 0 (unused)
snd-via82xx 11712 0
snd-pcm 55904 0 [snd-pcm-oss snd-via82xx]
snd-timer 13252 0 [snd-pcm]
snd-ac97-codec 37240 0 [snd-via82xx]
snd-page-alloc 6004 0 [snd-via82xx snd-pcm]
snd-mpu401-uart 3136 0 [snd-via82xx]
snd-rawmidi 12512 0 [snd-mpu401-uart]
snd-seq-device 3920 0 [snd-rawmidi]
snd 27460 0 [snd-pcm-oss snd-mixer-oss snd-via82xx snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
via-rhine 13552 1
mii 2304 0 [via-rhine]
crc32 2880 0 [via-rhine]
pcmcia_core 40032 0
ide-scsi 9424 0
printer 7040 0
audio 41656 0 (unused)
usbcore 58400 1 [uhci ehci-hcd printer audio]
soundcore 3332 4 [snd audio]
agpgart 39576 3
apm 9640 2


All looks good here (as far as I can tell), the only line that looks suspicious to me is the oone that says the audio module is unused.
 
Old 06-27-2004, 11:42 PM   #6
jeffman12
LQ Newbie
 
Registered: Jun 2004
Location: Vancouver, CAN
Distribution: Slackware 10.0
Posts: 26

Rep: Reputation: 15
I am having problems with ALSA as well. I can only get XMMS to output sound, after changing the device from sound car 0 to 1. Card 0 is the modem, and I am guessing that none of the system sounds, along with other programs, does not output sound because they are trying to go through the modem.

How can I get rid of the modem, at least sound wise, or move the sound card into card 0?
I have tried changing the device location in the Control Centre, but I am having no luck, I do not know where to point it to...
 
Old 07-08-2004, 01:27 AM   #7
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Lord Zoltar, the modules seem to be loaded just fine. Try using the alsamixer utitlity to control the sound levels instead of kmix. The alsamixer app is part of the alsa-utils package. Try that and see where you get.

jeffman12, you'd be better off starting a new thread on this one.

PS: Sorry for not replying for such a long time I've had problems with my modem.

Last edited by adz; 07-09-2004 at 08:33 AM.
 
Old 07-08-2004, 06:08 PM   #8
Lord Zoltar
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 30
well, here's the latest on what's happening:

I can get *some* sound... When I play audio CDs, I can hear it fine. Now my problem is with audio files such as MP3s, WAVs, etc... I can run XMMS, Noatun, Kaboodle, anything, and I can't hear the MP3's. Noatun looks like it's working: the visualizer starts visualizing the song, etc... XMMS does nothing. it locks up for about 10 seconds when I try to play the MP3 track, then it goes back to doing nothing.
So this is probably not a hardware problem anymore, probably an ALSA or KDE configuration problem... but if anyone wants to answer in this forum i'd really appreciate it...

PS.. I hear your pain, adz. I *still* can't get my 56k modem working nicely under linux. but now I have broadband
 
Old 07-08-2004, 07:56 PM   #9
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Oh it's an ADSL modem. It just fried itself.

Try checking the output plugin under XMMS. You seem to be running KDE (and hence the aRTs sound server) so the output plugin would have to be set to aRTs. Also, did you try alsamixer?
 
Old 07-08-2004, 10:51 PM   #10
Lord Zoltar
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 30
The options for Output Plugin for XMMS are ALSA, OSS Driver, Disk Writer, and eSound. There's no aRTs.
Also, in Control Centre > Sound & Multimedia > Sound Centre > Hardware, there's no option for aRTs (should there be?). My choices are Autodetect, ALSA, Open Sound System, Threaded Open Sound System, Enlightenment Sound Daemon, and None.

I ran alsamixer, everything (all the volume levels) look fine.
 
Old 07-08-2004, 11:58 PM   #11
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Are you running KDE? If so you'll need most of you apps to use aRTs. There may be an rpm that you have to install that gives you the XMMS aRTs output plugin. The original error message you posted:
Quote:
Sound server informational message:
Error while initializing the sound driver:
device: default can't be opened for playback (Permission denied)
The sound server will continue, using the null output device.
was for a sound server which I presume to be aRTs. You have to make sure this message does not appear otherwise you'll have no sound through aRTs.

Another thing you can do is to check whether aRTs is running. To do this do a ps -A |grep arts. If you get a line saying "artsd" then it's running. You can then kill it and use either the OSS or ALSA output plugins to see if they work.
 
Old 07-09-2004, 08:09 AM   #12
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Quote:
Originally posted by Lord Zoltar
I can run XMMS, Noatun, Kaboodle, anything, and I can't hear the MP3's. Noatun looks like it's working: the visualizer starts visualizing the song, etc
This is consistent with your first error message:
Quote:
The sound server will continue, using the null output device.
.

So, aRTs is in fact running, but is directing the output (the sound) to a "null output device", which means you can't hear it (as your sound card and speakers are real devices, not null devices).

Noatun, Kaboodle and JuK are using aRts automatically, because they are integrated with KDE. XMMS is using the wrong output plugin (and your sound card may not be properly set up), so it gets confused before giving up (and probably also outputting to null, since if it really can't play anything, it either crashes outright, or gives you a message along the lines of "I can't play; check your output plugins, or see if your sound card is borked and make sure no other program is blocking sound output").

The fact that audio CDs play is not all that helpful insofar as audio CDs use raw device access and don't go through the same channels as sound files on your HDD, but it does at least indicate that the sound card and speakers themselves are not broken (and that the CD channel at least is not muted).

The first thing I would suggest is that you go to the KDE Control Center=>Sound and Multimedia and set your aRTs output plugin from the default (Auto-Detect), which does not seem to work, to ALSA --if you have actively installed ALSA, since this is Slack 9.1, which still used the 2.4 series kernel and thus does not have ALSA integrated-- or to OSS, if you have not installed ALSA (which I suspect-- or at least that you have not installed it fully).

Also make sure that "Enable sound server on startup" is checked (which it should be by default, and most probably is, since the sound server is attempting to start at KDE startup).

Then log out and back in and hopefully the initial error will be gone. However, you may get another error telling you that one or more of the specific mixer devices cannot be opened (most commonly /dev/dsp). In that case, I usually take the easy way out and hack /dev/dsp 's permissions in a root terminal or file manager (but the "recommended" way to solve this is to add your user to the group which is allowed to use /dev/dsp, commonly the "audio" group. But distros are different from each other, and I usually don't feel like hacking around to find out what group the particular distro I may be using calls the audio group. Or I am in the audio group, but it's still giving me that error). But this assumes that you have already correctly installed and configured ALSA, which may not be true in this instance.

Even this may not work, and you still may not have sound in audio apps. If, at any point in this process, you have sound in Noatun and Kaboodle, then just do as adz said and get the aRTs plugin for XMMS, or if that's not available, recompile XMMS from source (this is Slackware, after all; you can compile anything and everything) and follow whatever instructions may be in the README or INSTALL files to enable KDE support. Or just use Noatun and Kaboodle as KDE intends, because you're done.

If you still don't have sound, it's on to the last two possible issues: the Muted Mixers, or Incomplete Install of ALSA.

The mixers first.

ALSA mutes all mixers by default. Don't ask why; we don't know. New users don't realize this, and think that their sound card is not working, when in fact the problem is that the volume is essentially at "0". So, let's check that out.

Open a terminal and type alsamixer. If you don't have it, we know then that the problem is in fact an Incomplete Install of ALSA; skip then to the next part and come back here when ALSA is installed. In the "non-gui" alsamixer, use the left and right arrow keys to move through the various mixer channels, use the "M" key to unmute them, and use the up and down arrow keys to raise the volume. Don't raise the volume over 90% or so, otherwise you'll probably get distorted sound. In the pretty gui alsamixer, you can mouse around and click little LED icons to do the same thing. The gui alsamixer (which I still don't know how sometimes I get that, but usually don't) may have a specific "Save" menu option, or it may not. Don't remember, sorry.

After you have unmuted the alsamixer, you should also run KMix (the KDE mixer program), to raise the volume levels in aRTs itself (or something-- the Desktop Environment mixers are related to the ALSA mixers, but changing one of them does not necessarily change the other, for some reason).

If this was your problem, you will have sound from all correctly configured apps (see above for correct configuration of apps), and you're done-- but only for this session. Saving and restoring the mixer settings must be done at shutdown and bootup; this is usually handled by an initialization script which automates this process. Check the Slackware Essentials Book if you don't know where this script is or how to add it to your default runlevel.

If you don't have alsamixer, or received some error that indicates that the sound card was not found, you most likely have an Incomplete Install of ALSA. A complete ALSA installation consists of several packages: alsa-driver (which you do have, as the driver modules are in fact loaded), alsa-libs, alsa-oss (for OSS emulation, optional but highly recommended), alsa-utils (which contains alsaconf to configure the soundcard, alsactl to store and restore mixer levels, and alsamixer to set the mixer levels in the first place), alsa-tools, and alsa-firmware. At the very least, you must install alsa-driver, alsa-libs, and alsa-utils... and in that order (as they depend on each other in that order). You definitely have alsa-driver installed (if you have upgraded to a 2.6 series kernel, alsa-driver is integrated with the kernel itself), but you may need to install alsa-libs and alsa-utils (which are not included with the 2.6 series kernels, but are still necessary), after which you could run alsaconf to configure your sound card, and/or follow the instructions on the ALSA Details page for your specific sound card (which I know what it is, because I have VIA8233 onboard sound as well, and you've loaded the same driver as I use), or refer to the Slackware FAQ.

I think that pretty much covers it... one way or another, sound should be working after all this. Hope it helps, and good luck.

Last edited by motub; 07-09-2004 at 08:11 AM.
 
Old 07-12-2004, 09:54 AM   #13
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
I recently had a problem like this when I first tried upgrading my kernel to 2.6. I tried everything I could think of and surfed the net for days. Eventually through deduction and trial and error I found my problem. In KMix there is an advanced settings tab with a whole bunch of devices listed. I found that if I disabled the IEC958 Raw Data device, the sound came back. Reading other people's threads seemed to show that the actual device might vary, but that disabling one of them usually solved the problem. I'm not sure if this is the problem you're having, but you should try disabling different devices and see if one of them works for you.
 
Old 07-12-2004, 11:32 AM   #14
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Good point, David the H.-- I have had that problem as well, but never globally. Only certain programs would not produce sound when a particular "extra" device mixer-- in my case, the External Amplifier-- was not disabled. So I wouldn't have thought of that for a total "no sound" condition.

Good thing you're around .
 
Old 07-14-2004, 10:53 PM   #15
Lord Zoltar
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 200

Original Poster
Rep: Reputation: 30
thanks motub. very detailed and clear.
an update:
I tried what you suggested. making sure i had KDE using ALSA, hacking the privileges on /dev/dsp/, checking my mixers, and finally, doing a complete (re)install of alsa libs,util,tools,driver (using the instructions on the page you referenced), and then ran alsaconf. now using alsa 1.0.5, previously, I had 0.98 installed.
So now I have sound, sort of. I can still play audio CDs, as well as sound in some games (scorched3d) and online flash movies (such as http://www.homestarrunner.com). But MP3s still give me problems. They won't play in XMMS, or Noatun or Kaboodle still...
I also still get the

"Sound server informational message:
Error while initializing the sound driver:
device: default can't be opened for playback (Permission denied)
The sound server will continue, using the null output device."

and kmix still outputs:
"kmix: ERROR: Alsa mixer cannot be found.
Please check that the soundcard is installed and the
soundcard driver is loaded.
kmix:
kmix: ERROR: Alsa mixer cannot be found.
Please check that the soundcard is installed and the
soundcard driver is loaded.
kmix:"

error on login. So it looks like some stuff, which doesn't depend on KDE has sound. but KDE programs still seem rather messed up.


[update]
I just set KDE to use Open Sound System as the audio device (instead of ALSA), just to see what would happen and... EVERYTHING WORKS!!!!
alsa still looks broken, but all of a sudden sound works (yes, I had tried Open Sound System before, but it had no effect then)
that was weird...but at least all is well... sort of. I have sound. whatever.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ALSA works with Slack but KDE doesn't initialize sound vharishankar Slackware 2 06-04-2005 11:22 AM
no sound quake 3 - slack 10(using alsa) spd_vhi Linux - Games 0 10-18-2004 12:54 AM
SLACK 10.0, ALSA and VIA8233a...no sound marekjs Slackware 6 10-04-2004 11:17 AM
SLACK 10.0, ALSA and VIA8233a...no sound marekjs Linux - Hardware 0 08-07-2004 04:09 PM
Alsa Sound problems under KDE 3.2 (SuSe 8.2) Juan_lutz Linux - Software 6 05-16-2004 08:35 PM


All times are GMT -5. The time now is 03:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration