Xubuntu 21.10 is a pretty solid system with a lot going for it. That said, there are a few little things that can make a person scratch their head. One issue that I'm facing is that the desktop (and any open applications) will be shown for almost half a second before the lock screen kicks in when resuming from suspend. There was a bug report filed a few years back with a fix apparently released in 2020. Unfortunately, this problem still persists.
A post on the XFCE forums proposes uses a systemd
hook to pause for a second on resume:
#!/bin/sh
case $1/$2 in
pre/*)
#enter sleep
;;
post/*)
#exit sleep
sleep 1
;;
esac
While this does reduce the amount of time the desktop is visible by a fraction of a second, people with eagle eyes will still be able to read whatever might be displayed on my screen. Changing the sleep
value from 1
to something higher does not resolve the issue.
Is there something else I could do to have the screen blank out before entering sleep so that the first thing a person sees when accessing the notebook is the lock screen?
Hardware:
Lenovo ThinkPad X1 Carbon
CPU: Intel Core i5-7200U
RAM: 16GB
OS:
Xubuntu 21.10
Kernel: 5.13.0-22-generic
I had the same problem on Linux Mint 21 (based on 22.04) and have found a solution which works for me. It seems that the problem arises from the support for
upower-glib
inxfce4-settings
as written here. XFCE disabled upower-glib some time back but the Debian and Ubuntu packages are still compiled with support for it for some reason.To recompile the package, do the following (my package version is
xfce4-settings_4.16.2-1ubuntu2_amd64
, so your version numbers/architecture might be different depending on the version of Ubuntu you're running):Enable the
deb-src
entries for packages. The easiest way is to go through the GUI at Software & Updates → Ubuntu Software and then tick the Source Code box.Download the source of
xfce4-settings
:Install some generic build dependencies:
Install build dependencies for
xfce4-settings
:Edit the file
debian/rules
and delete the line that says--enable-upower-glib \
. This line normally enablesupower-glib
support, which we don't want.Recompile the package:
Replace the installed version of
xfce-settings
with the package which we just compiled:Keep in mind that this has to be repeated, should the
xfce4-settings
package get updated sometime in the future. You can runsudo apt-mark hold xfce4-settings
to prevent this from happening, you won't get any updates for this package though then.