Hi There !!
There has been a problem with my earphones after since I have pressed the mute button.
I am new to i3 and am adapting slowly with the environment. The Fn + F2 mutes my audio but I have to write something in i3 configuration to un-mute this thing.
BTW I tried wireless headset and they worked just fine…
Seems like I stumbled across problem I am unable to find on the Internet…
Thanks in advance for reading this far and also for the help…
Have a great day
Share your i3 config.
Hi @Unbeknownst, and welcome!
I do not use i3, so there might be another way. But my first thought with this kind of problem is, you can see if pressing the mute button on the headphones sends a signal to the PC, with xinput
and then creating a udev
rule for it.
I don’'t know the exact steps and commands, as I’ve never done it, but according to me that is thee steps.
Please share the output of:
xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ITE Tech. Inc. ITE Device(8910) Keyboard id=11 [slave pointer (2)]
⎜ ↳ MSFT0001:00 06CB:7F28 Mouse id=14 [slave pointer (2)]
⎜ ↳ MSFT0001:00 06CB:7F28 Touchpad id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Integrated Camera: Integrated C id=10 [slave keyboard (3)]
↳ ITE Tech. Inc. ITE Device(8910) Wireless Radio Control id=12 [slave keyboard (3)]
↳ Ideapad extra buttons id=13 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=16 [slave keyboard (3)]
↳ ITE Tech. Inc. ITE Device(8910) Keyboard id=17 [slave keyboard (3)]
You have no keybinding to control audio. Add these and reload the config file with Mod + Shift + R. Works with both pulseaudio and pipewire. Make sure you have alsa-utils
installed:
# Multimedia Keys
# volume
bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+
bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%-
# gradular volume control
bindsym $mod+XF86AudioRaiseVolume exec amixer -D pulse sset Master 1%+
bindsym $mod+XF86AudioLowerVolume exec amixer -D pulse sset Master 1%-
# mute
bindsym XF86AudioMute exec amixer sset Master toggle
Edit - Volume is controlled by ‘Volume Icon’ applet from system tray. So also comment out this line → exec --no-startup-id volumeicon
and log out and log back in.
Tip:
When providing terminal output, wrap the text in three (3) backticks before and after the pasted text. Like this:
```
pasted text
```
This will just cause it to be rendered like this:
Diam felis
morbi tincidunt
et nec interdum magna
orci
urna nec nulla
tempus ac sollicitudin
Instead of like this:
Diam felis morbi tincidunt et nec interdum magna orci urna nec nulla tempus ac sollicitudin.
Thereby improving legibility and thus making it easier for those trying to be of assistance.
is this with the headphones connected or disconnected?
Edit:
P.S.: Thanks for this edit, it makes things much easier.
both disconnected… just wait
I tested with both connected
I didn’t find difference when connected
Well, please share connected as well, then. I’m presuming the headphones are USB? Else, the mute wouldn’t have been able to turn off with a command in the terminal.
Here You gooo
xinput ✔
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ITE Tech. Inc. ITE Device(8910) Keyboard id=11 [slave pointer (2)]
⎜ ↳ MSFT0001:00 06CB:7F28 Mouse id=14 [slave pointer (2)]
⎜ ↳ MSFT0001:00 06CB:7F28 Touchpad id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Integrated Camera: Integrated C id=10 [slave keyboard (3)]
↳ ITE Tech. Inc. ITE Device(8910) Wireless Radio Control id=12 [slave keyboard (3)]
↳ Ideapad extra buttons id=13 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=16 [slave keyboard (3)]
↳ ITE Tech. Inc. ITE Device(8910) Keyboard id=17 [slave keyboard (3)]
It’s wireless actually I had mentioned that
and earphone is getting connected via headphone jack 2.5mm
Edit:
I tried that … the above lines which you told me to add to configuration files
I uncommented it becuase before it was working the same with a difference
It use to show a pop up to show me the bar of the volume I am in…
Thanks
@Unbeknownst See https://archived.forum.manjaro.org/t/i3-mute-unmute-issue/135558
If the suggested method doesn’t work then revert back to the original and change exec --no-startup-id volumeicon
→ exec --no-startup-id sleep 5 && volumeicon
and reboot.
Don't mind me.
This:
makes me think this
Is it. So please do the following:
- Run the following command in a terminal:
xinput test 12
-
While it’s running, press the mute button on the headset and see if something appears in the terminal
-
If it does, provide it here as normal terminal output.
Edit:
Never mind me. carry on with what you’re busy with. I COMPLETELY misunderstood, thanks to my own over-eagerness. Disregard what I said completely.
I am using mute button from keyboard and both my earphone and headphone has no any mute button…
and using Fn + F2 does not do anything whilst running xinput test
Hi there !!
@Mirdarthos it okay
thanks actually for suggesting me things
Remember every step is always worth for learning so carry on
I wish you a very good day
a Quick search led me to this page, where one answer states:
I had this issue on my ThinkPad T450s (Fn + F4 is toggle mic) on Ubuntu 18.04 and adding this line to my i3 config solved it:
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute 1 toggle
So perhaps something similar?
Edit:
I believe I’ve found something that can work, Look at: https://faq.i3wm.org/question/3815/execute-command-when-mod-is-pressed.1.html:
In my i3 config I put:
bindcode 133 exec my_command
Where ‘133’ is the keycode of my Mod key, then I can run my_command each time it’s pressed. So I can update my i3blocks bar by putting:
bindcode 133 exec pkill -SIGRTMIN+1 i3blocks
in the config, then all the blocks with a signal of 1 will be updated.
I believe this could be modified to suit your needs…
Edit 2:
Look at
https://www.reddit.com/r/i3wm/comments/2wbv8x/question_how_to_manage_audio_with_i3/
It really means a lot
I will try once and let you know since I have no idea what is the keycode of my mod key in keyboard
Edit
Man I am going crazy looking at your help and also your bio
Edit again
The reddit one worked for me… I was using the alsamixer instead of using pavucontrol
thanks a lot
Look you solved it… So its okay… don’t call over-eagerness again… I see it as a beautiful enthusiasm inside you
Try and see if this helps finding it:
sudo showkey -k
Edit:
Yeah, I tend to drive people crazy. Sorry.
Edit 2:
Also look at xev
:
https://www.x.org/releases/current/doc/man/man1/xev.1.xhtml
For finding the key code.
Reference:
https://www.reddit.com/r/i3wm/comments/aur60q/program_to_find_out_keyboards_keys_names/
Very happy for you!
awwwwwwwwwwwww shucks!