Not locking when going to sleep after replacing xfce4-screensaver  [Solved]

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
mxismythang
Posts: 40
Joined: Tue Nov 07, 2023 4:05 pm

Not locking when going to sleep after replacing xfce4-screensaver

#1 Post by mxismythang »

I replaced the xfce4-screensaver with the more stable XScreenSaver as per recommendations from @CharlesV (here: viewtopic.php?p=780934#p780934).

I have noticed that my computer wakes from sleep without prompting for password now, despite the option, "Lock screen when system is going to sleep" being enabled in Power Manager.
Image

This is when explicitly sleeping the PC with Action>Suspend.
Image


Is this related to replacing my screen saver?

I have "SUPER+L" shortcut to "xflock4" which works fine, but I did notice that when I unlock after SUPER+L, the unlock screen is part of XScreenSaver, as it shows the name and version number:
Image

Code: Select all

System:
  Kernel: 6.6.12-1-liquorix-amd64 [6.6-16~mx23ahs] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: audit=0
    intel_pstate=disable rcupdate.rcu_expedited=1 BOOT_IMAGE=/vmlinuz-6.6.12-1-liquorix-amd64
    root=UUID=<filter> ro splash quiet init=/lib/systemd/systemd
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.3_ahs_x64 Libretto May 19  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop System: HP product: HP EliteDesk 800 G3 SFF v: N/A serial: <superuser required>
    Chassis: type: 3 serial: <superuser required>
  Mobo: HP model: 8299 v: KBC Version 06.29 serial: <superuser required> UEFI: HP
    v: P01 Ver. 02.49 date: 12/13/2023
CPU:
  Info: model: Intel Core i5-6500 bits: 64 type: MCP arch: Skylake-S gen: core 6 level: v3
    note: check built: 2015 process: Intel 14nm family: 6 model-id: 0x5E (94) stepping: 3
    microcode: 0xF0
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
    L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 1075 high: 1200 min/max: 800/3201 boost: enabled scaling:
    driver: acpi-cpufreq governor: ondemand cores: 1: 1000 2: 1000 3: 1200 4: 1100 bogomips: 25599
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Vulnerable: No microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT disabled
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: IBRS, IBPB: conditional, STIBP: disabled, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: Intel HD Graphics 530 vendor: Hewlett-Packard driver: i915 v: kernel arch: Gen-9
    process: Intel 14n built: 2015-16 ports: active: none empty: DP-1, DP-2, DP-3, HDMI-A-1,
    HDMI-A-2, HDMI-A-3 bus-ID: 00:02.0 chip-ID: 8086:1912 class-ID: 0300
  Device-2: AMD Navi 24 [Radeon RX 6400/6500 XT/6500M] vendor: Tul / PowerColor driver: amdgpu
    v: kernel arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4
    speed: 16 GT/s lanes: 16 ports: active: HDMI-A-4 empty: DP-4 bus-ID: 03:00.0 chip-ID: 1002:743f
    class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X: loaded: amdgpu
    dri: radeonsi gpu: amdgpu display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22") s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-4 mapped: HDMI-A-3 model: HP E222 serial: <filter> built: 2017 res: 1920x1080
    hz: 60 dpi: 102 gamma: 1.2 size: 476x268mm (18.74x10.55") diag: 546mm (21.5") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  API: OpenGL v: 4.6 Mesa 23.1.2-1~mx23ahs renderer: AMD Radeon RX 6400 (navi24 LLVM 15.0.6 DRM
    3.54 6.6.12-1-liquorix-amd64) direct-render: Yes
Audio:
  Device-1: Intel 200 Series PCH HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    bus-ID: 1-3:3 chip-ID: 0951:16c4 alternate: snd_soc_avs class-ID: 0300 bus-ID: 00:1f.3
    chip-ID: 8086:a2f0 class-ID: 0403
  Device-2: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie: gen: 4
    speed: 16 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:ab28 class-ID: 0403
  Device-3: Kingston HyperX Cloud Flight Wireless Headset type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  API: ALSA v: k6.6.12-1-liquorix-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I219-LM vendor: Hewlett-Packard driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6 chip-ID: 8086:15e3 class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-2: Realtek RTL8188EUS 802.11n Wireless Network Adapter type: USB driver: rtl8xxxu
    bus-ID: 1-13:7 chip-ID: 0bda:8179 class-ID: 0000 serial: <filter>
  IF: wlan0 state: up mac: <filter>
  IF-ID-1: br-f482fa0006b3 state: up speed: 10000 Mbps duplex: unknown mac: <filter>
  IF-ID-2: docker0 state: down mac: <filter>
  IF-ID-3: veth64fc26c state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-4: veth7af2fc7 state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-5: vethab72894 state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-6: vethed450c0 state: up speed: 10000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8 bus-ID: 1-9:4 chip-ID: 2550:8761
    class-ID: e001 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 5 state: down bt-service: enabled,running rfk-block:
    hardware: no software: yes address: <filter>
  Info: acl-mtu: 1021:6 sco-mtu: 255:12 link-policy: rswitch hold sniff park
    link-mode: peripheral accept
Drives:
  Local Storage: total: 931.51 GiB used: 146.69 GiB (15.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO Plus 1TB size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXM7 temp: 40.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 36.77 GiB size: 35.9 GiB (97.62%) used: 17.59 GiB (49.0%) fs: ext4
    dev: /dev/dm-0 maj-min: 253:0 mapped: luks-<filter>
  ID-2: /boot raw-size: 1.05 GiB size: 1022.5 MiB (95.20%) used: 226.3 MiB (22.1%) fs: ext4
    dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-3: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 26.3 MiB (27.4%) fs: vfat
    dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /home raw-size: 729.6 GiB size: 717.08 GiB (98.28%) used: 128.85 GiB (18.0%) fs: ext4
    dev: /dev/dm-1 maj-min: 253:1 mapped: luks-<filter>
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 40.0 C mobo: N/A gpu: amdgpu temp: 52.0 C mem: 52.0 C
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 0
Repos:
  Packages: 2478 pm: dpkg pkgs: 2454 libs: 1310 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 24
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/docker.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable
  Active apt repos in: /etc/apt/sources.list.d/librewolf.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/librewolf.gpg] http://deb.librewolf.net bookworm main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb [signed-by=/etc/apt/keyrings/mx23-archive-keyring.gpg] https://mirrors.ocf.berkeley.edu/mx-packages/mx/repo/ bookworm main non-free
    2: deb [signed-by=/etc/apt/keyrings/mx23-archive-keyring.gpg] https://mirrors.ocf.berkeley.edu/mx-packages/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/nordvpn.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/nordvpn-keyring.gpg] https://repo.nordvpn.com/deb/nordvpn/debian stable main
  Active apt repos in: /etc/apt/sources.list.d/signal-xenial-added-by-mxpi.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/signal-desktop.gpg] https://updates.signal.org/desktop/apt xenial main
