Linux Mint 19 Desktop won't lock after suspend

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
jtl0125487
Level 1
Level 1
Posts: 1
Joined: Wed Jul 25, 2018 9:02 am

Linux Mint 19 Desktop won't lock after suspend

Post by jtl0125487 » Wed Jul 25, 2018 9:19 am

Hello,

I have a fresh install of Linux Mint Cinnamon 19 x64 with verified ISO.

When i put the computer to sleep with Menu > Quit > Suspend for example, it goes to sleep. But when i wake it up, its unlocked.

Pick of settings that normally affect this is attached. Am i missing something? Is there a known way to fix this?

There is a similar thread from another member here viewtopic.php?f=206&t=273611&p=1501451& ... r#p1501451

Also, I'm not sure if any of the following is related:

I get asked to login twice on every boot. After the first time the screen looks like it refreshes and then it ask me again. This is on every boot.
I can't get the system to remember my session after hibernation. Each time i hibernate and then resume, it resumes with a new session. I've updated grub with the UUID of the swap partition found with blkid, i've updated "/var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla" with the following:

Code: Select all

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes

I even tried updating both parts of GRUB (replacing SWAP-UUID-HERE) with uuid of swap partition

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=SWAP-UUID-HERE"
GRUB_CMDLINE_LINUX="resume=UUID=SWAP-UUID-HERE"
I also made sure the following file had the correct id of the swap partition:
/etc/initramfs-tools/conf.d/resume

Also not sure if it helps to know but my OS is encrypted and my home directory is encrypted.
Attachments
nolock_Screenshot from 2018-07-25 09-09-51.png

fromWinToLin
Level 2
Level 2
Posts: 78
Joined: Thu Nov 19, 2009 11:53 am

Re: Linux Mint 19 Desktop won't lock after suspend

Post by fromWinToLin » Thu Jul 26, 2018 9:38 am

I have experienced this on fresh installs of the 18.x series, and now Mint 19.

This has been a longstanding issue as far back as 2016, which is tricky to pinpoint the cause, let alone apply a fix. There are likely many variables at play, so one "fix" to the cinnamon-screensaver package does not correct the bug.

https://bugs.launchpad.net/cinnamon-pro ... ug/1652489

viewtopic.php?t=236157

viewtopic.php?f=206&t=273611&p=1501451& ... r#p1501156

There are even reports of it on GitHub.

I cannot provide any logs (again), because I had to reboot my system so I wouldn't be stuck with this serious security issue. However, over time it is likely to happen again. I think many things are inter-related: issues with the screen locker, suspend, Cinnamon (and memory leaks). I also notice that the longer I use my Mint Cinnamon system without rebooting (or logging off), the more of a delay I get with the screen saver and being prompted for a password to unlock the session. It's as if it "creeps" up on you slowly, until it reaches the point where you cannot lock the screen anymore, or it will simply allow access to your desktop without any password needed. Sometimes if I try to suspend during this "peak", the system will remain unresponsive for roughly 20 seconds before it "times out" and just gives up: bringing me back to an unlocked session again.

It's all very strange for a simple concept of locking the screen. Never, since 2005, have I had any remotely similar issue with KDE, GNOME Shell, Xfce.

fromWinToLin
Level 2
Level 2
Posts: 78
Joined: Thu Nov 19, 2009 11:53 am

Re: Linux Mint 19 Desktop won't lock after suspend

Post by fromWinToLin » Thu Jul 26, 2018 9:47 am

I also experience the issue described here: https://github.com/linuxmint/cinnamon-s ... issues/288

Again, something is very wrong with Cinnamon / cinnamon-screensaver, when compared to other alternatives: xscreensaver, GNOME Shell, or KDE. The problem described in the GitHub report doesn't always happen, and it usually "creeps up" over time, until you eventually reboot the system or logout completely. I will notice a delay. Then much later on, a longer delay. Then maybe after some more days pass of normal usage, an even longer delay, to the point where I'm wondering "Where is the password prompt?" Then as more time passes it can either be a very long delay, an unresponsive system, or access to the entire unlocked session without requiring a password at all!

fromWinToLin
Level 2
Level 2
Posts: 78
Joined: Thu Nov 19, 2009 11:53 am

Re: Linux Mint 19 Desktop won't lock after suspend

Post by fromWinToLin » Thu Jul 26, 2018 9:55 am

Looks like this bug report, back from the Mint 18.x series, has been revived again for 19 (Tara).

https://github.com/linuxmint/cinnamon-s ... issues/194

Based on this trend, and assuming even more people are affected (who simply don't have a GitHub account or just use another distro now), I don't think a fix will come any time soon. I will try to provide logs when possible and I have the opportunity and time. However, I did provide logs last time and nothing really came of it.

This isn't an aesthetic issue or "nice to heave feature." This is a deal-breaker. A screen locker should be rock solid, fast, and 100% reliable.

fromWinToLin
Level 2
Level 2
Posts: 78
Joined: Thu Nov 19, 2009 11:53 am

Re: Linux Mint 19 Desktop won't lock after suspend

Post by fromWinToLin » Fri Jul 27, 2018 2:25 pm

I am currently running cinnamon-screensaver in debug mode (--debug). Unfortunately, I do not know how to output it directly to a text file, even when using >> or tee. If I accidentally close the terminal window, I will need to redo the process all over again. If anything comes up, hopefully I will have something new to submit to the bug report.

Does anyone know of a way to replace cinnamon-screensaver with something else, such as xscreensaver? Not simply the packages, but to invoke xscreensaver any time a "lock" or "suspend" command is issued.

fromWinToLin
Level 2
Level 2
Posts: 78
Joined: Thu Nov 19, 2009 11:53 am

Re: Linux Mint 19 Desktop won't lock after suspend

Post by fromWinToLin » Fri Jul 27, 2018 4:29 pm

I've managed to make one of the issues (not properly locking the screen when suspending the computer) 100% reproducible on Linux Mint 19 Cinnamon with the following package versions:

Code: Select all

cinnamon 3.8.8+tara

cinnamon-screensaver 3.8.2+tara

This might not address all the underlying causes, but it's a start! Perhaps the developers can use this to further investigate the code that needs to be rewritten. I will post this finding on the GitHub bug reports: https://github.com/linuxmint/cinnamon-s ... -408531267

Here is how I can trigger this issue, and here is the text from --debug mode:

Code: Select all

Calling XResetScreenSaver
manager: user activity, waking
manager: not locked, queueing idle deactivation
CsScreen dispose
CsScreen finalize
couldn't grab keyboard
couldn't grab keyboard
couldn't grab keyboard
couldn't grab keyboard
Nuking focus
couldn't grab keyboard
couldn't grab keyboard
couldn't grab keyboard
couldn't grab keyboard
couldn't grab mouse
couldn't grab mouse
couldn't grab mouse
couldn't grab mouse
Calling XResetScreenSaver


Here is how I discovered a way to 100% reproduce this security issue:

1) Make sure you have it set to suspend on closing the laptop lid and to lock the screen upon suspend and when the screensaver starts. Settings > Screensaver > Settings and also Settings > Power Management > Power

2) Create a shortcut key / key combination for suspending the computer to RAM. If you have it set to suspend upon closing the lid, it will behave the same way if you follow the next steps.

3) Right-click somewhere, such as on the taskbar or a file or the desktop itself, in order to bring up a context menu. Do not do anything else with the mouse. Leave the cursor where it is.

4) Now close the laptop's lid. Wait a while, and you will hear the system go into suspend mode.

5) Now open the laptop's lid and you will hear the system wake up.

6) You have access to your entire unlocked session, completely bypassing any password dialogue or lock screen!

This can also be done via the shortcut keys, but it requires a more unlikely (though not improbable) timing of events. I had success exploiting the issue: if your press the shortcut key to suspend, and immediately bring up any context menu (or any such menu to steal the cursor's focus), you can reproduce the issue. However, the timing needs to be precise, so it's less likely to happen, yet it can still happen by mistake.

This still does not explain why there is a general degradation of Cinnamon over time, and why the screen locker gets slower and slower over time. They might be separate issues, or perhaps inter-related with this one. I hope this post helps the developers narrow down their search for the code responsible for this vulnerability.

computernut
Level 1
Level 1
Posts: 5
Joined: Tue May 17, 2016 8:44 pm

Re: Linux Mint 19 Desktop won't lock after suspend

Post by computernut » Sat Jul 28, 2018 4:45 pm

Hello,

I will not be much help in diagnosing the issue. I performed a new install of 18.3 into a new partition and it resolved my issues. A few months later I built a new system and installed 18.3 there also with no issues. It's a AMD Ryzen 1920 water cooled with 64 GB of RAM and an Nvidia 1050 GPU.

I was a little nervous about the Nvidia GPU as they have tended to be higher priced and I hadn't bought one since the 90's. I previously was using AMD GPUs and before that Matrox GPUs.

It's nice having the Ryzen take everything I throw at it and beg for more. LOL

That will change in 4 or 5 years down the road, but it is nice now compared to the dual core 2.8 Ghz and 4 GB of RAM in the previous PC.

kevso
Level 1
Level 1
Posts: 19
Joined: Sat Jul 12, 2014 6:42 am

Re: Linux Mint 19 Desktop won't lock after suspend

Post by kevso » Mon Sep 02, 2019 8:01 am

jtl0125487 wrote:
Wed Jul 25, 2018 9:19 am
Hello,

I have a fresh install of Linux Mint Cinnamon 19 x64 with verified ISO.

When i put the computer to sleep with Menu > Quit > Suspend for example, it goes to sleep. But when i wake it up, its unlocked.
I'm having this issue too (also on LM 19 x64, but MATE rather than cinnamon). (I don't have the double-login problem you described, though.)

The bug occurs when my laptop is:

- plugged into a Medion MD 20731 external monitor via VGA cable

The bug does *not* occur when it's:

- plugged into an Acer K272HL external monitor via VGA cable
- not plugged into an external monitor at all

In those latter two cases, it's correctly locked when I wake it after suspending.

My system is an Acer Aspire E 15 (E5-573-55U8) with Intel HD Graphics 4400.

I'm ignorant of the internals, but it surprised me that the model of external monitor could affect a bug like this (especially over VGA, which I always thought was a relatively "dumb" connection for the most part.)

Post Reply

Return to “Cinnamon”