How to unmute headphones by default when plugged into MacBook Pro? Each time the mac is turned on, and the headphones are plugged in, they are muted by default on my MacBook Pro. I need to unmute them every time in System Preference-> Sound -> Output. I have thus two questions:

1) Do you know any way to automatically unmute the headphones when plugged into the mac ? A terminal command or any other manipulation ? 

2) Is the behavior of my Mac normal ?

Thanks for your help !
1) 
You can use a third-party app like Keyboard Maestro or EventScripts to trigger a volume setting script whenever you plug your headphone.

For exemple, with EventScript:


Click on Open Folder from EventScripts menu in order to open the scripts folder.
Add the script you want to be triggered, in your case something like do shell script "osascript -e 'set volume 1'" (note that set volume function works from 0 to 7, 0 being mute and 7 maximum volume).
Click on Choose Script from EventScripts menu and select the script to be used.
Add the event Headphone connected.


See my own setup as exemple to quit or launch Boom whenever my headphone or my bluetooth device is found:



2) I don't think this behavior is normal, your Mac should remenber the last volume setup you had with headphone... You should try to reset the PRAM setting, it may work :
shutdown your Mac and restart it while pressing and holding option +  command ⌘  + P + R