- This is the service fixing the audio; Now for the one that fixes the idleness:
sudo nano /etc/systemd/system/ionsoundsleep.service
where we paste:
Description=Custom Sound Sleep Fix
[Service]
Type=idle
ExecStart=/bin/bash /home/salvaedeus/Documents/MyScripts/audiofix.sh
[Install]
WantedBy=suspend.target```
11. Give both services permission:
``` sudo chmod a+r /etc/systemd/system/ionsound.service
sudo chmod a+r /etc/systemd/system/ionsoundsleep.service```
12. Reload daemon by:
```sudo systemctl daemon-reload
sudo systemctl enable ionsound.service
sudo systemctl enable ionsoundsleep.service
sudo systemctl start ionsound.service
sudo systemctl start ionsoundsleep.service```
13. Sound should be working at this point. If you use PulseAudio (which personally for my system I find it not working), you can try the additional step of:
``sudo nano /etc/pulse/default.pa`` ; find load-module module-suspend-on-idle and comment it out by adding ``###`` in front of it
``sudo sed -i 's/load-module module-suspend-on-idle/### load-module module-suspend-on-idle/' /etc/pulse/default.pa`` this should also work, should do the same thing (commenting suspend on idle out). If this file is absent, it probably means you dont use PulseAudio and you dont actually need to do this step.
Sound should be working at this point, if not, try ``alsamixer`` > F6, select the soundboard (probably at this point its ``snd_soc_skl_hda_dsp``) and make sure things that shouldnt be muted arent muted. Pavucontrol seems to mess this setup.
Hope this helps anyone. As I said, this is mostly for Samsung laptops.