Every time I boot my laptop (running the latest Fedora), I have to open a terminal and run alsamixer so I can select f6 and change the sound card. Otherwise I get no audio. Here’s the process:
boot
open terminal
run alsamixer
Whatever this reprsents doesn’t work. Audio is very faint. So I then hit f6,
This shows the correct sound card driver for the sof-essx8336. I select this instead of the (default) line.
This brings up a lot more options. The Headphone volume is muted every time this is opened. I have to turn that up for the built-in speakers to make a reasonable amount of sound. Yes, I have to change the headphone volume to get the built in speakers to work.
After doing this I can close the terminal and my laptop speakers work fine. But this doesn’t persist across reboots. I have to do this ritual every time I load Fedora.
What file do I have to manually edit to make this configuration persistent? Why does the alsamixer call it Headphones if it increases the built in speaker volume?
Obviously the ES8336 is the sound card, that only recently has had any support in linux. It isn’t perfect. But at least if I do a bit of tweaking and terminal commands I can get sound. Beats where I was a year ago with no sound regardless of distro.
This seems to match what I expect. My soundcard is the infamous ES8336, common to garbage cheap laptops. Of course, it works fine in Windows, but in linux it either doesn’t work at all or I have to deal with this mess. When I use zero as the device ID with the wpctl set-default your cards ID command, it says zero isn’t a valid number. LOL
And NOW when I use f6 to change the sound card it produces almost no audio even after selecting the sof-essx8336 option. It is very faint and highly distorted if I max out the first two in alsamixer.
and I got it back working by turning up the DAC in alsamixer for that device.
Now if I run
wpctl set-default 50
I get
Node '50' not found
Regardless, this doesn’t solve the issue of having to load alsamixer and do f6 to change the sound card to the correct one every time I boot just to get sound.
The issue I have is more fundamental it seems. There must be a file to which the sound settings should be saved but the settings in alsamixer are NOT being saved obviously (as it resets to default on reboot) …and the default settings are useless. Where is the default configuration saved? Can I edit the file directly? If not, can I make a custom macro command to do this dumb task every time it boots automatically?
That should be saved under ~/.local/state/wireplumber
As it’s not working I would delete the files under that directory, logout and then log back in and see if that clears it up.
Why would deleting those files do anything? It obviously isn’t writing to the files any changes I am making so if I delete them, what guarantee would I have that the system would write new ones just by logging out and back in?
This is obviously a problem that plagues a LOT of users. ANd it isn’t merely a Fedora issue. This is a problem with alsa itself that hasn’t been corrected despite people complaining about this behavior for years now.
Tried deleting the four files there anyway. Of course that didn’t work. It just made the same wrong files when I logged in. Nothing different.
I did some research and found the following commands which I will try next:
alsactl --file ~/.config/asound.state store
alsactl --file ~/.config/asound.state restore
This method did preserve the volume settings for me. But the default card that loads still isn’t the card I want it to load. But at least I don’t have to tweak the individual volumes in addition to doing f6 in alsamixer to change the card.
For some, the above commands didn’t work for them. So they
created a config file and placed it at
/etc/asound.state
and added it to the reload line to their
/etc/rc.local
I am not sure what they meant by that last bit. What is the reload line to which they added that config? Also, does anyone know how to create a config file? How does one then add the loading of that config to their startup? This last bit seems to be the answer we all are looking for, but seems kind of advanced.
Yeah. Wireplumber is both why I now DO have sound on this laptop and also why it is so tricky to use. Pulseaudio had no clue how cheap laptops make sounds. LOL
It just seems Wireplumber and alsa are very primitive by today’s standards. Does any other OS have anything remotely this complicated for their sound architecture? Well, probably yes, but at least there are nice GUI interfaces and well-paid engineers fixing the bugs (instead of the end user having to hammer it out). But alas, that is Linux: the end user has to hammer it out. That should be the motto for linux.
So after logging in today, the right sound card WAS selected. The volume was turned all the way down, but at least the right hardware path was defined.
I had created a file and pasted some basic contents in it per the alsa wiki:
Make a file called .asoundrc in your home and/or root directory.
vi /home/xxx/.asoundrc
copy and paste the following into the file then save it.
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
By the way, exiting vi while saving involves holding down Ctrl and hitting Z twice. Yeah. Intuitive, right?
I haven’t yet figured out how to add it to the bout or autostart. I haven’t checked all the hardware stuff to see if the default is evuen correct in this file. Not sure how. I am educating myself with the help of the alsa wiki since nobody working on alsa officially will do anything about this problem.
:qw makes sense, I guess. I just couldn’t remember because, you know, the interface makes no mention of any commands you might want to use.
The fact that you have to use vi to create or fix a file to make the sound work is one layer of the unintuitive cake. The secondary issue, that vi is hardly user friendly and makes no mention of how to save and quit inside it’s interface is just another layer of the unintuitive cake. As terminal based apps go, vi is dismal. At least alsamixer shows the functions you can use to do various things.
That said, people would revolt if Windows suddenly had an alsamixer looking interface for their sound settings. Blood would flow in the streets. Utter pandemonium would ensue.
I mean, you can have super beautiful window managers and desktop environments in linux but at the core exists a hot mess of stuff that barely works and requires tedious command-line apps to sort of fix, and only if you are willing to do a ton of research and figure it out yourself.
Worse, you get the linux fanboys any time you dare complain about their holy operating system.
I love linux. I love the privacy. I love the security. I have used Manjaro, Ubuntu, and Fedora so far. I like KDE but Gnome is growing on me. And XFCE was my favorite for half a decade.
But admitting there is a problem is the first stage to recovery. The linux community shouldn’t be talking down to those that dare criticize it. They should just fix the problems as quickly as possible so people can be confident that if they dare use linux and encounter a problem, it won’t take them two weeks to fix it themselves.
This is user defined. (And is subject to the time the developer has available to focus on fixes since they are all volunteers and most have a day job as well.)
Some things may be completed within a few minutes. Others require extensive time to analyze and determine the best fix as well as testing.
Fedora has switched to nano for the default editor so that is easier for many to do text editing. (I prefer vim for my own use) The man page for vim provides much info on using vim.
OK, so to get back on topic, here is my status as of booting this morning.
I no longer have to do f6 to change the sound card in alsamixer. It loads the right sound card profile.
I still have to turn up the first slider which is incorrectly labled ‘headphones’ in order to hear anything well.
What I did was
wpctl status
which had a huge confusing output that told me what sink to use in this commund
wpctl set-default 45
Then I created a config file
/etc/asound.state
at
/etc/rc.local
That is what likely got rid of my need to hit f6 in alsamixer to select the riight card.
Also, I created another file in my home directory (home name instead of xxx) using this command
vi /home/xxx/.asoundrc
and pasted this stuff in it:
pcm.!default { type hw card 0 }
ctl.!default { type hw card 0 }
and, of course, :qw exits vi while saving. I will be using nano in the future.
I have not figured out how to load up this file upon boot or login. So if it is saving my settings for specific volume sliders, I have no way to retrieve it automatically. Or is it loaded automagically because it is in my home directory?