r/linuxmint • u/Regular-Coffee-1670 • 3d ago
SOLVED Command to fix sound cutting out?
I have Linux Mint Cinnamon 22.3 on my desktop pc, and audio just randomly cuts out, approximately every couple of hours. There's no cause that I can see - I can be just watching YT or playing music, and it just suddenly goes silent.
Every time, I can go into the "Sound" panel, and click "Line Out Built-in Audio" and that fixes it 100% of the time (until it randomly cuts out again).
I've tried a bunch of things, suggested here and on other forums, and nothing has fixed it.
What I'm after is a command that does the equivalent of clicking on "Line Out Built-in Audio", that I can map to a keyboard key, so I can just fix it each time with one key press. Is there any way to do that?
EDIT: For anyone searching for a solution to this problem, u/Stevearino42 's comment below completely resolved it.
•
u/AutoModerator 2d ago
Please Re-Flair your post if a solution is found. How to Flair a post? This allows other users to search for common issues with the SOLVED flair as a filter, leading to those issues being resolved very fast.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/Stevearino42 3d ago
I have the same issue on one of my PCs, so I disable power save for the audio device:
sudo tee /etc/modprobe.d/snd-hda-intel.conf <<<'options snd-hda-intel power_save=0'And then reboot. That will persist between reboots.
2
u/Silver_Train7685 3d ago
If clicking Line Out in the Sound settings brings it back, you can do the same thing from a command and put that command on a keyboard shortcut.
In a terminal, run:
Find the one whose Description is Line Out or Built-in Audio, and copy its Name. It will look something like
alsa_output.pci-....analog-stereo. Then test this, putting your sink name in place of THE_NAME:If sound is still silent in something that was already playing, also run:
and for each number in the first column:
Once that brings the sound back, add a custom shortcut: open Keyboard from the menu, go to the Shortcuts tab, then Custom shortcuts, and use this command, with your real sink name in both places:
After that, one key press should do what clicking Line Out is doing now.