You are not logged in.
So I have a laptop running arch and I tend to plug and unplug my headphones on a rather frequent basis, my problem is that I want the built-in speaker to mute on headphone plug-in and the headphone channel to unmute, then on headphone unplug I want the headphone channel to mute and speaker chanel to unmute.
I have searched the internet and the wiki without success, I tried running udevadm monitor in hope of seeing what the plugin event was so I could at least have a starting point but it produced nothing.
Does anyone have anytips or solutions? It should be a fairly simple script/command to write but I have no idea where to even look.
Thanks in advance,
Nashod.
Offline
If you are using Pulse Audio and it is a USB or bluetooth headset it can be configured to automatically switch to newly connected devices, see https://wiki.archlinux.org/index.php/Pu … SB_headset
Otherwise I can imagine you will be able to do this with a udev rule, especially if it is a USB
Not sure if any of the above will work if you plugin a headphone into the analog jack, though.
Offline
If you are using Pulse Audio and it is a USB or bluetooth headset it can be configured to automatically switch to newly connected devices, see https://wiki.archlinux.org/index.php/Pu … SB_headset
Otherwise I can imagine you will be able to do this with a udev rule, especially if it is a USB
Not sure if any of the above will work if you plugin a headphone into the analog jack, though.
thanks for the help but it's alsa with an analog jack, my main problem is that I can't figure out what the udev event is as the udevadm monitor command does not show any events on plugin/plugout of the headphones
Offline
Does anything change in the /proc/asound/ tree when un/plugged? If you use a hda compliant sound card: I would argue you have to periodically read the status of certain registers with hda-verb. What codec is the sound card using? Check its datasheet for more information.
Offline