System freezing after waking from sleep

Sometimes when I close the lid on my laptop and my system goes to sleep, when I lift the lid again to wake the system, it freezes on the login screen and I have to restart. Anything I can do to fix that?

ubuntu 18.04