Using Startup Applications has no effect in runing program to reset audio

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Hypex
Level 1
Level 1
Posts: 45
Joined: Mon Apr 03, 2017 9:09 am

Using Startup Applications has no effect in runing program to reset audio

Post by Hypex »

Hello. I'm trying to use the Startup Applications from Preferences to run a terminal program. I need to run it in order to reset the audio settings. Since the the driver is confused about the hardware and always mutes the speakers. Because it seems to think headphones are plugged in.

I'm using the amixer program for this purpose. It works fine in a terminal as non-root. But when I tried to add it at start up it is having no effect. I added it like this:

Code: Select all

/usr/bin/amixer sset Speaker 100% unmute
I gave it a startup delay of 5. Just in case it needs a delay. But every time I boot I find I have no audio. It gets annoying that I must run alsamixer in a terminal after each boot. That or run amixer. I also tested it without the full path but it was the same.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Using Startup Applications has no effect in runing program to reset audio

Post by Flemur »

Two suggestions:
Edit: three!
- make sure it's actually running (have it write something to a file: "echo 'hello' > ~/a.txt" -)
- I run a login script to set audio, and all the amixer stuff is in a separate file (~/bin/sound_init) and I run that file.
- Also I have single quotes (below) - are you sure it works w/o quotes? (Some of the names have spaces, unfortunately, and require quotes).

Code: Select all

amixer set 'Master',0        25%  unmute
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Hypex
Level 1
Level 1
Posts: 45
Joined: Mon Apr 03, 2017 9:09 am

Re: Using Startup Applications has no effect in runing program to reset audio

Post by Hypex »

Hello Flemur and thanks for your assistance. After reading my post I expected a "Trying to solve X by doing Y" come back. So it's nice to see someone else in the same kind of situation. I did try and follow advice on saving alsamixer settings but none worked for me and when I found amixer hoped I could use that.

I tested redirecting output to a file and the file wasn't created.

So I took your example and put my line in a script I called soundset and placed in /usr/sbin. I was avoiding this as I was working to the KISS principle. But I tested just the script. I closed all windows and then killed X to force a soft restart as I found this tended to reset sound settings.

Logged back in and then I heard a startup sound! Hooray. :-D

The command worked without quotes in the terminal so I expected they wasn't needed and no labels had spaces.

Thanks again.
Locked

Return to “Cinnamon”