I’ve used Manjaro for some quite time now. In the last 2~3 weeks I started experiencing an issue. After using the computer all morning, I lock my screen and leave the computer in standby for some time (1 hour for example). When I come back, the screen is turned off and gets activated with a key press or mouse movement. I then login on my session and everything is normal for some seconds. The system then logs me out, terminating the session and sending me back to the login screen. After logging in again, I get a fresh new session.
This bothers me because I lose everything I had opened in the previous session. Not sure exactly what is causing it. I use a laptop but I have all the power options off while plugged in.
I’m afraid you are correlating three unrelated things. First of all, the fact that you have to enter your password to unlock the screen after you’ve left the keyboard unattended for a while is not a login. You are still logged in, but it is simply a screen locker.
Secondly, the phenomenon that follows later is not the system logging you out either, but instead it is your X11 session that’s crashing for some reason, and by default, the system will then try restarting the X11 server. Of course, that does mean that…
you are forcefully logged out (because your GUI session has committed suicide); and
you will have lost whatever it is you were working on.
So what we have to figure out here is what causes your desktop to crash. And that could be any number of things, including but not limited to third-party applications ─ including games.
Alas, given that our crystal ball is currently undergoing maintenance, only you know what it is that you were doing and what may have triggered that crash.
If you want us to help you fix the problem ─ if it is fixable ─ then you’re going to have to provide us with more information. For starters, you haven’t even mentioned what desktop environment you’re using.