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

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
Hypex
Level 1
Level 1
Posts: 20
Joined: Mon Apr 03, 2017 9:09 am

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

Post by Hypex » Tue Mar 13, 2018 9:24 am

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.

User avatar
Flemur
Level 15
Level 15
Posts: 5787
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 » Tue Mar 13, 2018 9:48 am

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?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

Hypex
Level 1
Level 1
Posts: 20
Joined: Mon Apr 03, 2017 9:09 am

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

Post by Hypex » Thu Mar 15, 2018 9:30 am

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.

Post Reply

Return to “Cinnamon”