I have Ubuntu studio 20.10 installed alongside windows on a Dell precision 5540 laptop. I have been running this setup for a couple of months now and sleep mode has always been working, triggered by lid close, by manual activation from the power menu or when idling for longer periods on battery, as set up in the power management settings.
A couple of weeks ago, the laptop suddenly would not go to sleep anymore. I discovered the issue since it would spin the fans and run hot when transported in a bag from/to work. When manually starting sleep mode from the power menu, the screen goes black shortly to then resume presenting me with the login screen like after a reboot (only much quicker than a reboot). I am no longer logged in then and my session with all open documents and windows is lost.
I had the issue resume to normal after a software update but now it has reoccurred and I don't know what to do. Having a laptop run out of battery because it heats my bag is not particularly useful. Since I am not a very experienced user, I would appreciate any detailed guidance to find the root of the evil...