You are not logged in.
I'm not sure what went wrong, so I'll tell the full story: I was struggling to get the Catalyst driver working. I have a Dell 5547, which has two graphics cards, an Intel HD 4400 and a Radeon R7 M260. I had installed the packages catalyst-hook and catalyst-utils-pxp from Vi0l0's repositories, but couldn't start X when I switched to the AMD card. Eventually, I downgraded to Xorg 1.14, also from Vi0l0's repositories, and now I was able to start X with both graphic cards. I'd read on The AMD/ATI Bar & Grill that downgrading to the Linux kernel 3.15.8 solved Daniel.White's problems, so I downloaded the corresponding linux and linux-headers packages from the Arch Rollback Machine. Later, I installed the last Linux kernel (version 3.16.1) and verified that I could still start X with both cards.
Before downgrading to Xorg 1.14, I installed Gnome 3 and everything worked great. I could listen to my music and watch videos on YouTube. Somewhere along the way, however, my sound stopped working. I'm using pulseaudio, and even after changing the settings using pavucontrol, I still can't get the audio to work -- on X. Sound works great on the console, but it refuses to work after I start X.
When I boot my computer and open an audio file with, say, mplayer, it complains that the "Audio device got stuck!"
pavucontrol reports that I have two built-in audio devices. The first one is off, and the second is set to "Analog Stereo Duplex". If I turn it off and then back on, mplayer stops complainning, but no sound comes out. On the "Output Devices" tab, pavucontrol now says that I have a "Dummy Output". It reverts back to normal once I reboot the machine.
Here's some info I think might be useful:
/etc/asound.conf:
# Use PulseAudio by default
pcm.!default {
type pulse
fallback "sysdefault"
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
}Output of aplay -L:
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default
Default ALSA Output (currently PulseAudio Sound Server)/proc/asound/cards:
0 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xb0c10000 irq 65
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xb0c14000 irq 62Please let me know if you need more information. Thanks for reading!
Last edited by revberaldo (2014-08-23 15:03:17)
Offline
So I assume before starting X, in the console pulseaudio is not running? You may want to set PCH as default using modprobe, try this:
$ cat /etc/modprobe.d/50-alsa-base.conf
#first try those 2 lines
options snd-hda-intel index=1
options snd-hda-intel index=0
#if it does not work, please report and try this 1 line instead
options snd-hda-intel index=1,0Post the output of 'aplay -l' after each attempt and also 'lspci -nn|grep -i audio' for completeness sake. I would appreciate it, if you would do that.
If the problem persists, I would remove ~/.config/pulse and whatever pavucontrol uses to store its settings. Check what blocks mplayer with 'fuser -v /dev/snd/*'.
Offline
Hi emeres, thanks for the answer. I edited /etc/modprobe.d/50-alsa-base.conf as you suggested, then rebooted.
$ cat /etc/modprobe.d/50-alsa-base.conf
options snd-hda-intel index=1
options snd-hda-intel index=0
$ aplay -l
aplay: device_list:268: no soundcards found...
$ lspci -nn | grep -i audio
00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 0b)
00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04)While mplayer is trying to play an MP3 file, I ran:
$ lspci -nn | grep -i audio
00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 0b)
00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04)I edited 50-alsa-base.conf once again and rebooted the system.
$ cat /etc/modprobe.d/50-alsa-base.conf
options snd-hda-intel index=1,0
$ aplay -l
aplay: device_list:268: no soundcards found...
$ lspci -nn | grep -i audio
00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 0b)
00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04)I even tried adding this to 50-alsa-base.conf:
options snd-hda-intel index=1 model=auto vid=8086 pid=0a0c
options snd-hda-intel index=0 model=auto vid=8086 pid=9c20Then rebooted. Nothing changed. I swapped the indexes and that didn't work either.
Then I exited Gnome and ran aplay -l on tty1:
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0pgrep indicated that pulseaudio was indeed running, and I could play an MP3 with mplayer -ao pulse a.mp3. So, pulseaudio is running before X starts. I've checked my ~/.xinitrc and /etc/X11/xinit. Nothing there. That's crazy; what could be running that only affects X? Also, this problem is window-manager independent. It doesn't matter whether I'm running gnome3 or i3, I can't play audio inside X. If I go to tty3, for instance, sound works just fine.
Offline
That wiki part about vid and pid needs updating, those parameters in case of snd-hda-intel are ignored, check "dmesg | egrep -i 'ignor|hda'|intel".
As for the issue, 'aplay -l' should always return those sound cards, so this goes beyond pulseaudio. Are you in the audio group? Check everything related to startup profiles and settings like ~/.bashrc{,_profile}, ~/.profile, ~/.asoundrc, ~/.config/autostart and others. You could try to init alsa using '# alsactl init' inside X and check 'aplay -l' again.
Edit: How are you starting X?
Last edited by emeres (2014-08-22 23:44:23)
Offline
I checked all the files you mentioned (are there any others that I should check?). # alsactl init also didn't work. EDIT: I'm not in the audio group because the wiki recommends that.
I'm starting X with startx.
$ cat .xinitrc
exec gnome-session
#exec i3I'm going to give GDM and LightDM a try.
EDIT: Using a display manager worked. After logging in from GDM, I have audio. What's changed? When I first installed GNOME, I could start it with start X and I'd have audio.
Thanks for all the help! ![]()
Last edited by revberaldo (2014-08-23 13:32:27)
Offline
I am aware of that. Does '# aplay -l' return also nothing from within X? I am not familiar with gnome-session, but I guess it starts a whole bunch of processes. What is the output of 'lsmod | grep ^snd' outside and inside X? Here is the snd_hda_intel relevant.
Edit: Too slow. Glad that you got it working, you are welcome.
Last edited by emeres (2014-08-23 13:38:21)
Offline
Would do me a favour? Please repeat those steps. Boot into console and run this script:
cat /etc/modprobe.d/50-alsa-base.conf >> ~/test
aplay -l >> ~/testUse only the lines I mentioned, 3 combinations, the 2 mentioned and this one:
$ cat /etc/modprobe.d/50-alsa-base.conf
options snd-hda-intel index=1I need further confirmation that this procedure works. You can run speaker-test after each reboot, sound should be heard. The previous attempt was corrupted because of lacking 'aplay -l' output. So please post test afterwards.
Edit: Reboot between modprobe changes is necessary.
Edit2: Also remember to mark the thread as solved.
Last edited by emeres (2014-08-23 14:07:24)
Offline
Sure!
$ cat test
options snd-hda-intel index=1
options snd-hda-intel index=0
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
options snd-hda-intel index=1,0
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
options snd-hda-intel index=1
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0Sound worked with all settings I tried. It looks like a permissions problem. Using a display manager solves it, but can I get the same result without having to use one?
Offline
Thank you. Try what I posted here. When I run 'aplay -l' as 'nobody', I get the same error. 'ls -al /dev/snd/' probably lists the devices with audio group.
Offline
I started X using startx, here's what I got:
$ aplay -l
aplay: device_list:268: no soundcards found...
$ sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0So it certainly is a permissions issue. I've already tried uninstalling all of gnome and gnome-extras to see if that would reset the permissions, but that didn't work. Here's the output of lsmod | grep ^snd inside X:
snd_hda_codec_hdmi 45117 1
snd_hda_codec_realtek 67127 1
snd_hda_codec_generic 63126 1 snd_hda_codec_realtek
snd_hda_intel 26327 5
snd_hda_controller 26727 1 snd_hda_intel
snd_hda_codec 108552 5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep 17244 1 snd_hda_codec
snd_pcm 88487 4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer 26614 1 snd_pcm
snd 69340 18 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intelEDIT: I saved the outputs inside X and outside X to text files, and diff inx.txt outx.txt doesn't show any differences.
Also:
$ ls -al /dev/snd/
total 0
drwxr-xr-x 3 root root 280 Aug 23 11:51 .
drwxr-xr-x 20 root root 3120 Aug 23 11:51 ..
drwxr-xr-x 2 root root 80 Aug 23 11:51 by-path
crw-rw----+ 1 root audio 116, 7 Aug 23 11:51 controlC0
crw-rw----+ 1 root audio 116, 2 Aug 23 11:51 controlC1
crw-rw----+ 1 root audio 116, 10 Aug 23 11:51 hwC0D0
crw-rw----+ 1 root audio 116, 6 Aug 23 11:51 hwC1D0
crw-rw----+ 1 root audio 116, 9 Aug 23 13:00 pcmC0D0c
crw-rw----+ 1 root audio 116, 8 Aug 23 13:14 pcmC0D0p
crw-rw----+ 1 root audio 116, 3 Aug 23 13:00 pcmC1D3p
crw-rw----+ 1 root audio 116, 4 Aug 23 13:00 pcmC1D7p
crw-rw----+ 1 root audio 116, 5 Aug 23 13:00 pcmC1D8p
crw-rw----+ 1 root audio 116, 1 Aug 23 11:51 seq
crw-rw----+ 1 root audio 116, 33 Aug 23 11:51 timerLast edited by revberaldo (2014-08-23 16:16:45)
Offline
And if you run "sg audio -c 'aplay -l'" it will probably also work.
Offline
And if you run "sg audio -c 'aplay -l'" it will probably also work.
Yup!
OK, I solved it. I noticed that there's a directory /etc/X11/xinit/. I remember deleting everything inside /etc/X11/ when configuring Catalyst, hoping that starting with a fresh configuration would solve the issues I was having. This directory's content was certainly destroyed in the process. Reinstalling the package xorg-xinit was enough to restore the old configuration files. One of these two files did the trick:
$ cat /etc/X11/xinit/xinitrc
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login$ cat /etc/X11/xinit/xserverrc
#!/bin/sh
if [ -z "$XDG_VTNR" ]; then
exec /usr/bin/X -nolisten tcp "$@"
else
exec /usr/bin/X -nolisten tcp "$@" vt$XDG_VTNR
fiThanks for all the help! I couldn't have figured it out without it.
Last edited by revberaldo (2014-08-23 16:36:43)
Offline