• We did not send an email asking for donations - please read this post.

How to easily fix problems with the sound for newbies

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
647
Reaction score
518
Credits
3,613
This is a simple instruction for newbies about how to fix problem with the sound on Linux, like missing sound from any application, weird static noise from the speakers, or even noise from the microphone when the environment around it is perfectly quiet. I've done this in Mint but as far as I know it should work with all distros.

1. Open terminal.
2. Type
Code:
pulseaudio -k
and press enter. This will kill the audio service and the icon from the bottom right corner will disappear. Don't panic - the disappearance of it is completely normal and wanted.
3. Wait for a few seconds and if the icon doesn't reappear, type
Code:
pulseaudio -D
This will start the audio service and with it the perfect Linux sound will return.

Note: if the icon did reappear after Step 2, don't proceed to Step 3 or the terminal will return an error and there's a small chance for you to crash the audio service.
 


Bayou Bengal

Active Member
Joined
Sep 14, 2017
Messages
189
Reaction score
220
Credits
77
Tested it, and it worked! Thanks! Handy thing to know! This tip should have a sticky!
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,791
Reaction score
6,615
Credits
28,682
OP
rado84

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
647
Reaction score
518
Credits
3,613
Since I'm lazy and I like everything to be easy, I turned the first command into a desktop shortcut. Here's how:

1. Create an empty file without extension and place it wherever you want.
2. Open the file and in it type (without the quotes) "pulseaudio -k". Save the file and close it.
3. Right click on the file, go to "Properties", "Preferences" or whatever your File Manager calls that section of the context menu. Click on the tab "Rights" and then on the checkbox "Make this file executable".
4. Go to your desktop, right click on an empty space and select "create a new launcher here".
5. Browse for the file and select it. In title type whatever you want.
6. Click on the checkbox "Launch in terminal", select an icon for it and click OK.

And that's it - you have a one-click-away way to fix your sound when the problem occurs.

kill-pulseaudio.png
 
Last edited:

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,791
Reaction score
6,615
Credits
28,682
I wouldn't call it lazy (OK, I'm lazy too) - I would call it innovative :)

Rado you might just want to tell some of the folks how to make the file executable, with an example

Cheers

Wizard
 
OP
rado84

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
647
Reaction score
518
Credits
3,613
I just added it to the post, altough I think it's pretty obvious on the "how to".
 

mistermike

New Member
Joined
Dec 28, 2019
Messages
21
Reaction score
13
Credits
0
Since I'm lazy and I like everything to be easy, I turned the first command into a desktop shortcut. Here's how:

1. Create an empty file without extension and place it wherever you want.
2. Open the file and in it type (without the quotes) "pulseaudio -k". Save the file and close it.
3. Right click on the file, go to "Properties", "Preferences" or whatever your File Manager calls that section of the context menu. Click on the tab "Rights" and then on the checkbox "Make this file executable".
4. Go to your desktop, right click on an empty space and select "create a new launcher here".
5. Browse for the file and select it. In title type whatever you want.
6. Click on the checkbox "Launch in terminal", select an icon for it and click OK.

And that's it - you have a one-click-away way to fix your sound when the problem occurs.

kill-pulseaudio.png
pure genius.
 

omepositer

New Member
Joined
Jul 2, 2020
Messages
1
Reaction score
1
Credits
6
This is a simple instruction for newbies about how to fix problem with the sound on Linux, like missing sound from any application, weird static noise from the speakers, or even noise from the microphone when the environment around it is perfectly quiet. I've done this in Mint but as far as I know it should work with all distros.

1. Open terminal.
2. Type
Code:
pulseaudio -k
and press enter. This will kill the audio service and the icon from the bottom right corner will disappear. Don't panic - the disappearance of it is completely normal and wanted.
3. Wait for a few seconds and if the icon doesn't reappear, type
Code:
pulseaudio -D
This will start the audio service and with it the perfect Linux sound will return.

Note: if the icon did reappear after Step 2, don't proceed to Step 3 or the terminal will return an error and there's a small chance for you to crash the audio service.
Fantastic, the initial "pulseaudio -k" worked when I've tried so many other methods. I'll have a look at the more sophisticated version when I'm a bit more confident.
 