Info:
  Processes: 388 Uptime: 5h 38m wakeups: 6 Memory: 62.68 GiB used: 4.73 GiB (7.5%) Init: systemd
  v: 252 target: graphical (5) default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
Last edited by mxismythang on Sat Jul 13, 2024 4:28 pm, edited 1 time in total.

User avatar
CharlesV
Global Moderator
Posts: 7102
Joined: Sun Jul 07, 2019 5:11 pm

Re: Not locking when going to sleep after replacing xfce4-screensaver

#2 Post by CharlesV »

So, you MAY have to go to light-locker for that.

Usually, I have set xscreensaver to turn on and lock, just before any hardware lock / timeout. And this resolves. However, pushing the suspend button you may have to change the way it all works and light-locker is a good one to try. (mx Package Installer )
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
mxismythang
Posts: 40
Joined: Tue Nov 07, 2023 4:05 pm

Re: Not locking when going to sleep after replacing xfce4-screensaver

#3 Post by mxismythang »

I am attempting this, but I suppose I might need to thoroughly read the docs on how to integrate this into my system?

I receive the following message when attempting to configure ll to lock on suspend:

Code: Select all

$ light-locker --lock-on-suspend

** (light-locker:49251): WARNING **: 14:16:30.962: screensaver already running in this session
Is there a universal xfce/x11 settings file or manager that stores the lock method, where I would need to input "light-locker-command -l' as the lock command?

output from "light-locker --debug" if useful:

Code: Select all

$ light-locker --debug
[gs_debug_init] gs-debug.c:106 (14:17:39):	 Debugging enabled
[main] light-locker.c:142 (14:17:39):	 initializing light-locker 1.8.0
[main] light-locker.c:164 (14:17:39):	 Platform:
gtk:        3
systemd:    yes
ConsoleKit: no
UPower:     yes
[main] light-locker.c:196 (14:17:39):	 Features:
lock-after-screensaver: yes
late-locking:           yes
lock-on-suspend:        yes
lock-on-lid:            yes
settings backend:       GSETTINGS
[main] light-locker.c:198 (14:17:39):	 lock after screensaver 0
[main] light-locker.c:199 (14:17:39):	 late locking 0
[main] light-locker.c:200 (14:17:39):	 lock on suspend 1
[main] light-locker.c:201 (14:17:39):	 lock on lid 0
[main] light-locker.c:202 (14:17:39):	 idle hint 0
[init_session_id] gs-listener-dbus.c:2196 (14:17:39):	 Got session-id: /org/freedesktop/login1/session/_31
[init_session_id] gs-listener-dbus.c:2206 (14:17:39):	 Got sd-session-id: 1
[init_seat_path] gs-listener-dbus.c:2287 (14:17:39):	 Got seat: /org/freedesktop/DisplayManager/Seat0
[gs_listener_delay_suspend] gs-listener-dbus.c:449 (14:17:39):	 Delay suspend

