Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Hi guys, I have a problem with audio output on a Dell Optiplex workstation which has an Intel soundcard "Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)".
I'm using Fedora 24 Mate and if I try to listen some audio files or streming content (for example Youtube) all seems to work perfectly.
The problem is that I need to play audio files (a simple wav or mp3 file) on console because I need to use this workstation as audio alert for other services (Nagios).
I tried aplay, sox (play) and mplayer, but none of them seems to work, the problem seems related to /dev/dsp missing device or some permission problem.
First things first, the devices seems ok (they works on gui, for example with xmms):
Code:
[root@drakaris ~]# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD1983 Analog [AD1983 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
[root@drakaris ~]# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default
Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=Intel
HDA Intel, AD1983 Analog
Default Audio Device
front:CARD=Intel,DEV=0
HDA Intel, AD1983 Analog
Front speakers
surround21:CARD=Intel,DEV=0
HDA Intel, AD1983 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Intel,DEV=0
HDA Intel, AD1983 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, AD1983 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, AD1983 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, AD1983 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, AD1983 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
When I try to use aplay, play (sox) or mplayer this is the result:
Code:
[root@drakaris ~]# mplayer test.wav
MPlayer 1.3.0-6.1.1 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing test.wav.
libavformat version 57.25.100 (external)
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
X11 connection rejected because of wrong authentication.
xcb_connection_has_error() returned true
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
X11 connection rejected because of wrong authentication.
xcb_connection_has_error() returned true
[AO_ALSA] alsa-lib: pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
[AO_ALSA] Playback open error: Connection refused
Failed to initialize audio driver 'alsa'
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
X11 connection rejected because of wrong authentication.
xcb_connection_has_error() returned true
[AO_ALSA] alsa-lib: pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
[AO_ALSA] Playback open error: Connection refused
X11 connection rejected because of wrong authentication.
xcb_connection_has_error() returned true
AO: [pulse] Init failed: Connection refused
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
X11 connection rejected because of wrong authentication.
xcb_connection_has_error() returned true
X11 connection rejected because of wrong authentication.
xcb_connection_has_error() returned true
[AO_ALSA] alsa-lib: pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
[AO SDL] Unable to open audio: No available audio device
DVB card number must be between 1 and 4
AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 2.0 (01.9) of 2.0 (02.0) 0.3%
Audio output truncated at end.
A: 2.0 (01.9) of 2.0 (02.0) 0.3%
Exiting... (End of file)
[root@drakaris ~]#
[root@drakaris ~]# aplay test.wav
X11 connection rejected because of wrong authentication.
xcb_connection_has_error() ha restituito VERO
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connessione rifiutata
aplay: main:786: audio open error: Connection refused
[root@drakaris ~]#
[root@drakaris ~]# play test.wav
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Floating point exception (core dump creato)
I already tried to use a different user inside the audio group and also to add the root user to audio group but nothing changed, I tried almost everything but I have no experience with linux audio stuff, is there someone who can give me some hints?
Hi guys, I have a problem with audio output on a Dell Optiplex workstation which has an Intel soundcard "Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)". I'm using Fedora 24 Mate and if I try to listen some audio files or streming content (for example Youtube) all seems to work perfectly. The problem is that I need to play audio files (a simple wav or mp3 file) on console because I need to use this workstation as audio alert for other services (Nagios). I tried aplay, sox (play) and mplayer, but none of them seems to work, the problem seems related to /dev/dsp missing device or some permission problem.
When I try to use aplay, play (sox) or mplayer this is the result:
Code:
[root@drakaris ~]# mplayer test.wav
I already tried to use a different user inside the audio group and also to add the root user to audio group but nothing changed, I tried almost everything but I have no experience with linux audio stuff, is there someone who can give me some hints?
Biggest 'hint' would be to NEVER, EVER log in through the GUI as root, and stop running as root. The root account should only really be used for troubleshooting and/or repairing things, and doing maintenance. There is ABSOLUTELY NO REASON to log in as root on a daily basis.
Since you've established that your audio hardware is working, you've ruled out 90%+ of your potential problems. Typically, you need codecs installed for various media types...did you install them? This is for F23, but should work for F24: https://ask.fedoraproject.org/en/que...sten-to-music/
But you really, REALLY need to just create a 'standard' user, and don't log in to the console as root.
Thanks for reply guys, I know logging with root It's not right thing to do, you are absolutely right.
In this scenario I used it to speed up the problem solving avoiding any possible permission problem, but it seems that this was part of the problem itself.
I tried to create a new user with initial group audio (useradd -g audio user) and now it seems to work, with play, aplay and mplayer, It also works adding the user to audio group as secondary group (usemod -G audio user).
The strange thing is that with root it doesn't work at all by console, it works perfectly if I use the GUI (for example xmms also exporting display on another workstation), that's strange.
And you know another strange thing? I alredy tried to play that file with a regular user (inside the audio group)
Code:
[drako@drakaris ~]$ grep audio /etc/group
audio:x:63:root,drako
[drako@drakaris ~]$
[drako@drakaris ~]$
[drako@drakaris ~]$ mplayer /tmp/test.wav
MPlayer 1.3.0-6.1.1 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing /tmp/test.wav.
libavformat version 57.25.100 (external)
Audio only file format detected.
Load subtitles in /tmp/
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 1.8 (01.7) of 2.0 (02.0) 0.0%
Exiting... (End of file)
[drako@drakaris ~]$
[drako@drakaris ~]$
[drako@drakaris ~]$ aplay /tmp/test.wav
Playing WAVE '/tmp/test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[drako@drakaris ~]$
[drako@drakaris ~]$
[drako@drakaris ~]$ play /tmp/test.wav
/tmp/test.wav:
File Size: 355k Bit Rate: 1.41M
Encoding: Signed PCM
Channels: 2 @ 16-bit
Samplerate: 44100Hz
Replaygain: off
Duration: 00:00:02.01
In:100% 00:00:02.01 [00:00:00.00] Out:88.7k [ | ] Hd:0.4 Clip:0
Done.
[drako@drakaris ~]$
[drako@drakaris ~]$
[drako@drakaris ~]$ logout
[root@drakaris ~]# su - drako -c "aplay /tmp/test.wav"
Playing WAVE '/tmp/test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[root@drakaris ~]#
[root@drakaris ~]# aplay /tmp/test.wav
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connessione rifiutata
aplay: main:786: audio open error: Connection refused
Thanks for reply guys, I know logging with root It's not right thing to do, you are absolutely right.
In this scenario I used it to speed up the problem solving avoiding any possible permission problem, but it seems that this was part of the problem itself.
I tried to create a new user with initial group audio (useradd -g audio user) and now it seems to work, with play, aplay and mplayer, It also works adding the user to audio group as secondary group (usemod -G audio user).
The strange thing is that with root it doesn't work at all by console, it works perfectly if I use the GUI (for example xmms also exporting display on another workstation), that's strange.
And you know another strange thing? I alredy tried to play that file with a regular user (inside the audio group)
It *LOOKS* like it's playing....obvious question: you've checked the mixer levels, to see if things are turned up/un-muted, right? Try running "alsamixer", then press F5 to see ALL your channels. See if the levels are very low and/or muted (look for the "MM" at the bottom of the bar). If so, arrow-over to the channel in question, and press M.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.