Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sound works in console but not X
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
nihtekra
n00b
n00b


Joined: 16 May 2010
Posts: 3

PostPosted: Sun May 16, 2010 10:35 pm    Post subject: Sound works in console but not X Reply with quote

I currently have a problem where alsa and pulseaudio both seem to be working, and I can get sound from the console (both tty1 and tty2), but I can't get sound when X is displaying (running XFCE4 or just xterm). I've check alsamixer settings, and everything is turned up and unmuted. If I go to a console run
Code:
mplayer song.mp3
I hear the song start playing. Running with '-v' both in the console and in xterm give the exact same output (listed below).

I can start the music playing in tty1, switch to tty2, and still hear the music. If I start the music in tty1 and switch to the graphical display, the music stops (keeps playing but can't hear it), and when I switch back to tty1, the sound comes back. I can repeat the same experiment starting the music with ssh. I can hear the music when on tty1 but not when looking at the gui. Using
Code:
mplayer -ao pulse song.mp3
gives the exact same results. I have the same problem with pulse not running.

I found a similar forum post, but it didn't get anywhere. Probably something really stupid, but I can't figure it out. Any ideas?

Code:

nihtekra@kronos ~ $ mplayer -v Tom\ Petty\ -\ Free\ Falling.mp3
MPlayer SVN-r29796-4.4.3 (C) 2000-2009 MPlayer Team
CPU vendor name: GenuineIntel  max cpuid level: 11
CPU: Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz (Family: 6, Model: 30, Stepping: 5)
extended cpuid-level: 8
extended cache-info: 16801856
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSSE3 CMOV
get_path('codecs.conf') -> '/home/nihtekra/.mplayer/codecs.conf'
Reading /home/nihtekra/.mplayer/codecs.conf: Can't open '/home/nihtekra/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --cc=x86_64-pc-linux-gnu-gcc --host-cc=x86_64-pc-linux-gnu-gcc --prefix=/usr --confdir=/etc/mplayer --datadir=/usr/share/mplayer --libdir=/usr/lib64 --enable-network --disable-arts --enable-bl --disable-ftp --disable-joystick --disable-cdparanoia --charset=UTF-8 --disable-tv-bsdbt848 --disable-ivtv --disable-dvb --disable-dvbhead --disable-pvr --disable-tv-teletext --disable-radio-v4l2 --disable-radio-bsdbt848 --disable-liba52 --disable-musepack --disable-libopencore_amrnb --disable-libopencore_amrwb --xanimcodecsdir=/usr/lib/xanim/mods --disable-libbs2b --disable-pnm --realcodecsdir=/usr/lib64/codecs --disable-md5sum --disable-aa --disable-fbdev --disable-caca --disable-zr --disable-gui --disable-dxr3 --enable-menu --disable-vidix --disable-vidix-pcidb --enable-xvmc --with-xvmclib=XvMCW --disable-3dfx --disable-tdfxvid --disable-tdfxfb --disable-esd --disable-ladspa --disable-nas --disable-ossaudio
CommandLine: '-v' 'Tom Petty - Free Falling.mp3'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/nihtekra/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/nihtekra/.mplayer/input.conf'
Can't open input config file /home/nihtekra/.mplayer/input.conf: No such file or directory
Parsing input config file /etc/mplayer/input.conf
Input config file /etc/mplayer/input.conf parsed: 90 binds
Setting up LIRC support...
get_path('Tom Petty - Free Falling.mp3.conf') -> '/home/nihtekra/.mplayer/Tom Petty - Free Falling.mp3.conf'

Playing Tom Petty - Free Falling.mp3.
get_path('sub/') -> '/home/nihtekra/.mplayer/sub/'
[file] File size is 2996224 bytes
STREAM: [file] Tom Petty - Free Falling.mp3
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
LAVF_check: MPEG audio layer 2/3
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename Tom Petty - Free Falling.mp3 ext: .mp3
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: seeking from 0x2DB800 to start pos 0x866
demux_audio: audio data 0x866 - 0x2DB780
Audio only file format detected.
Clip info:
 Title: Free Falling
 Artist: Tom Petty
 Album:
 Year:
 Comment:
 Genre: Unknown
get_path('sub/') -> '/home/nihtekra/.mplayer/sub/'
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using SSE optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 96 kbit Joint-Stereo, BPF: 313
Channels: 2, copyright: No, original: Yes, CRC: Yes, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Trying every known audio driver...
alsa-init: requested format: 44100 Hz, 2 channels, 9
alsa-init: using ALSA 1.0.21a
alsa-init: setup for 1/2 channel(s)
alsa-init: using device default
alsa-init: pcm opened in blocking mode
alsa-init: got buffersize=32768
alsa-init: got period size 1024
alsa: 48000 Hz/2 channels/4 bpf/32768 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy@streamminister.de>
AO: Comment: under developement
Building audio filter chain for 44100Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[libaf] Adding filter lavcresample
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module lavcresample, old len = 0, new len = 34974
Increasing filtered audio buffer size from 0 to 34932
Uninit audio filters...0 (04:09.0)  1.0%
[libaf] Removing filter lavcresample
[libaf] Removing filter dummy
Uninit audio: mp3lib
alsa-uninit: pcm closed
vo: x11 uninit called but X11 not initialized..

Exiting... (Quit)
nihtekra@kronos ~ $ mplayer -v -ao pulse Tom\ Petty\ -\ Free\ Falling.mp3
MPlayer SVN-r29796-4.4.3 (C) 2000-2009 MPlayer Team
CPU vendor name: GenuineIntel  max cpuid level: 11
CPU: Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz (Family: 6, Model: 30, Stepping: 5)
extended cpuid-level: 8
extended cache-info: 16801856
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSSE3 CMOV
get_path('codecs.conf') -> '/home/nihtekra/.mplayer/codecs.conf'
Reading /home/nihtekra/.mplayer/codecs.conf: Can't open '/home/nihtekra/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --cc=x86_64-pc-linux-gnu-gcc --host-cc=x86_64-pc-linux-gnu-gcc --prefix=/usr --confdir=/etc/mplayer --datadir=/usr/share/mplayer --libdir=/usr/lib64 --enable-network --disable-arts --enable-bl --disable-ftp --disable-joystick --disable-cdparanoia --charset=UTF-8 --disable-tv-bsdbt848 --disable-ivtv --disable-dvb --disable-dvbhead --disable-pvr --disable-tv-teletext --disable-radio-v4l2 --disable-radio-bsdbt848 --disable-liba52 --disable-musepack --disable-libopencore_amrnb --disable-libopencore_amrwb --xanimcodecsdir=/usr/lib/xanim/mods --disable-libbs2b --disable-pnm --realcodecsdir=/usr/lib64/codecs --disable-md5sum --disable-aa --disable-fbdev --disable-caca --disable-zr --disable-gui --disable-dxr3 --enable-menu --disable-vidix --disable-vidix-pcidb --enable-xvmc --with-xvmclib=XvMCW --disable-3dfx --disable-tdfxvid --disable-tdfxfb --disable-esd --disable-ladspa --disable-nas --disable-ossaudio
CommandLine: '-v' '-ao' 'pulse' 'Tom Petty - Free Falling.mp3'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/nihtekra/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/nihtekra/.mplayer/input.conf'
Can't open input config file /home/nihtekra/.mplayer/input.conf: No such file or directory
Parsing input config file /etc/mplayer/input.conf
Input config file /etc/mplayer/input.conf parsed: 90 binds
Setting up LIRC support...
get_path('Tom Petty - Free Falling.mp3.conf') -> '/home/nihtekra/.mplayer/Tom Petty - Free Falling.mp3.conf'

Playing Tom Petty - Free Falling.mp3.
get_path('sub/') -> '/home/nihtekra/.mplayer/sub/'
[file] File size is 2996224 bytes
STREAM: [file] Tom Petty - Free Falling.mp3
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
LAVF_check: MPEG audio layer 2/3
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename Tom Petty - Free Falling.mp3 ext: .mp3
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: seeking from 0x2DB800 to start pos 0x866
demux_audio: audio data 0x866 - 0x2DB780
Audio only file format detected.
Clip info:
 Title: Free Falling
 Artist: Tom Petty
 Album:
 Year:
 Comment:
 Genre: Unknown
get_path('sub/') -> '/home/nihtekra/.mplayer/sub/'
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using SSE optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 96 kbit Joint-Stereo, BPF: 313
Channels: 2, copyright: No, original: Yes, CRC: Yes, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Trying preferred audio driver 'pulse', options '[none]'
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: PulseAudio audio output
AO: Author: Lennart Poettering
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Video: no video
Freeing 0 unused video chunks.
Starting playback...
Increasing filtered audio buffer size from 0 to 46144
Uninit audio filters...0 (04:09.0)  0.4%
[libaf] Removing filter dummy
Uninit audio: mp3lib
vo: x11 uninit called but X11 not initialized..

Exiting... (Quit)


Code:

nihtekra@kronos ~ $ uname -a
Linux kronos 2.6.32-gentoo-r7 #2 SMP PREEMPT Sat May 15 03:39:32 CDT 2010 x86_64 Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz GenuineIntel GNU/Linux
nihtekra@kronos ~ $ lsmod
Module                  Size  Used by
snd_hda_codec_realtek   258227  1
snd_hda_intel          21519  0
snd_hda_codec          64595  2 snd_hda_codec_realtek,snd_hda_intel
nvidia              10821567  0
snd_hwdep               5832  1 snd_hda_codec
nihtekra@kronos ~ $ emerge xorg-server
superuser access is required... adding --pretend to options


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] x11-base/xorg-server-1.7.6  USE="hal ipv6 nptl sdl xorg -debug -dmx -kdrive -minimal -tslib" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4150

