I have forgotten to write, that the script must be executable, so sudo chmod +x /etc/pm/sleep.d/20_custom-ehci_hcd
once it is created.
I have forgotten to write, that the script must be executable, so sleep.d/ 20_custom- ehci_hcd
sudo chmod +x /etc/pm/
once it is created.