** (light-locker:49436): WARNING **: 14:17:39.646: screensaver already running in this session
Sat Jul 13 14:17:39
Last edited by mxismythang on Sat Jul 13, 2024 4:37 pm, edited 1 time in total.

User avatar
Eadwine Rose
Administrator
Posts: 14466
Joined: Wed Jul 12, 2006 2:10 am

Re: Not locking when going to sleep after replacing xfce4-screensaver

#4 Post by Eadwine Rose »

With all help requests, please share your full Quick System Info, found in the menu under Favorites. Press the Copy for forum button, then click paste in a reply. If need be, you can do this with the LiveUSB, thanks.

(just wondering if there is something in there that can help)
MX-23.6_x64 July 31 2023 * 6.1.0-34amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.216.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

Charlie Brown

Re: Not locking when going to sleep after replacing xfce4-screensaver

#5 Post by Charlie Brown »

mxismythang wrote: Sat Jul 13, 2024 4:24 pm... Is there a universal xfce/x11 settings file or manager that stores the lock method, where I would need to input "light-locker-command -l' as the lock command?
It's already the xflock4 . Just the xscreensaver is before the light-ocker :

Code: Select all

...
for lock_cmd in \
    "$LOCK_CMD" \
    "xfce4-screensaver-command --lock" \
    "xscreensaver-command -lock" \
    "light-locker-command --lock" \
    "gnome-screensaver-command --lock" \
    "mate-screensaver-command --lock"
do
    if 
...
So, you can simply change their (lines') places.

(When auto-suspending it executes whichever it finds/meets (installed) first. In fact xscreensaver should've been working according to this.)

User avatar
CharlesV
Global Moderator
Posts: 7102
Joined: Sun Jul 07, 2019 5:11 pm

Re: Not locking when going to sleep after replacing xfce4-screensaver

#6 Post by CharlesV »

I believe the standalone command for that lock is

Code: Select all

light-locker-command -l

or

Code: Select all

light-locker-command --lock

*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
mxismythang
Posts: 40
Joined: Tue Nov 07, 2023 4:05 pm

Re: Not locking when going to sleep after replacing xfce4-screensaver

#7 Post by mxismythang »

Charlie Brown wrote: Sat Jul 13, 2024 4:38 pm
mxismythang wrote: Sat Jul 13, 2024 4:24 pm... Is there a universal xfce/x11 settings file or manager that stores the lock method, where I would need to input "light-locker-command -l' as the lock command?
It's already the xflock4 . Just the xscreensaver is before the light-ocker :

Code: Select all

...
for lock_cmd in \
    "$LOCK_CMD" \
    "xfce4-screensaver-command --lock" \
    "xscreensaver-command -lock" \
    "light-locker-command --lock" \
    "gnome-screensaver-command --lock" \
    "mate-screensaver-command --lock"
do
    if 
...
So, you can simply change their (lines') places.

(When auto-suspending it executes whichever it finds/meets (installed) first. In fact xscreensaver should've been working according to this.)
TY for the info; Is that blob in a hidden file under my home folder?

EDIT: NVMND, found /usr/bin/xflock4

User avatar
mxismythang
Posts: 40
Joined: Tue Nov 07, 2023 4:05 pm

Re: Not locking when going to sleep after replacing xfce4-screensaver  [Solved]

#8 Post by mxismythang »

So, to be honest, I don't really need/use a screensaver, and even after swapping the order in /usr/bin/xflock4, the xscreensaver lock was invoked, so I simply uninstalled xscreensaver and will simply use power management to blank my display as needed, locking at th4e same time. This works great for me now. TY all for your support.

Code: Select all

fi

for lock_cmd in \
    light-locker-command \
    xscreensaver-command \
    xfce4-screensaver-command \
    gnome-screensaver-command \
    mate-screensaver-command
do
    $lock_cmd --lock </dev/null 2>/dev/null && exit
done
EDIT:
So to be clear, for me, the solution was to:
Install light-locker
uninstall xscreensaver

User avatar
CharlesV
Global Moderator
Posts: 7102
Joined: Sun Jul 07, 2019 5:11 pm

Re: Not locking when going to sleep after replacing xfce4-screensaver

#9 Post by CharlesV »

Excellent. Glad you have it fixed!
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

Post Reply

Return to “MX Help”