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] Disable Inactivity Logoff

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
mdavidjohnson
Posts: 31
Joined: 2019-07-26 21:51

[Solved] Disable Inactivity Logoff

#1 Post by mdavidjohnson »

Why does this have to be so annoyingly difficult to find an answer for that works ??

I google it with various wordings and get answers that don't work, answers for different systems, answers for different questions, and answers from 20 years ago that couldn't possibly apply to Debian 11.

I've installed Debian 11.2 64-bit and it's working fine. I've successfully modified /etc/network/interfaces to configure my network adapters. I've established my username as a sudoer. And I've successfully modified systemctl to mask sleep.target etc.

Now, I'm using this machine at home, not at work, so I'm not concerned about "security". I've successfully set the machine to automatically log into my account on startup.

But, if I walk away from the machine for ~2 minutes, the screen goes black and when I move the mouse it demands my password... AGAIN !!!

How do I make it stop doing that ???
Last edited by mdavidjohnson on 2023-06-29 02:56, edited 1 time in total.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Disable Inactivity Logoff

#2 Post by L_V »

Try this in ~/.xsessionrc

Code: Select all

xset s off         # don't activate screensaver
xset s noblank     # don't blank the video device
xset -dpms         # disable DPMS (Energy Star) features.
then logout, login.

xset from x11-xserver-utils

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Disable Inactivity Logoff

#3 Post by Head_on_a_Stick »

The options can be combined:

Code: Select all

xset s off s noblank -dpms
deadbang

mdavidjohnson
Posts: 31
Joined: 2019-07-26 21:51

Re: Disable Inactivity Logoff

#4 Post by mdavidjohnson »

Thanks for the fast response!

I get this in reply:

xset: unable to open display ""

lindi
Debian Developer
Debian Developer
Posts: 412
Joined: 2022-07-12 14:10
Has thanked: 1 time
Been thanked: 77 times

Re: Disable Inactivity Logoff

#5 Post by lindi »

What desktop environment are you using?

mdavidjohnson
Posts: 31
Joined: 2019-07-26 21:51

Re: Disable Inactivity Logoff

#6 Post by mdavidjohnson »

GNOME

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Disable Inactivity Logoff

#7 Post by Head_on_a_Stick »

Code: Select all

gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
deadbang

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: Disable Inactivity Logoff

#8 Post by 4D696B65 »

settings > power ?

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Disable Inactivity Logoff

#9 Post by L_V »

mdavidjohnson wrote: 2022-08-19 20:40 xset: unable to open display ""
Did you try as root ?? You should not.
If so, try as user.

~/.xsessionrc : ~ is your home user, not root.....

mdavidjohnson
Posts: 31
Joined: 2019-07-26 21:51

Re: Disable Inactivity Logoff

#10 Post by mdavidjohnson »

To Head_on_a_Stick -

The reply from the system was:

dconf-WARNING **: 15:58:39.167: Failed to commit changes to dconf: Cannot autolaunch D-Bus without X-11 $DISPLAY

mdavidjohnson
Posts: 31
Joined: 2019-07-26 21:51

Re: Disable Inactivity Logoff

#11 Post by mdavidjohnson »

To 4D696B65 -

Yes, that looks promising - I set Dim Screen When Inactive to Off and Blank Screen to Never.

I'll wait ans see if it works.

mdavidjohnson
Posts: 31
Joined: 2019-07-26 21:51

Re: Disable Inactivity Logoff

#12 Post by mdavidjohnson »

To L_V -

I had tried it both ways - got the same reply from the system with each.

Interestingly, this is a Sony Vaio laptop. I also tried it on an Acer desktop where it did *something* and xset q gave back a report, but the screen still turned off and asked for a password after two minutes anyway.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Disable Inactivity Logoff

#13 Post by L_V »

For your info, what I propose is what I use with KDE. It works fine.
I've also spent quite some time to find a solution... Nothing trivial.

Now, you have a laptop.
Probably something a bit special needs to be configured, and maybe a specific tiny package is required.
First check that this is installed:

Code: Select all

upower laptop-mode-tools acpi powermgmt-base powertop

mdavidjohnson
Posts: 31
Joined: 2019-07-26 21:51

Re: Disable Inactivity Logoff

#14 Post by mdavidjohnson »

Well, 4D696B65's simple "settings > power ?" solution seems to be the winner.

For those who may come along later:

1. I clicked on the "down" arrow at the far upper-right of the screen.

2. I clicked on Settings (the Gearwheel) in the box that dropped-down.

3. I clicked on Power in the left side menu of the screen which appeared.

4. I set "Dim Screen When Inactive" to Off.

5. I set "Blank Screen" to Never.

Both the Sony Viao laptop and the Acer desktop have now been running for half-an-hour without the password re-request. As a follow-up, I also performed the same steps on another laptop (a used Dell I picked up earlier this week) and it's been running without blanking the screen for 15 minutes now too.

Thanks 4D696B65 (I can't find the "thumbs-up" button anywhere here - But an unofficial "Big Thanks" anyway.)

And thanks to you all for jumping-in and suggesting other possible fixes.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Disable Inactivity Logoff

#15 Post by L_V »

Good to know for gnome.
Unfortunately less trivial for KDE and probably other desktops
-> only low level settings based on Arch doc easily behave as expected.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Disable Inactivity Logoff

#16 Post by sunrat »

L_V wrote: 2022-08-19 22:08 Good to know for gnome.
Unfortunately less trivial for KDE and probably other desktops
In KDE one just has to disable both Screen Locking and Energy Saving for it to stay on forever.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Disable Inactivity Logoff

#17 Post by L_V »

Unfortunately not as easy at this for all configurations, probably related to bios (and not gnome or kde).
Never found an immediate and obvious solution for my PC.
Even with kde-config-screenlocker and correct settings, no effect.

~/.config/kscreenlockerrc

Code: Select all

[Daemon]
Autolock=false
LockOnResume=false
Only low level settings with xset work immediately.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Disable Inactivity Logoff

#18 Post by Head_on_a_Stick »

mdavidjohnson wrote: 2022-08-19 21:08The reply from the system was:

dconf-WARNING **: 15:58:39.167: Failed to commit changes to dconf: Cannot autolaunch D-Bus without X-11 $DISPLAY
There's something wrong with your dbus configuration. That command works fine in the live image, even under Wayland.
deadbang

Post Reply