Why does xorg prevent audio apps from working and how does gnome fix it
i have upgraded from f9 to f11 and now am having difficulties with audio. i prefer to run vtwm w/o
gnome or kde. if i exit xorg, from the console i can run mplayer/flac123 and get audio. If i startx w/o gnome sound does not work. if i switch back to a virtual console sound starts working again. if i startx w/ the default gnome setup audio works. so the question i have is what is new about the x-server that affects audio? and what can i put into xorg.conf to return it to previous behavior? another question might be: what is gnome doing to reenable audio and how can i mimick this without running the gnome desktop? a few possibly relevant details... X.Org version: 1.6.3.901 : nvidia driver Advanced Linux Sound Architecture Driver Version 1.0.20. f9 had X.Org version 1.4.99.901 also with nvidia driver thanks for your help, brian |
Quote:
If you have previous configurations for vtwm or whatever you are using, check the configs and see if you are launching some audio daemon or something strange from there, like jackd. Also, if you use startx, check ~/.xinitrc and see what's in there. Quote:
Unless there's some highly odd conflict in there, your problem must be somewhere in the init files of your wm or in your ~/.xinitrc. |
ok i have tried a few more things.
ok, i still think something i dont understand is up.
i start running flac123 from the command line from a virtual console. plays fine. i changed .xinitrc to the following: #!/bin/sh LITTLECOM=1 export LITTLECOM xterm -ls -n littlecom -sb -C -geometry 88x8-78-0 while playing some music. as soon as the xserver starts, sound stops. after exiting music begins again where it left off. notice i am running just xserver and an xterm, no window manager no desktop. switching back to the virtual console resumes playback. if i let the console flac123 finish. and try to run a player from xterm it hangs asthough it is waiting for the audio device. i assume it is busy, but why? i have also tried runnning /usr/bin/Xorg now no xclients at all -- stops the audio switch to virtual console 1 -- audio begins again from where it stopped. i can start an xterm from a virtual console and attempt to run flac123 and it hangs. i think the xserver is doing something. again this is with the nvidia proprietary drivers. i will try again with nv thanks in advance for any ideas. brian |
Then there must be some very rare conflict with your drivers going on. Let us know if this still happens with nv or vesa.
I assume you are using some kind of onboard audio chip, don't you? If so, do you have any spare pci audio card to test? |
tried simple xorg.confs
tried without an xorg.conf (also turned my amp up a bit)
i got Nouveau as the default driver. heard clicking noise on amp. assuming this happens when something alters sound state. flac123 hangs i hear more clicking when xserver exits. gened up a new xorg.conf with system-config-display, it turns out to request nv. clicking and no luck with music. edited this to request nonexistant driver. still clicks. of course cant try flac123 as xserver really doesnt get going. clicks on the way out too. vesa failed to get a intelligible display up, but clicking can be heard. ------------------------------ audio: yes my motherboard has audio built in. it is a realtek 889a and an intel e45 chipset alsa 1.0.20 i dont have a spare audio card. but i am real puzzled because in the good-ol days the Xserver had nothing at all to do with audio. |
also it still bothers me that starting gnome gets it going again
something gnome is doing is making audio workable again. i assumed it was starting the pulse-audio stuff, so i tried to do that manually and havent had success.
brian |
Ugh, there must be something really wrong about either your sound driver or your hardware. The fact that you hear noises when clicking suggests that something is not ok.
X has nothing to do with the sound (at least still, thanks dog), and you are not using an WM that could be interfering. I assume that X is not starting a sound daemon via xinitrc or something, you seem to be aware of what you are doing as per your posts above, so I assume all these trivial things are ok. Back to your first post, what gnome does is to launch pulseaudio, I guess. Gnome programs might also be running using the gstreamer media layer. You can try to force the pulse backend in command line as long as your player supports it. You will have to check the documentation for each program to know how to force the pulseaudio backend. You can try mplayer as a test, it would be something like Code:
mplayer -ao pulseaudio filename.mp3 ps. it seems our posts crossed :) |
ok,
i am trying a different player (/usr/bin/play) at console it works fine. but under x (again w/o WM) ALSA lib confmisc.c:768: (parse_card) cannot find card '0' ALSA lib conf.c:4154: (_snd_config_evaluate) function snd_func_card_driver returned error: Permission denied ALSA lib confmisc.c:392: (snd_func_concat) error evaluating strings ALSA lib conf.c:4154: (_snd_config_evaluate) function snd_func_concat returned error: Permission denied ALSA lib confmisc.c:1251: (snd_func_refer) error evaluating name ALSA lib conf.c:4154: (_snd_config_evaluate) function snd_func_refer returned error: Permission denied ALSA lib conf.c:4633: (snd_config_expand) Evaluate error: Permission denied ALSA lib pcm.c:2211: (snd_pcm_open_noupdate) Unknown PCM default /usr/bin/play formats: can't open output file `default': cannot open audio deviceok. btw, i am going here because i notice both mplayer & flac123 are starting pulse audio and dbus. must be part of lib-pulse... |
i didnt mean to imply that mouse action is related to noises. just that clicking noises can be heard when x starts/quits
|
What a thing.
Can you check a couple of things? See if /etc/asoundrc exists, if so, move it elsewhere, or rename it. Then look for a file called .asoundrc in your home (with a dot in front of the name, ~/.asoundrc). If it exists, move it elsewhere. I suspect it must be some really silly thing that fedora does with pulseaudio. Remember to move it/them back if that changes nothing. Can you also check if pulse is running before and after launching X with top, htop or a similar tool? If it's not running before but it's running after, then try killing it and check if that re-enables your sound. |
etc has asound.conf.pulse and asound.state
i dont have a ~/.asoundrc or .asoundconf lots of things seem to start /bin/dbus-daemon and /usr/bin/pulseaudio if they arenot already running. but not the xserver. i imagine that firefox has pluggins that want sound and inits libpulse which starts them up. killing them does not re-enable sound. is gentoo better? is a pain to get sendmail/mailx/dhcpd/httpd etc setup, but i am pretty stuck. |
ok, i have missed something.
i copied the /etc/X11/xinitrc to ~/.xinitrc and moved my WM startup into ~/.Xclients and audio seems to be working. more investigation tomorrow... |
maybe i need to reboot between experiments...
|
Quote:
It certainly is not for the lazy, and it takes a bit of a learning curve at the beginning. Besides that, it's just like everything else in life, it has its lovers and detractors. The support is superb, that alone makes it great for me. In other distros you have very poor support, that includes some paid ones. The problem with binary distros like fedora of ubuntu is that they are a complete mess. They are cool when they work out of the box for you, but if you have to get your hands dirty then you don't know where the problem are coming from, which is the case now. I haven't ever seen your problem. It's weird to say the least, however on a quick google I see that you are not the only one having that problem in Fedora. https://bugzilla.redhat.com/show_bug.cgi?id=501255 Just a random thought: did you try adding your user to the audio group and then re-login into? Does the sound work as root? |
success
I was facing the same problem.
In default gnome setup sound was working fine. But as soon I swithced to openbox,and started doing startx manually. mpg321 played the audio but no sound came out of speakers. I did following Code:
$alsactl restore Thanks guys. Though mine is a late reply but still I am posting it hoping it may help someone in need. Enjoy Coding Saurabh |
All times are GMT -5. The time now is 08:13 PM. |