Credit to the original poster: https://esc.sh/blog/nvme-ssd-and-linux-freezing/ Recording a copy here for personal use as I distro hop a lot and excitement with distros on a laptop that suffers from this issue.
nvme_core.default_ps_max_latency_us=5500
First of all, figure out if you are using Grub or systemd boot. If you are using Pop OS!, you are most probably using systemd-boot. I believe Ubuntu is still using Grub2, please do your research.
Edit /etc/default/grub
as root (You can use your favourite text editor). If you don’t have one, do sudo gedit /etc/default/grub
Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT
and add the parameter there. Your line should look like this now (Make sure it is a single line with no line break)
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvme_core.default_ps_max_latency_us=5500"
And update grub using
sudo update-grub
Find your loader configuration. For example, Pop OS! conf path is
/boot/efi/loader/entries/Pop_OS-current.conf
Edit the file and find the line that starts with options and add the parameter to the end of the line. It should look like this after adding the entry
options root=UUID=350fc3dc-9ed1-440d-9a8f-922ee8c6511f ro quiet loglevel=0 systemd.show_status=false splash nvme_core.default_ps_max_latency_us=5500
And reboot. That’s pretty much it.