OP
rado84

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
647
Reaction score
518
Credits
3,613
pure genius.
LOL, far from that. :) It's just that before I started this topic I had some audio crackling problems and from all solutions only this one worked, so I decided to share it.
 

ScrambledEggs

Member
Joined
Sep 26, 2020
Messages
35
Reaction score
7
Credits
388
Hey y'all, I came to this forum to post a question as to why I get static noise when I plug in a speaker to my machine. Can anyone tell me where the static noise is coming from? What produces it?
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,791
Reaction score
6,615
Credits
28,682
G'day @ScrambledEggs :)

If the answer to your question is not found with the above solutions, then just start your own Thread in this subforum, as you have started others previously.

Cheers

Chris Turner
wizardfromoz
 

SpongebobFan1994

Well-Known Member
Joined
Jan 10, 2021
Messages
745
Reaction score
428
Credits
7,246
Since I'm lazy and I like everything to be easy, I turned the first command into a desktop shortcut. Here's how:

1. Create an empty file without extension and place it wherever you want.
2. Open the file and in it type (without the quotes) "pulseaudio -k". Save the file and close it.
3. Right click on the file, go to "Properties", "Preferences" or whatever your File Manager calls that section of the context menu. Click on the tab "Rights" and then on the checkbox "Make this file executable".
4. Go to your desktop, right click on an empty space and select "create a new launcher here".
5. Browse for the file and select it. In title type whatever you want.
6. Click on the checkbox "Launch in terminal", select an icon for it and click OK.

And that's it - you have a one-click-away way to fix your sound when the problem occurs.

kill-pulseaudio.png

Does it matter which file it is?
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,988
Reaction score
3,632
Credits
36,344
@f33dm3bits That was easy. Thanks again.
If this fixed your issue than yes it was easy. I didn't expect it would since pulseaudio is restarted after you boot your system, I expected it to be something else that's why I thought it would be better to create a new topic.
 

simis

Member
Joined
Sep 26, 2021
Messages
35
Reaction score
18
Credits
337
If this fixed your issue than yes it was easy. I didn't expect it would since pulseaudio is restarted after you boot your system, I expected it to be something else that's why I thought it would be better to create a new topic.
Strangely, that only made it go away for a few minutes and now I've got a lot of machine noise again and it's not working anymore.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,988
Reaction score
3,632
Credits
36,344
Strangely, that only made it go away for a few minutes and now I've got a lot of machine noise again and it's not working anymore.
Create new topic then as I suggested ;)
 

Fanboi

Well-Known Member
Joined
Apr 16, 2021
Messages
499
Reaction score
407
Credits
6,114
Strangely, that only made it go away for a few minutes and now I've got a lot of machine noise again and it's not working anymore.
Not knowing your setup, I'm going out on a lomb and assuming you're using analobgue. TBH, I don't know that the HDMI is the problem because you are getting some sound, but this is worth a shot:

1. Disable it ...
When you boot, on the GRUB menu, select (highlight) the default item and press "e".
Now you can edit the boot parameter. Look for
Code:
GRUB_CMDLINE_LINUX_DEFAULT="blah blah blah"
and add "radeon.audio=0". Then boot. This should disable it, but of course this is considered the "outdated" method, but it's easy. Anyway, if that works, just add it to your boot parameters by editing the /etc/default/grub file, finding the above line and adding the above parameter (you need to edit as root or via sudo).

If not, try blacklisting the driver:
Code:
sudo -i

// Check if the module is there:
lsmod | grep radeon

// If it is, then
echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf

update-initramfs

reboot

2. Change priority/primary device...
If that does not work, run "pactl list cards" and give us the output. You can also view your cards in ALSA by runnin "alsamixer" and selecting card (F5/F6 IIRC).

3. See if it's not Pulse causing it by using pure ALSA.
Code:
pulseaudio -k
aplay <path/to/mp3>
You may have a latency issue (which I'm suspecting, but may be way off on).

Anyways, try/do everything suggested, give us the details if needed, and we'll go from there. I'm hoping for your sake it's not this issue coz it's tedious fighting with Pulse.

EDIT: As @f33dm3bits suggested, start a new topic and just post what's relevant from these (maybe a link to your first post in this thread for reference).
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Staff online

Members online


Top