Are you running pulse audio or pipe wire? My best guess is some other software is unaware of the also state and resetting it.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
It's Xubuntu 22.04 so most likely PulseAudio.
Unless you're using Arch or Gentoo or similar distros that come with nothing by default, it's pretty much going to have PA or PW.
I don't understand how people always end up messing with ALSA when we haven't used ALSA directly by default on any mainstream distro for nearly a decade. Especially with PipeWire around, ALSA should essentially treated like a low level API you don't mess with unless you have a kiosk application that's gonna take exclusive direct use of ALSA. Even ALSA plugins like dmix/dsnoop are wildly outdated and buggy with modern applications, if they even still support using ALSA directly. Messing with ALSA is a recipe for pain especially if you're not intimate with it. There's very, very few reasons to do anything with ALSA these days.
The correct solution is to just select the correct profile from the sound menu, or change it from pavucontrol. That's it, it's that simple.
I wish it would work with pacucontrol, but it dies not give me the external mic Option for the inputs. Alsa does. See my parallel comment.
Have you checked the configuration tab on pavucontrol? You can usually change how the card is setup there.
After some more testing, I think this is indeed the case. The problem is that the device has two input channels ("line-in", " external mic"). In alsamixer i can select both as "PCM capture source" (from here) However, the input tab of pavucontrol, i can only select "line in". I switched through all available profiles for the card. But the dropdown only always show "line-in"
Any ideas?
Can you set the permissions of the file to read only? That way nothing else can edit it on the fly?
chmod 444 filename
would make it so the owner, group, and everyone else can only read the file. You can change modification of the file again if you have to edit it.
I could do that, the question is what is the correct config file? I think the .state files are more like snapshots wich are applied to the config when i restore it.
Have you tried: sudo alsactl store
Yo dude I have a soundblasterx g6 too, I had this problem too where the sound card disconnected and reconnected as an output devices everytime, I have resolved the problem by changing this setting in the soundblaster commander under windows.
There is no equivalent driver for linux, at least for what I know, but I'm trying my best to resolve the issue by reverse engineering it.
For the mic problem I use a bash script on startup that change the mic to the one of the sound card.
Thank you! Will try this tomorrow <3
No problem!
Okay, i had to try it today... Unfortunatley, it was set to "PC/Mac" already. I have factory reset the card and tried again. Have you enabled the sbx profile, or do you use direcr sound mode?
No I don't have direct mode enabled because if you do so the mic doesn't work, and I don't have any sbx profile enabled.
Ahh... that was the reason