19.2 Cinnamon independant headphones/speakers? [SOLVED]

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

19.2 Cinnamon independant headphones/speakers? [SOLVED]

Post by shockedquartz »

FIX: pavucontrol

Hello all.
I would like to NOT have to yank my headphones out of the ports every time I want to use my speakers.
I can't seem to figure it out in Cinnamon Mint.

Headphones are analog 2.5 rca front. Speakers are on 2.5 rca back.

Can anyone give me some info?

Seems this doesn't use pulseaudio

Only output related to sound was:

Code: Select all

#> ps aux | egrep -i sound
x    1366  0.0  0.1 840292 22420 ?        Sl   16:52   0:00 /usr/lib/x86_64-linux-gnu/cinnamon-settings-daemon/csd-sound
#> file /usr/lib/x86_64-linux-gnu/cinnamon-settings-daemon/csd-sound
/usr/lib/x86_64-linux-gnu/cinnamon-settings-daemon/csd-sound: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=7c912e59c8c8bc787e10fba2f0c39783ae3ff414, stripped
Thank you :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

Hi shockedquartz, and welcome to the forum.

Run alsamixer in the terminal. You may need to press F6 to select the appropriate sound card after it opens. Hopefully you'll have a column named Auto-Mute Mode. Arrow over to it, then press the down arrow until it says Disabled. Now sound will play from both speakers and headphones. You'll need to use alsamixer to adjust the separate volume levels afterwards, or do like I do and just turn the speakers off when not using them.
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by shockedquartz »

Hello.
I'm trying to make it as automatic as possible for a non nix user.
I can't seem to script this because when I set the headphones to mute, it turns off speakers too.

Code: Select all

#>amixer set Headphone mute
Mutes the master

EDIT:
Looks like setting a level to 0% works find :D
#>amixer set Headphone 0%
Last edited by shockedquartz on Wed Dec 18, 2019 10:00 pm, edited 1 time in total.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

This isn't something I've played with much. When Master is muted this way, are the headphones also muted? If so, what happens when running amixer set Master toggle?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

Also, it's possible you might want to use amixer -D pulse set whatever here
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by shockedquartz »

EDIT:
Looks like setting a level to 0% works find :D
#>amixer set Headphone 0%

Bah, looks like that doesn't work after all. It still messes with the master volum
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by shockedquartz »

MrEen wrote: Wed Dec 18, 2019 10:01 pm Also, it's possible you might want to use amixer -D pulse set whatever here
Pulse doesn't seem to be running
#>pacmd
No PulseAudio daemon running, or not running as session daemon.
I'm VERY new with Mint btw :\
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

Yikes!

What software were you using to listen to sound? Some are very capable of working without pulseaudio, but some aren't.

What happens in the terminal when you run pulseaudio --start?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

Hang on a sec. Are you running these as root?
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by shockedquartz »

No. Just as the login user.
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by shockedquartz »

MrEen wrote: Wed Dec 18, 2019 10:29 pm Yikes!

What software were you using to listen to sound? Some are very capable of working without pulseaudio, but some aren't.

What happens in the terminal when you run pulseaudio --start?
Software to listen to sound? I'm just opening up the applet on the bottom-left that is a sound icon to adjust levels and test.

Code: Select all

user@hostname:~$ pulseaudio --start
N: [pulseaudio] main.c: User-configured server at {f3d85c83fd6e458aba76dbf56f683032}unix:/run/user/1000/pulse/native, which appears to be local. Probing deeper.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

Okay, it appears pulseaudio is running now.

What happens if you enter amixer -D pulse set Headphone toggle? That should toggle mute; i.e. if it's muted, it unmutes, and vice versa.
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by shockedquartz »

MrEen wrote: Sun Dec 22, 2019 1:46 pm Okay, it appears pulseaudio is running now.

What happens if you enter amixer -D pulse set Headphone toggle? That should toggle mute; i.e. if it's muted, it unmutes, and vice versa.

Code: Select all

user@host:~$ amixer -D pulse set Headphone toggle
amixer: Unable to find simple control 'Headphone',0
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

Okay, let's get some specifics. Paste the output of the following terminal commands: inxi -Fxz, aplay -l and amixer
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by shockedquartz »

MrEen wrote: Sun Dec 22, 2019 5:32 pm Okay, let's get some specifics. Paste the output of the following terminal commands: inxi -Fxz, aplay -l and amixer
Yessir. TY for helping :)
The extra inxi stuff I'll put in a DM if you want it. Don't want everything (like NICs/Drives) out on the web.