PostPosted: Mon May 17, 2010 1:03 am    Post subject: Reply with quote

groups youruserinxcfe and check your in audio.
Back to top
View user's profile Send private message
nihtekra
n00b
n00b


Joined: 16 May 2010
Posts: 3

PostPosted: Mon May 17, 2010 1:27 am    Post subject: Reply with quote

I log in to XFCE, open an xterm, enter 'groups' and the list contains 'audio'. Were you asking about something else?

Code:
nihtekra@kronos ~ $ groups
wheel audio cdrom video cdrw usb users portage nihtekra plugdev
Back to top
View user's profile Send private message
nihtekra
n00b
n00b


Joined: 16 May 2010
Posts: 3

PostPosted: Sat May 22, 2010 7:05 am    Post subject: Reply with quote

Another interesting note. I can start playing music from an xterm, won't hear anything, but hear the music when I switch to a console. Anybody have any clue why X would be blocking sound output?
Back to top
View user's profile Send private message
jwright
n00b
n00b


Joined: 04 Oct 2012
Posts: 1

PostPosted: Thu Oct 04, 2012 4:00 am    Post subject: Did this get solved? Reply with quote

I'm seeing this same behavior.
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Sat Oct 06, 2012 4:38 pm    Post subject: Reply with quote

But your ethernet nic still works in an X session?
(Meaning it is not an xorg system-wide pci bus lock.)
_________________
TIA
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Oct 07, 2012 9:29 pm    Post subject: Reply with quote

Maybe an entry in /etc/security/console.perms.d/, IIRC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum