Touchpad not working after sleep

The recover from suspension/sleep mostly work (hybrid suspension). When i wakeup my pc the wifi is off, but all i need to do is click the icon. The main issue is the disabled touchpad.

Browsing around i’ve found the working command to re-enable it:

sudo modprobe -r psmouse

sudo modprobe psmouse

any way to re-enable the touchpad (and if possible the wifi) after sleep with some script or something?

Update: following a (totally not ai) guide, ive added a “restart-touchpad” script in /lib/systemd/system-sleep/

instead of his command i used the one i knew works

if [[ $1 == post ]]; then
    sudo modprobe -r psmouse
    sudo modprobe psmouse
fi

with right click i select it as exeguible. After a couple of restart somehow now my touchpad works so i think i didn’t screw up too badly.