Mint + KDE – Identify Source of Phantom Screen Locker

kde-plasma-5kubuntulinux-mintlock-screenscreensaver

Background

I'm experimenting with running KDE on Linux Mint 19 (no longer offered). I followed the instructions in this post to add the Kubuntu KDE desktop to Mint:

  • Started with a fresh install of Mint 19 Mate on a USB hard drive connected to a laptop.
  • Updated APT repo cache.
  • sudo apt install kubuntu-desktop kde-plasma-desktop kscreen

It's not a complete KDE install, mainly the Plasma DE and a couple of standard KDE utilities, like Dolphin. Kubuntu is v18.04 and Plasma is v5.12.

I then uninstalled the Mate DE (but not every last vestige of Mate-related stuff; I don't know what Mint includes in the Mate bundle, and didn't want to leave important holes). I also removed redundant and unneeded apps, and added a few packages, including Xscreensaver.

Now I'm running into a phantom screen locker that pops up and locks the screen after 5 minutes of inactivity. It's a generic password entry screen that matches what appears if you manually lock the screen:

enter image description here

I've listed the exhaustive diagnostics at the end. I followed up on many dozens of Google hits on disabling screen locking in KDE, Kubuntu, and Mint, from current versions to old ones, and ruled out any issue with Xscreensaver or the normal screen locker settings and controls. Basically, the installation has no settings, anywhere, related to an inactivity-based screen locker, and no dedicated, recognizable screen locker software. The issue points to this:

Speculation:

  • The KDE components I loaded from Kubuntu were not everything from KDE that is contained in Kubuntu. It could be missing something related to this problem (e.g., elements of the System Settings containing the screen locker controls).

  • I might have left in some Mate components related to the problem, or I might have deleted something critical bundled with Mate that isn't replaced by the limited KDE stuff that was loaded. The instructions I followed leave both DEs installed; deleting Mate was my own seat-of-the-pants. But nothing from Mate should be running under KDE.

  • Mint may contain some basic screen locking functionality that is normally superseded or controlled by a KDE provision. The lock screen graphics aren't consistent with the KDE theming, suggesting that it might be a Mint function. If the Kubuntu components are incomplete, the Mint components may be running in some default mode.

Question

How can I identify System Settings modules (or other key components) that may be missing in what was loaded from Kubuntu using that command line, or any screen locker that's part of Mint that may be responsible?

Update

I created a fresh install of Kubuntu for comparison.

  • The KDE lock screen uses the same general template but is customized (KDE wallpaper, KDE icon instead of user icon, password field and unlock button dark instead of white). This points to the phantom screen locker being a Mint function.

  • The Kubuntu System Settings contains a dedicated Screen Locking module under Desktop Behavior with the relevant controls. This is missing in my installation. It could be a missing code module or missing configuration information for the System Settings UI.



Supplemental Documentation

(It isn't critical to read the rest; it's mainly to pre-answer "did you think of this?")

Diagnostics

  • I know it's not Xscreensaver; no lock is set there. If I set it's time short enough to go to screensaver mode before the phantom screen locker activates, it works as it should (and the screen locker doesn't activate). If the screen locker triggers first, Xscreensaver doesn't run.

    I've never used Xscreensaver to lock the screen, but tested it just to see what the screen would look like. It would not lock the screen, so it can't be the cause. Xscreensaver-demo is the front-end UI used to set the options. When I open it in a terminal, regardless of whether its lock is set, it produces an error message in the terminal:

    $ xscreensaver-demo

    (xscreensaver-demo:3766): libglade-WARNING **: 05:11:30.894: Could not load support for `gnome': libgnome.so: cannot open shared object file: No such file or directory

    I'm not sure that's even relevant.

  • There is some Kscreensaver artwork (icons) that I found in the KDE file clutter, but nothing executable, and the icons aren't remotely similar to anything on the above screen. On the off chance that there might actually be a KDE screensaver buried somewhere, I created a config file that would disable it (that didn't change anything). There is no sign of a bundled KDE screensaver in the normal system settings.

  • There are no screen locker setting in System Settings where Plasma 5 should have them. Beyond that, KDE screen locker settings have moved around in the System Settings (e.g., Desktop Behavior | Activities; Desktop Behavior | Screen Locking; Power Management; Display and Monitor; etc.). I searched online for every reference to a location it has ever been, and also did a search in System Settings on lock, screen, and other related terms. There is no screen locker setting in System Settings.

  • I disabled all of the power management settings relating to the screen or any form of suspension (including battery power settings to leave no stone unturned, even though I'm running on wall power); no effect.

  • In some versions, there was a screen locker setting in the desktop configuration (via right-click on desktop). There is an option to manually lock the screen but no settings, including in Configure Desktop in that menu.

  • In some versions, there was screen locker stuff in the "cashew" that largely duplicates the right-click menu. The cashew has been replaced with a "hamburger", and doesn't contain any screen locker settings.

  • There was a Privacy menu in various places in various versions that contained screen locker settings (no longer organized that way). In some cases screen locker settings were with screen brightness settings (nope).

  • Various versions of Plasma have had screen locker configuration locations like ~/.kde/share/config/kscreensaverrc, where you can add a line Lock=false. I created the file because it didn't exist and added the line (no effect).

  • I searched both root and home for every configuration file I found mentioned in relation to this, as well as filenames containing "screenlocker", "screensaver", and the like. There does not appear to be a dedicated screen locker program installed other than Xscreensaver (but that doesn't preclude screenlocking being buried in other code, or cryptically named).

  • I found a 2010 reference to what appears to be a deprecated provision, but still present. There is a file /etc/default/acpi-support that relates to hibernation. There is a LOCK_SCREEN=true line that can be commented out (had no effect).

  • Nothing is autoloaded at startup (program or service) that relates to this.

  • After all configuration changes, I logged out of the user session and logged back in, or rebooted, depending on the change, to ensure the change was active.

Best Answer

Long story short, installing the selected DE packages for Kubuntu by this method leaves some important holes, which I discovered once I compared this to a Kubuntu installation.

I then searched for "screenlocker" in the package manager. That result revealed a non-installed package that looked promising, and turned out to be the missing module that provides user control for the screen locker: kde-config-screenlocker. That allowed me to set or disable the screen locker in System Settings under Desktop Behavior.

There were still some missing pieces (as evidenced by the screen locker still lacking the KDE customization, and other odds and ends). It's preferable to install packages rather than copy and paste missing files, since the package manager takes care of dependencies.

Ubuntu has a handy web service that can do a reverse lookup to identify what package a file came from: https://packages.ubuntu.com/. I searched based on files with names containing "screenlocker". It produced a list of filename hits and their parent package. Checking those packages in the package manager, I lucked out again. kubuntu-settings-desktop turned out to be missing, and it is responsible for all of the other missing functionality identified to date.

If you try the same route to add KDE to Mint, you can add those two packages to the install list in the original command. Otherwise, you can install both afterwards from the terminal with:

sudo apt install kde-config-screenlocker kubuntu-settings-desktop
Related Question