Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Locking Screen without Suspending nor Hybernating

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
rojasrod
Posts: 32
Joined: 2013-07-17 20:17
Has thanked: 2 times

[Solved] Locking Screen without Suspending nor Hybernating

#1 Post by rojasrod »

Hello

Goal: Locking screen without shutting down any processes

Problem: After locking screen torrents stop downloading or seeding, youtube uploads stop

Settings: all supend and hybertane settings have been turned off on the xfce graphical settings.
I have also run the following script every time I want to lock screen: sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Setup: Linux Debian Stable 12 bookworm
XFCE 4.18
HP elitebook 8440p

Thanks for your help :D
Last edited by rojasrod on 2024-04-21 12:52, edited 1 time in total.

User avatar
fabien
Forum Helper
Forum Helper
Posts: 741
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 67 times
Been thanked: 173 times

Re: Locking Screen without Suspending nor Hybernating

#2 Post by fabien »

Hello,

How do you lock the screen? xscreensaver? other?

If you launch the following command in a terminal, does it stop while the screen is locked?

Code: Select all

$> while true; do sleep 2; date; done
If not, do you know of a more generic command that is causing problems? (so that it can be tested)
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

reinob
Posts: 1198
Joined: 2014-06-30 11:42
Has thanked: 100 times
Been thanked: 47 times

Re: Locking Screen without Suspending nor Hybernating

#3 Post by reinob »

You could just use a screen locker, like slock (# apt install suckless-tools).
Just assign a keyboard combination to it, and that's it.

(in my case it's assigned to [WIN]-[L]. I use openbox).

rojasrod
Posts: 32
Joined: 2013-07-17 20:17
Has thanked: 2 times

Re: Locking Screen without Suspending nor Hybernating

#4 Post by rojasrod »

fabien wrote: 2024-04-15 15:50 Hello,

How do you lock the screen? xscreensaver? other?

If you launch the following command in a terminal, does it stop while the screen is locked?

Code: Select all

$> while true; do sleep 2; date; done
If not, do you know of a more generic command that is causing problems? (so that it can be tested)
Thank you Fabien

To lock the screen I use the ctrl+alt+l or sometimes I use the action buttons on the panel

Code: Select all

$> while true; do sleep 2; date; done
Is this a command that I should use?

No, I don't know any other commands other than the ctrl+alt+l

User avatar
fabien
Forum Helper
Forum Helper
Posts: 741
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 67 times
Been thanked: 173 times

Re: Locking Screen without Suspending nor Hybernating

#5 Post by fabien »

Hello,
rojasrod wrote: 2024-04-19 02:55 To lock the screen I use the ctrl+alt+l or sometimes I use the action buttons on the panel
The question is what locks the screen. It's probably xscreensaver but that's just to be sure. If it is xscreensaver, the login screen shows "xscreensaver" when you unlock, you can check that.
rojasrod wrote: 2024-04-19 02:55

Code: Select all

$> while true; do sleep 2; date; done
Is this a command that I should use?
This command displays the date on the terminal every two seconds. You just launch it, lock the screen, wait a few seconds (or more if your problem takes longer to occur), unlock the screen, see if there are sequences that are missing (see if this command is interrupted when you lock the screen).
rojasrod wrote: 2024-04-19 02:55 No, I don't know any other commands other than the ctrl+alt+l
Sorry, my sentence was incorrect. I wanted to know: if the above command in the terminal works correctly, do you know of another command that is interrupted (for example playing music from a file, or playing a video in Firefox).

However, perhaps I didn't pay enough attention to the title of your topic. You seem to be saying that your system suspends or hibernate when you use Ctrl+Alt+l.
When you go to Parameters -> Keyboard, what is the command associated with Ctrl+Alt+l?
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

rojasrod
Posts: 32
Joined: 2013-07-17 20:17
Has thanked: 2 times

Re: Locking Screen without Suspending nor Hybernating

#6 Post by rojasrod »

Thank you all for your input.

I was able to solve it with this:

You could just use a screen locker, like slock (# apt install suckless-tools).
Just assign a keyboard combination to it, and that's it.

(in my case it's assigned to [WIN]-[L]. I use openbox).

User avatar
fabien
Forum Helper
Forum Helper
Posts: 741
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 67 times
Been thanked: 173 times

Re: Locking Screen without Suspending nor Hybernating

#7 Post by fabien »

Thanks for updating your topic
rojasrod wrote: 2024-04-21 12:50 I was able to solve it with this:

You could just use a screen locker, like slock (# apt install suckless-tools).
So thanks to @reinob :)

Were you able to find which command is associated with Ctrl+Alt+l? Does this command trigger suspend or hibernate?
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

Post Reply