No sound in Fedora. Fix sound in fedora20

1. lets find the output sources we have.
$ aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0


2. Now we know the card# and device#. I want to use Logitech as my default output source so let me test it by outputting the stream to that source by running below command.

aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Right.wav           #0,0 is card 0, device 0 for Logitech

3. Determine the index of the above source by running below command.

pacmd list-sinks | less            # don't run this command as root as you will not find any source. For me it was 4


4. Lets append following 2 lines in /etc/pulse/default.pa

load-module module-alsa-sink device=hw:0,0            #0,0 is card 0, device 0 for Logitech
set-default-sink 4                       #4 is the index of the source i got from step 3

5. Restart the computer and you will have your sound fixed.
 
Please leave a comment or g +1 or share on f or share on t below if this post helped you. This will keep me motivating.

[source - https://wiki.archlinux.org/index.php/PulseAudio/Examples#Defaulting_an_Analog_Output_Source]

9 comments:

Anonymous said...

Just spent hours hacking at this, and, turns out the solution is quick and painless:

> sudo yum remove pulseaudio
> yum install alsa-lib alsa-utils
> sudo usermod -G audio

Then reboot ;)

ankit said...

Glad it worked for you. Thanks for the comment.

Anonymous said...

oi, okay the tag chars are stripped,
make sure you do the above as super user, and:
usermod -G audio _username_

Anonymous said...

warning to other users, do not run the command :

"sudo yum remove pulseaudio"

This will destroy your system, as it did mine and you won't be able to fix without a reinstall of the OS.

Unknown to me pulseaudio is closely tied to the gnome desktop and removing it, has left my machine with no graphics and not able to fix gnome or get a graphical login. My system is totally borked and backing up and then re-installing - spent 8 hours on this so far, joy :-)

I am no no newbie and as a Linux Admin with over 10 years experience should have known better!

My audio suddenly stopped working and my bad for blindly following the instructions!!

you been warned!

Anonymous said...

for the user who "destroyed" his system by uninstalling pulseaudio, why not review /var/log/yum.log to see which dependencies were removed and take that list of packages and re-install them independently?

Anonymous said...

i couldn't believe how simple it works to fix. heres what i did.i first installed the os, then tried installing vlc for extra codecs that would somehow work for flash players and other audio, but it wouldn't install vlc. then i tried all other additional rpm's. tried installing rpm fusion, wouldn't let me again. so in the terminal i typed yum update. it download 1477 updates and other gpk keys as added, because in the list of updates it said rpm failed, so it downloaded from another site, asked if it was ok, then i type y, then it proceeded to download and update those keys. i rebooted, then it worked. felt stupid being up till 3 tryna figure that out.

ultramanjones said...

I want to STRONGLY second what one anonymous user said...
DO NOT run the command:
sudo dnf remove pulseaudio

Just as he said, it left me in text mode limbo and after working on this until the wee hours this morning and then off and on ALL DAY long (while watching football), I have yet to find a fix.

To the other anonymous who said:
for the user who "destroyed" his system by uninstalling pulseaudio, why not review /var/log/yum.log to see which dependencies were removed and take that list of packages and re-install them independently?

I tried doing
dnf history undo
and while it appeared to have replaced all of the dependencies, functionality has not returned.

At any rate, IT DID NOT FIX MY SOUND, so I advise against it and Canonical advises against it as well (I found out too late). See this link: http://voices.canonical.com/david.henningsson/2012/07/13/top-five-wrong-ways-to-fix-your-audio/

I will likely resort to complete reinstall which will take a whole day because of all of the software and libraries that I need running on this machine. A bone-head move on my part. Learn from my mistake folks!

Anonymous said...

Don't do it.
"sudo yum remove pulseaudio" will destroy your graphic interface. It won't solve the audio problem and you'll need to reinstall your system.

Jeho said...

I removed pulseaudio and the gnome graphical interface was gone. However, I stored a list of the files being removed in my Fedora 30. I just reinstalled them from the terminal and voila the graphical inteface again:

sudo dnf install chrome-gnome-shell gnome-classic-session gnome-initial-setup gnome-shell-extension-background-logo accountsservice accountsservice-libs bluez-obexd bolt gdm gnome-bluetooth gnome-bluetooth-libs gnome-control-center gnome-control-center-filesystem gnome-icon-theme gnome-session gnome-session-wayland-session gnome-session-xsession gnome-shell gnome-shell-extension-apps-menu gnome-shell-extension-common gnome-shell-extension-launch-new-instance gnome-shell-extension-places-menu gnome-shell-extension-window-list mutter switcheroo-control vino xorg-x11-server-Xwayland