LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 10-14-2009, 10:25 PM   #1
brian flachs
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Rep: Reputation: 0
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
 
Old 10-14-2009, 11:26 PM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
Originally Posted by brian flachs View Post
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?
Nothing in xorg should affect audio at all. I'd rather try running the applications in X from a terminal and seeing exactly what's what doesn't work, if are there error messages, if alsamixer volumes are ok, etc. etc. etc.

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:
another question might be: what is gnome doing to reenable audio and how can i mimick this without running the gnome desktop?
Your audio is based on alsa, when you enter gnome you are probably using pulseaudio on-top of alsa, but your audio works with alsa alone at the command line, so alsa is not the problem (and if it was pulseaudio wouldn't work either).

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.
 
Old 11-05-2009, 07:49 PM   #3
brian flachs
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
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
 
Old 11-05-2009, 07:55 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
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?
 
Old 11-05-2009, 08:32 PM   #5
brian flachs
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 11-05-2009, 08:43 PM   #6
brian flachs
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
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
 
Old 11-05-2009, 08:47 PM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
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
Each program is different. Most should detect pulse if it's installed and use it though. But you can force them in any case to see if there's any problem, if they work ok, etc.

ps. it seems our posts crossed

Last edited by i92guboj; 11-05-2009 at 08:48 PM.
 
Old 11-05-2009, 09:20 PM   #8
brian flachs
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
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...
 
Old 11-05-2009, 09:22 PM   #9
brian flachs
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
i didnt mean to imply that mouse action is related to noises. just that clicking noises can be heard when x starts/quits
 
Old 11-05-2009, 09:44 PM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
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.
 
Old 11-05-2009, 10:09 PM   #11
brian flachs
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 11-05-2009, 10:23 PM   #12
brian flachs
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
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...
 
Old 11-05-2009, 10:24 PM   #13
brian flachs
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
maybe i need to reboot between experiments...
 
Old 11-05-2009, 10:26 PM   #14
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
Originally Posted by brian flachs View Post
is gentoo better? is a pain to get sendmail/mailx/dhcpd/httpd etc setup, but i am pretty stuck.
That's the question of the million dollar.

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?

Last edited by i92guboj; 11-05-2009 at 10:30 PM.
 
Old 09-21-2010, 11:50 AM   #15
saurabh4lq
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Rep: Reputation: 0
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
Audio works fine now.
Thanks guys.
Though mine is a late reply but still I am posting it hoping it may
help someone in need.

Enjoy Coding
Saurabh
 
  


Reply

Tags
audio, gnome, sound, xorg


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
webcam and audio is not working on Gyachi, help me fix this problem stingphil Linux - Newbie 0 06-04-2008 11:30 PM
Printing with Gnome Apps not working dabang Debian 3 07-18-2007 07:29 PM
gnome apps --help not working pk108 Linux - General 1 01-15-2006 02:45 PM
KDE GNOME Apps Not Working Poneyboy Linux - Software 1 11-22-2005 08:31 PM
Anybody ever had problems with anti-aliasing working under gnome but not KDE apps? scobiej Linux - General 0 11-26-2003 03:19 AM


All times are GMT -5. The time now is 09:10 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