After searching for quite a while, I have come up with a solution that works well for me and might help you too:
The code is mostly taken from here.
Get the code
There exists a python script that can reactivate the headphone jack. This code is taken from ektor5 on GitHub. You need to download the script, place it somewhere where your system finds it and make it executable. You can do all this with this line:
sudo wget https://raw.githubusercontent.com/ektor5/init-headphone/master/init-headphone -O /usr/local/sbin/init-headphone && sudo chmod +x /usr/local/sbin/init-headphone
init-headphone script needs dependencies that can be installed with:
sudo apt-get install python-smbus
Add grub flag
Also, your kernel has to be started with an additional flag enabled. You can do this by editing the file ''/etc/default/grub''. Alter this line
After that run
Load modules at start up
Additionally, the script needs to modules to be loaded. Namely ´i2c_dev´ and ´i2c_i801´. These can be loaded at runtime with
You can now test whether it works, by running ´sudo init-headphone´.
To automatically load the modules on startup, add the following lines to ''/etc/modules'':
Create startup script
Last of all, we want the script to run automatically, when our computer reboots or returns from suspension. To do so, place the following script in ´/etc/pm/sleep.d/´.
sudo gedit /etc/pm/sleep.d/init-headphone
Add the following lines
if [ ! -x /usr/local/sbin/init-headphone ]; then
case $1 in
And don't forget to make the file executable
sudo chmod +x /etc/pm/sleep.d/init-headphone
I hope this helps, let me know if you have any problems.