If you don't want to look into kernel changes, I found that this answer to a similar question solved the problem for me.
Copying here:
I enabled hibernation some month ago in my Ubuntu system, now 20.04, but now as in the past I had some issue.
So in this last event I found this in "dmsg" during hibernation procedure:
Freezing of tasks failed after 20.005 seconds (0 tasks refusing to freeze, wq_busy=1)...
I solved with increasing the freezing timeout from 20 sec to 30 sec:
echo 30000 > /sys/power/pm_freeze_timeout
and made I it permanent with sysfsutils and after writing
power/pm_freeze_timeout = 30000
in a file in the /etc/sysfs.d directory