Ubuntu 20.04.3 LTS freezes, requiring a hard reboot

Solution 1:

From the comments...

Lenovo Legion 5 17IMH05H with Nvidia NV168 graphics card.

Note: X server was crashing with nouveau.

Note: memtest ran fine.

Note: BIOS updated to efcn52ww.

Updated to Nvidia driver 470 and so far it's running fine.

Also do:

sudo apt update

sudo apt upgrade