07-07-2017, 01:58 AM
(07-06-2017, 02:27 PM)jordanjay29 Wrote: Just ran into this last night and had to do this workaround. Can't wait for an OS level fix.
I don't know if this will be happening anytime soon... the 'normal' detection / software response methods rely on ACPI, etc, and are thus not present. There's no handy kernel event that udev can hook into either.
So far, there are options. Run this command manually to mute the external speaker on demand:
amixer -q set "External Speaker" mute
and the corresponding
amixer -q set "External Speaker" unmute
to, um... unmute? the external speakers.
Or in alsamixer, go to the far right, and you'll find the external speaker volume / mute option.
In the mean time, I have this proof of concept that I need to look at turning into something a bit more... palatable in operation for inclusion into the images... Basically download it, make it executable (chmod +x [script-name]) and run it. It only does it's 'magic' whilst running, as it isn't a background service. You could probably stuff it in /etc/rc.local in a pinch, with an '&' after it so it runs in the background. Note the 'Raw' button on the github page if you want the downloadable version.
https://github.com/pfeerick/pine64-scrip..._detect.sh