Ubuntu 24 instability, random reboots

If you are running Ubuntu 24 and on your thinkpad laptop happen frequent random reboots,
bluetooth is not working correctly and other stupid things happen, one source of the problems
can be an incorrectly installed NVIDIA driver if your laptop contains an NVIDIA graphics cards.

Reinstalling the driver or switching to the open driver can fix the problems.
One way to diagnose the problem is trying if the nvidia-smi tool can communicate with the graphics card.

If the communication does not work, it is an indication that the driver is not installed correctly. It seems that
updating to a newer kernel (which frequently happens during updates) can lead to a corrupt NVIDIA driver
installation.

For me this happened with an Thinkpad P14s and an A500 graphics card.
Second try - if installing the driver does not fix the problem, 
sudo prime-select nvidia
can help also.

You have to reboot for the settings to be effective. This will use only the NVIDIA card for rendering and not the intel card. If flatpaks do not run afterwards, run:

flatpak update