Suspend after screen lock in GNOME on Xorg

254 views Asked by At

I'm using GNOME 43.4 version on Xorg, along with gdm3. GNU/Linux System Debian 12.

I want to disable the option for the system not to suspend when I lock the screen (Super+L).

By gnome-tweaks and ohter ways, it only works if I'm using GNOME over Wayland. Already, as I'm using Xorg, it keeps suspending.

I tried changing these options in /etc/systemd/logind.conf:

HandleLidSwitch=ignore HandleLidSwitchExternalPower=ignore HandleLidSwitchDocked=ignore

But even so, when blocking (Super+L) the system goes into sleep mode.

I also tried masking some services via SystemD:

sudo systemctl mask sleep.target suspend.target suspend-then-hibernate.target hibernate.target hybrid-sleep.target

In addition, I also made some changes to /etc/systemd/sleep.conf:

AllowSuspend=no AllowHibernation=no AllowSuspendThenHibernate=no AllowHybridSleep=no

But still it keeps turning off the screen and suspending the system.

I would like to understand why this keeps happening, and disable this suspend after lock screen.

0

There are 0 answers