No sound after sleep mode

Ok thanks this gave me part of the solution: github has (almost) all the answers.
Long story short, if anybody has the same problem:

1 - put back sound on your macbook using this driver
work of leifliddy

2 - solve the bugs caused by sleep mode (except for sound - but wait) by typing (under sudo su, I dont know better)

echo 0 > /sys/bus/pci/devices/0000:01:00.0/d3cold_allowed

3 - solve the “no sound after sleep mode” issue with this method
(I type these 3 lines:

$ echo s2idle | sudo tee /sys/power/mem_sleep
$ cat /sys/power/mem_sleep
[s2idle] deep

This solved my problems, even if the speakers sound is a bit downgraded now. My ONLY PROBLEM now is that I absolutely fail at making these commands automatic on boot, I tried multiple times with cron and stuff but I miserably fail. I need a noob-friendly solution if there is one.

Hope this helps somebody and also I hope somebody can help me with the automation ! Cheers and thanks