Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My sound does not work in the X11 session. When I try to use alsamixer, it prints
Code:
cannot open mixer: No such file or directory
and when I try to play an audio file, I get
Code:
[oss.c:182] error: Can't open default sound device!
[audio.c:625] error: failed to open audio device
[audio.c:180] error: Unable to find a working output module in this list: alsa,oss
[audio.c:527] error: Failed to open audio output module
[mpg123.c:847] error: Failed to initialize output, goodbye.
However, if I switch to a virtual terminal all of this works. Also, if I attach to a tmux session that was started in one of the virtual terminals sound works, and even video will work if I set the DISPLAY variable to :0.0. This problem only occurs if I use a display manager, if I just start x11 with xinit, sound works.
aundy,
Did you run /usr/sbin/alsaconf as root, and check /etc/modprobe.d/sound.conf
? KDE will sometime pick the wrong default device, so you need to check that. What desktop are you using? The ones provided in a standard Slackware installation (KDE, Xfce, blackbox, fluxbox, etc) have always worked for me. If you rolled your own X11 session, you may have forgotten something in the configuration. Did you do a partial or a full Slackware installation? Did you set /etc/rc.d/rc.alsa as executable?
I have never run alsaconf, and there is no file called /etc/modprobe.d/sound.conf.
Maybe the display manager is picking the wrong default sound device, how would I check this? I did a full slackware installation, but I have done some modifications to the system, so maybe a reinstall would fix this problem.
Also sound doesn't work if I use xdm or kdm, but I if start a kde session or an xfce session manually using xinit (as a non-root user) then sound will work. So I guess it has something to do with the display manager.
EDIT: I tried running alsaconf as root, and that didn't fix it, but I noticed that if I run alsamixer as root the problem goes away.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.