LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Alsamixer settings getting clobbered on reboot (https://www.linuxquestions.org/questions/linux-newbie-8/alsamixer-settings-getting-clobbered-on-reboot-856638/)

hsiu 01-16-2011 08:46 AM

Alsamixer settings getting clobbered on reboot
 
Hi,

I've found a number of posts about this online, but none of the solutions offered have helped me.

In order to use my laptop's on board microphone, I must go into alsamixer and set "Input Source" to "Front Mic", instead of "Mic" as it is.

When I reset, however, the back to "Mic" it goes.

I have run alsactl store, and if I _manually_ run alsactl restore, the settings are restored.

However, if I add alsactl restore to a startup script, it does not.

I have followed these instructions (bottom post):

http://www.linuxforums.org/forum/sla...tml#post247741

But to no avail. Instead of simply, alsactl restore, I put:

alsactl -d restore >> /home/hsiu/didrcsdrunalsa

Hoping to determine if it was actually running. the file didrcsdrunalsa is created, but there's no debug info in there as alsactl -d usually outputs, so it's difficult to tell. I also put

alsactl -d restore >> /home/hsiu/didrclocalrunalsa.txt

in my /etc/rc.local. Again, the file didrclocalrunalsa.txt is created, but it is 0 bytes, no information.

As I said, if I manually run alsactl [-d] restore at the command line, it works. So, I'm wondering what's happening at startup.

Any advice would be appreciated.

ozanbaba 01-16-2011 09:23 AM

try this;
Code:

/usr/sbin/alsactl -d 2>&1 >> /tmp/alsactllog
(with full path)

hsiu 01-17-2011 05:05 PM

Thanks for your reply.

I tried using the full path to alsactl and redirected both standard error and out to the log files, but nothing has changed.

frankbell 01-17-2011 08:57 PM

Do you get any error messages when you run alsactl store?

I just tried it on my Ubuntu laptop with sudo and got a weird output:

Code:

sudo alsactl store
Home directory /home/[username] not ours

Just hazarding a guess, but maybe pulseaudio is interfering with alsa.

hsiu 01-18-2011 02:26 AM

No, it stores and restores (manually) fine. It also works when I edit it.

ozanbaba 01-18-2011 02:32 AM

Quote:

Originally Posted by frankbell (Post 4228170)
Do you get any error messages when you run alsactl store?

I just tried it on my Ubuntu laptop with sudo and got a weird output:

Code:

sudo alsactl store
Home directory /home/[username] not ours

Just hazarding a guess, but maybe pulseaudio is interfering with alsa.

I wouldn't call it weird but expected under limited conditions.

markush 01-18-2011 02:35 AM

Hello hsiu,
Quote:

However, if I add alsactl restore to a startup script, it does not.
afaik this cannot work since alsamixer-settings are valid for the user. If you run alsactl at startup, you do it as root, which doesn't change anything with the settings of the user.

I'd try to put the alsactl line into the ~/.xinitrc file which is executed when the X-server starts.

Markus

hsiu 02-01-2011 04:42 AM

Arg, still no luck.

I put the above line in .xinitrc, and this time no file is created at all, not even an empty one, so I don't think .xinitrc is being run at all.

ozanbaba 02-01-2011 05:28 AM

You know, maybe another mixer runs and changes your mixer settings. Maybe pulseaudio indeed get in the way of alsamixer.

t.lee.davidson 03-10-2011 12:22 PM

I had the same type of problem in that a manual 'alsactl restore' from the command line worked just fine, but yet my sound settings were getting clobbered at boot time. I was able to solve my particular problem.

Before I noticed this problem, I had already disabled PulseAudio to get my Sound Blaster Live! Value working on Mandriva 2010.2 using the KDE4 desktop environment. I used alsamixer to get the settings right and then stored them with 'alsactl store' which saved the settings to '/etc/asound.state'. (If there were more than one sound card in my system, I would also have needed to specify the sound slot number.)

The problem crept in when KDE launched Kmix which was set to "Restore volumes on login" (Kmix [-> mixer] -> Settings -> Configure Kmix...). But instead of disabling that option, I went into Settings -> Configure Channels... and dragged the channels I needed to control from the left-side pane ("Available channels") to the right-side pane ("Visible channels"). I then set them the way I need them to be, and rebooted to test.

Solved.

HTH,
Lee

ozanbaba 03-10-2011 12:32 PM

Heheh kmix did ignores system settings. How I am not surprised :) hsiu, check other mixer like kmix.


All times are GMT -5. The time now is 09:37 PM.