Set Default Audio in Linux (Fedora and GNOME)
As I continue down my path of using Linux more and more as my daily system, I’ve found a problem that was a bit annoying. For some reason…
As I continue down my path of using Linux more and more as my daily system, I’ve found a problem that was a bit annoying. For some reason, my desktop (GNOME) wouldn’t remember the default audio. My Nvidia GPU has two audio outputs:
- HDMI Output
- Digital Out S/DIF
When I set the audio output it works fine and everything is happy… however, once I reboot, it reverts back to Digital S/DIF… which means I can’t hear anything from my monitor. I then have to go back into the settings and change it back. This was very annoying and shows a bit of immaturity with the GNOME desktop. Other operating systems have no problem with remembering my audio device. Although, they do sometimes switch my default audio output.
I have been trying to use the GUI as much as I can, to flesh out the desktop as much as I can. This is an issue I can’t solve with the GUI, I had to solve this with the command line. While I have no problem with doing this, this may very well be annoying for someone switching over to Linux. Nevertheless, this feels like a bug with the GNOME desktop, they could easily run the command to set the default audio or edit the file that does this.
Command
The command to fix this is a two-parter. This first command is to list your audio devices. You want to find the one that is RUNNING or IDLE, or you can just grep out the SUSPENDED devices:pactl list short sources | grep -iv suspendedOUTPUT:
3 alsa_output.pci-0000_09_00.1.hdmi-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz RUNNING
The next part is to copy and paste the name of your audio device into the command to set the default audio device:pactl set-default-source 'alsa_output.pci-0000_09_00.1.hdmi-stereo.monitor'
And that’s it, after running this, your default audio device will be set. I really wish this was something that could be set in the GUI. This seems like something that could easily be set, and like a big oversight. It makes me wonder if the developers test on a desktop with the latest Nvidia cards. Also, if they just solve their problems with a command, making the GNOME desktop a bit weaker.