0

I have asus chromebox which I installed Ubuntu 14.04.2 on.

When I connect headphones, I can see them in the volume control application, but they are not switched to automatically, when I select the headphones in the volume control app, i can hear just fine. When I disconnect the headphones the sound goes back to HDMI.

I have tried to change alsa-base.conf and everything else I could find online. Couldn't find a way to set it as default in pavucontrol (even when I set it as default here, it doesn't change anything) or alsamixer. Here is all the info I could find from my chromebox that might help.

alsa-base.conf

alsa-info.txt

Anyone has any ideas?

Shiran
  • 121
  • 7

1 Answers1

0

Since I couldn't find a way to do this, I wrote my own script.

I set it to run from /etc/rc.local (as local user) in the background so it would run when the computer is restarted.

The script checks if the headphones are connected or not (run "amixer -c 0 contents" once headphones are connected and once not and find under which numid the headphones are). If the connection status has changed, it changes the default sink (I have only two drivers so I wrote changeDriver 1 and changeDriver 0, but it might be in a different order on different computers).

It runs infidelity with 2 seconds sleep in between.

Script

Shiran
  • 121
  • 7