Code: Select all

>inxi -Fxz
System:    Host: hostname Kernel: 4.15.0-72-generic x86_64 bits: 64 compiler: gcc v: 7.4.0 Desktop: Cinnamon 4.2.4 
           Distro: Linux Mint 19.2 Tina base: Ubuntu 18.04 bionic 
Machine:   Type: Desktop Mobo: MSI model: Z170A SLI PLUS
CPU:       Topology: Quad Core model: Intel Core i5
Graphics:  Device-1: NVIDIA GM206 [GeForce GTX 950] vendor: ASUSTeK driver: nvidia v: 390.116 bus ID: 01:00.0 
           Display: server: X.Org 1.19.6 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa 
           resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 950/PCIe/SSE2 v: 4.6.0 NVIDIA 390.116 direct render: Yes 
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: Micro-Star MSI Sunrise Point-H driver: snd_hda_intel 
           v: kernel bus ID: 00:1f.3 
           Device-2: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Sound Server: ALSA v: k4.15.0-72-generic 
Info:      Processes: 213 Uptime: 4h 02m Memory: 15.63 GiB used: 3.99 GiB (25.5%) Init: systemd runlevel: 5 Compilers: 
           gcc: 7.4.0 Shell: bash v: 4.4.20 inxi: 3.0.32 


>aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1150 Analog [ALC1150 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

> amixer
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 71 [82%] [-12.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 68 [78%] [-14.25dB] [on]
  Front Right: Playback 68 [78%] [-14.25dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 254 [100%] [-0.20dB]
  Front Right: Playback 254 [100%] [-0.20dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Front Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Side',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Line Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Beep',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 63 [100%] [30.00dB] [on]
  Front Right: Capture 63 [100%] [30.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 0 [0%] [-17.25dB] [off]
  Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Rear Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

Don't worry about the missing inxi bits. I was just trying to get an overall feel of what we were dealing with here.

I've seen various posts about the -D pulse flag on the amixer command, and don't understand why yours claims no Headphone simple mixer control when it's clearly there in your amixer output. I've rarely played with the amixer command this way, and I have seen times where it just wouldn't work with the -D pulse flag, so we'll just sidestep that for now.

Try amixer set Headphone toggle. Does that mute the Master column as well? You'll need to open 2 terminal windows to see and test like this with alsamixer running in one, and entering the commands in the other.
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by shockedquartz »

MrEen wrote: Sun Dec 22, 2019 6:03 pm Don't worry about the missing inxi bits. I was just trying to get an overall feel of what we were dealing with here.

I've seen various posts about the -D pulse flag on the amixer command, and don't understand why yours claims no Headphone simple mixer control when it's clearly there in your amixer output. I've rarely played with the amixer command this way, and I have seen times where it just wouldn't work with the -D pulse flag, so we'll just sidestep that for now.

Try amixer set Headphone toggle. Does that mute the Master column as well? You'll need to open 2 terminal windows to see and test like this with alsamixer running in one, and entering the commands in the other.
When I ran the above, it did mute the headphones (and speakers) Event tray (no idea what to call it) is showing the speaker icon with an x on it now.
Output

Code: Select all

amixer set Headphone toggle
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 68 [78%] [-14.25dB] [off]
  Front Right: Playback 68 [78%] [-14.25dB] [off]
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

Okay, follow up with amixer set Master toggle

EDIT: Typed aplay by mistake, corrected now.
shockedquartz
Level 2
Level 2
Posts: 69
Joined: Tue Dec 17, 2019 3:31 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by shockedquartz »

MrEen wrote: Sun Dec 22, 2019 6:09 pm Okay, follow up with amixer set Master toggle

EDIT: Typed aplay by mistake, corrected now.
in 2 CLIs:

Code: Select all

amixer set Headphone toggle
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
and alsamixer shows Master,Headphone, and Front muted (MM).
So the command did mute them all.

But doing it a second time only unmutes headphones and leaves the rest muted lol.. wth
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: 19.2 Cinnamon independant headphones/speakers?

Post by MrEen »

Yeah, notice the Master in the last command. I'm trying to get the speakers to work while the headphones are muted in this case, and it takes some experimenting. By the way, the speakers are most likely the Line column in alsamixer. When we get there, the command will be amixer set Line toggle

My thinking is there'll be three commands to run to switch from speaker to headphones or vice versa:

Code: Select all

amixer set Headphone toggle
amixer set Line toggle
amixer set Master toggle
We might need to include Front in the mix as well, not sure yet.
Locked

Return to “Sound”