I use Ubuntu 20.04 with i3wm. My laptop keeps shutting down randomly. To check if it was a problem with i3 or some program I was starting with i3, I switched to the default gnome environment. But there too, I kept randomly receiving the dialogue box which asks me to confirm if I want to shut down.
How do I troubleshoot this?