Auto suspend while working

Just had a nasty surprise. Working away typing madly on my big monitor and in the corner of my eye I see a message flash past on the laptop screen, something about auto suspend. Then my screen goes black, as if I had been away for 5 minutes. I hit enter, and get the login prompt, but this is not the screen saver login, this is oh you have been logged out and would like to start working. All the windows I had open were gone and I tend to have a lot of windows in use with reference material, photos and so on as well as the main window where I am working. Thank goodness for auto save, so I didn’t lose more than a few minutes of work, but why was I logged out? Why didn’t I get a chance to save my work? Doing some searching on gnome and auto suspend and so far it sounds awful. I have turned off auto suspend, but even that may not help from what I have read. So a heads up everyone, and if anyone has experience or even better a fix or a workaround I would love to hear it.
Cheers! Amarula

Tried several ways of turning off suspend, no luck so far, still having unpredictable black screen logout from auto suspend. Found this reference to suspend issues but no solution:
Any help would be much appreciated.

Please provide more details, what OS, what DE, did you updated, etc…

Just to confirm I encountered this nasty bug as well more than a few times, but as of a couple weeks ago it hasn’t happened again. I have the Librem 13 v 3.

edit: scratch that it just happened to me again, lost all my tabs/windows as if I did a full reboot.

Hi mladen, I have the Librem 15v3, Kernel: 4.16.0-1-amd64 x86_64 bits: 64, Desktop: Gnome 3.28.2, Distro: PureOS. I have not compiled or installed a new kernel.
I have regularly installed the gnome and other software updates as they become available. I have installed aptitude, using it to build wine for WoW, otherwise not doing any software development.

Auto suspend happened again last night, this time even stranger: I was logged out but not to the login screen, just a shadow gray screen with a mouse pointer. Hard power down and reboot…

Does it happen while on battery or AC?

These have all happened while plugged into AC (with external wireless keyboard and trackball, and connected to my big screen monitor).

Merry Christmas everyone, it’s been a while so I thought I would post an update. I am still occasionally seeing the auto suspend, but since I started doing an almost daily reboot, it is very infrequent. And I don’t know if it is related or not, but it seems to happen most often when I am using Open Office.

Librem 15, recently put into service - constant AC power; using an external monitor as the primary display with the laptop display off; the laptop is connected to an 8-port KVM switch (one monitor and keyboard can access up to 8 separate systems). No problem switching to other systems and back, but if I leave the LIbrem 15 for a while and come back, the laptop screen is black (expected) as is the external monitor screen (unexpected). I have power settings set so that there is no suspend or display sleep / power off allowed while on AC power. I thought it was because the system as going into a security locked-screen mode without displaying any locked screen, and so I would guess to enter my login password, and sometimes this actually this seemed to be working in the early going, but I later found that unplugging the HDMI cable going to the external monitor brings the laptop screen back on and the system is not at a lock screen. I can then plug the HDMI cable back in and the external monitor comes back on but in a much lower resolution, a visit to the Display Settings allows the external monitor to be adjusted back to the desired resolution. I will experiment when the screen goes black again to see if maybe it’s just that you need to hit a key and then wait a while, maybe the external monitor will come back on but it’s not instantaneous? Or maybe it’s an HDMI sync issue after leaving the system on but untouched for a while. To this point - I have not seen the system auto-suspend, so thi may be a different situation than the original post, but it seems sort of similar in terms of the black screen so I thought I’d post it here.

Well…a bit more info. Unfortunately, I tried several things simultaneously so no clear solution, but things do seem to be working now. Everything functions OK with primar laptop display set to off and running on the external monitor via the HDMI port.

a) I started playing around with some lock screen software in the Software center. Nothing changed.
b) I neglected to mention that I normally run xfce, which is what I was running when I wrote the original post. I switched back to Gnome at login, made some adjustments to lock screen settings where available, no discernable solution there. However, I did manually install xscreensaver and set it to autostart using the solution found in #8 on this page:
c) Rebooted system.
d) In xfce, used the Screensaver utility and adjusted settings to give me a 10-minute screensave display followed by screen lock. I also noted that the the xfce panel shows a Lock Screen option to manually lock the screen.
e) Left the system for an hour.
f) Came back and when a keypress is made the XScreenSaver login screen comes up.

So - I don’t have the sequence to clearly show why it seems to be working now. Perhaps I just didn’t hit on the right sequence of settings to enable the screensaver with lock, or maybe the install of xscreensaver provided the hook to allow it to happen as I expected.

They really need to provide proper follow ups with issues like this. For the record my Librem 13 V3 also goes on suspended state while working on it, and when I log back in all my work is gone as if I rebooted the laptop. This is a serious issue as not all programs have an auto save feature. I would appreciate to see the Purism team show some actual support for this.

After going down a few other wormholes around the installation of xfce, I decided I had reached a point off no return and thus reinstalled PureOS from the installation USB drive. It pointed out to me that something seemed “off” with the factory install. After reinstall, screen lock was available and worked perfectly via the stock gnome interface, whereas on the factory install it was not. Other things that seemed to be problematic were not issues at all after reinstall. That said - I haven’t yet reinstalled the xfce4 package, and I may wait a while to do so until I am sure all is working well as-is. Long story short - it seems as though regrouping and going back to a known good point via the reinstall, and then proceeding more systematically when adjusting features, is the way to go.

One more comment - I have preferred xfce for a long time, on many distros - but using the gnome interface on this Librem 15 is pretty sweet. I may stick with gnome for a while.