LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-03-2015, 01:45 AM   #1
Lsatenstein
Member
 
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311
Blog Entries: 1

Rep: Reputation: 59
Alsa Headphone jack


What patch or other do I need to always keep the alsa headphone jack active. If I switch user and return, the headphone jack signal is muted.

I need it on full time. Currently I enable it with
A mixer -c0 set Headphone unmute 100%
 
Old 06-04-2015, 09:59 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan with some Tiny Core, Fatdog, Haiku, & BSD thrown in.
Posts: 5,281

Rep: Reputation: Disabled
See if you have alsamixer installed, set & save settings, hopefully will work for you.
 
Old 06-04-2015, 05:30 PM   #3
Lsatenstein
Member
 
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311

Original Poster
Blog Entries: 1

Rep: Reputation: 59
Quote:
Originally Posted by fatmac View Post
See if you have alsamixer installed, set & save settings, hopefully will work for you.
If it worked for me (switch user, and return to myself), I would not post a question.

If you know how to have amixer Headphone jack permenantly unmuted and on, it would be helping me out.
 
Old 06-04-2015, 07:35 PM   #4
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
Quote:
Originally Posted by Lsatenstein View Post
What patch or other do I need to always keep the alsa headphone jack active. If I switch user and return, the headphone jack signal is muted.

I need it on full time. Currently I enable it with
amixer -c0 set Headphone unmute 100
just put it somewhere where it will be run at boot

Last edited by genss; 06-04-2015 at 07:36 PM.
 
Old 06-04-2015, 08:05 PM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
# alsactl store

Which saves the mixer settings, and should be restored by default at boot. It depends on the distro ofc. Implies root to save it for all users. Although priorities vary depending on setups. BITD debian would check for alsa's settings, then use aumix-ers settings if they didn't exist. Pulseaudio (pavucontrol) might be the route these days. For some chipsets the headphone setting is ONLY available with alsamixer, so that's a good starting point.
 
Old 06-04-2015, 11:06 PM   #6
jbuckley2004
Member
 
Registered: Aug 2004
Distribution: Fedora (KDE spin)
Posts: 223

Rep: Reputation: 70
Alsamixer wouldn't save my settings (both the headphone and mic were muted) for the first three days after I installed F22. Maybe it was an update, but now the settings are saved on exit. You may just want to try it again to see if anything's changed.
 
Old 06-05-2015, 02:08 PM   #7
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan with some Tiny Core, Fatdog, Haiku, & BSD thrown in.
Posts: 5,281

Rep: Reputation: Disabled
Quote:
Originally Posted by Lsatenstein View Post
If it worked for me (switch user, and return to myself), I would not post a question.

If you know how to have amixer Headphone jack permenantly unmuted and on, it would be helping me out.
Quote:
Currently I enable it with amixer -c0 set Headphone unmute 100
Then why not put that in your start up config, depending on your distro as to where & which file.
 
Old 06-10-2015, 09:45 AM   #8
Lsatenstein
Member
 
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311

Original Poster
Blog Entries: 1

Rep: Reputation: 59
Here is the situation

Within /etc/profile.d/leslie.settings I have set

amixer -c0 set Headphone unmute 100 >/dev/null 2>&1

along with some other settings for other applications.

When I log into the system, amixer is correctly setup. (its the global profile setup for all users)

When I invoke Gnome's "switch user", amixer is muted, as it should be.

When I return from "switch user" amixer is not re-established.

So, the question I have is, On a return from "switch user", what are the names of the scripts that are activated?
For example, the profile scripts (.bash_rc /etc/bashrc and contents of /etc/profile.d are not called). What is the name of the script that decides that logic operation? I want to add a line to that script to re-initialize amixer.

I wonder if this question should be cross posted?
 
Old 06-10-2015, 06:24 PM   #9
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Quote:
Originally Posted by Lsatenstein View Post
Within /etc/profile.d/leslie.settings I have set

amixer -c0 set Headphone unmute 100 >/dev/null 2>&1
With that setup you probably have to logout and login to have those settings take effect and otherwise get re-applied. When you switch to a user who's already logged on, that's probably not happening. Or something like that.

I tend to have scripts that I run as the user that I am. Which is mostly manual for me, but it can be automated in .bashrc and other places. My tendancy towards scripts is that when I move on to another install I can just copy all my scripts, instead of trying to remember what configurations I changed from defaults times however many customizations I did. And I can tarball them and netcat them across computers on the local network without doing much in terms of "extras".
 
Old 06-14-2015, 01:07 AM   #10
Lsatenstein
Member
 
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311

Original Poster
Blog Entries: 1

Rep: Reputation: 59
So...

Can you or anyone
tell me the name of a script that is called when I first log into the system, and the name of the script when I return from a switch user, or when I enter virtual terminal mode, and then return to Gnome
 
Old 06-14-2015, 10:44 AM   #11
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
as per "Shadow_7" said there is only 2 reasons that can cause a muted anything is when alsa starts up it reads the aslactl store setting and sets them there. so set that. after that it is up to you to learn your tools and how to auto-start programs per operating systems.

As for the second reason you may have a setup in your .asoundrc that can cause that. good luck.
 
Old 06-28-2015, 07:35 AM   #12
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
Quote:
Originally Posted by Lsatenstein View Post
So...

Can you or anyone
tell me the name of a script that is called when I first log into the system, and the name of the script when I return from a switch user, or when I enter virtual terminal mode, and then return to Gnome
its a GDM thing
i guess you use GDM
ask them and if there isn't, file a bug report
 
Old 07-06-2015, 09:19 PM   #13
Lsatenstein
Member
 
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311

Original Poster
Blog Entries: 1

Rep: Reputation: 59
I have learned to have the amixer restarted via my .bash_profile, and via /etc/profile.d/leslie.sh

And when I return from a switch user, I just open a terminal and close it again to restore amixer.

I did notice the following.

The .bash_profile script must finish before amixer is setup because of timings. Therefore.. I have a amixer.sh script that I call from the .bash_profile.
The amixer.sh script is a task, amixer.sh & and within amixer.sh is a 1 second sleep command followed by the amixer -c0 ......

My hardware does not have jack/in /jack out detection for the front headphone jack. (pc is circa 2010). Newer PCs do have it, and that would solve my problem.

I can't see myself buying a new PC, so I will live with what I have for now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
headphone jack problem puneet singh Linux - Laptop and Netbook 1 01-18-2011 09:34 AM
Sound Problems (headphone jack) with Alsa specialist125 Linux - Laptop and Netbook 5 03-12-2007 12:50 AM
No sound on headphone jack kiaraho Linux - Hardware 3 02-16-2007 06:04 PM
Dell B120 Headphone jack now switches off speakers, thanks ALSA people cmetelko Linux - Laptop and Netbook 2 03-26-2006 04:33 PM
No sound from headphone jack jefferai Linux - Laptop and Netbook 0 08-21-2004 05:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration