Bug 1672998

Summary: Automatic Logout Feature not working [rhel-7.9.z]
Product: Red Hat Enterprise Linux 7 Reporter: yzheng <yzheng>
Component: gnome-settings-daemonAssignee: Benjamin Berg <bberg>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.7CC: ayadav, bberg, cgarnach, joboyer, jreznik, mboisver, mkrajnak, redhat, rstrode, takirby, tpelka, tpopela
Target Milestone: rcKeywords: FutureFeature, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1904139 (view as bug list) Environment:
Last Closed: 2020-12-15 11:11:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1904139    

Description yzheng 2019-02-06 12:49:20 UTC
Description of problem:

We found that the automatic logout of setting in GNOME 3 does not work.


Version-Release number of selected component (if applicable):

In all version of Red Hat Enterprise Linux.


How reproducible:

Every time.


Steps to Reproduce:
1. We found this KCS, and set like this:
~~~
https://access.redhat.com/solutions/1756193
~~~

2. But even timeout is reached, the GUI only display this message:
~~~
Automatic logout
You will soon log out because of inactivity.
~~~

Not logout at all.


Actual results:

Even it is set by dconf, the automatic logout does not work.


Expected results:

The automatic logout works.


Additional info:

I have tested it in my latest RHEL 7.6 vm, but the setting does not work either.

Comment 3 yzheng 2019-02-06 12:55:48 UTC
In my case, customer asked whether the process is still running after automatic logout of the GNOME session.

But when I tested the automatic logout setting of the KCS, it does not work.

And we found this bug in CentOS 7:
~~~
https://bugs.centos.org/view.php?id=9190
~~~

Comment 4 Marek Kašík 2019-02-06 15:05:42 UTC
This is probably a bug somewhere in gnome-settings-daemon. The setting seems stored correctly (the message is shown). I'm reassigning this bug to gnome-settings-daemon.

Comment 5 yzheng 2019-02-07 10:33:24 UTC
Hi, 

> This is probably a bug somewhere in gnome-settings-daemon. The setting seems stored correctly (the message is shown). I'm reassigning this bug to gnome-settings-daemon.

Thank you Marek.

This seems a bug since RHEL 7.0(I have not tested it in RHEL 6). Fixing this as soon as possible is appreciate.

Comment 9 Benjamin Berg 2019-05-07 14:03:03 UTC
I have created a patch for g-s-d which should be safe to backport. I did test it locally and it seems to work just fine, see https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/102

Comment 10 Benjamin Berg 2019-05-07 14:31:39 UTC
The patch has been cherry-picked to gnome-3-32, which should apply cleanly to the RHEL 7.7 g-s-d package (3.28).

Scratch build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=21545076

Comment 12 amit yadav 2020-02-27 19:17:05 UTC
(In reply to Benjamin Berg from comment #10)
> The patch has been cherry-picked to gnome-3-32, which should apply cleanly
> to the RHEL 7.7 g-s-d package (3.28).
> 
> Scratch build:
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=21545076

Hi Carlos/Benjamin,

Did we add this fix to RHEL7.7? A customer has reported this issue on the RHEL7.7 VM. I have also been able to reproduce the issue on VM.

Comment 13 Benjamin Berg 2020-02-28 10:15:30 UTC
I think this got lost due to the lack of confirmation that the fix (i.e. scratch build) was working correctly.

I suppose we can just push out an updated package that contains the fix.

Comment 14 Thomas Jones 2020-05-14 18:56:50 UTC
This issue seems to still be present in RHEL 7.8. Customer (who's running RHEL 7.6) had indicated to me that their security assessors had pinged them on the lack of idle-logout routines in their builds and "could I look at how they could enable it". Used my Developer subscription to download latest 7.x (a couple hours ago). Followed recommendations in:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide/user-sessions#configuring-automatic-logout

Found that the auto logout warning would pop up and the screen would lock soon after, but, that the session was not actually terminated (re-authenticating took back to a desk full of still-open applications and an SSH login showed that the ":0" login-session was active from well before the lock and re-authenticate.

Comment 15 Ray Strode [halfline] 2020-05-15 18:54:22 UTC
Thomas, a fix for this issue has been identified and is being evaluated for inclusion in a future update of Red Hat Enterprise Linux 7.  In the mean time, you can work around this issue by placing gnome.is_vm=0 on the kernel command line of your guest.

Comment 16 Thomas Jones 2020-05-18 14:13:32 UTC
Thank you, Ray. I'm wondering if there's something funky in my test system, though: adding that boot option definitely altered the behavior. However, it looks like it simply killed GUI rather than simply terminating the particular session? As hoped for, I'm no longer ":0" in the return from `who` when SSHed in to monitor the progress. That said, after killing the graphical login user's session, the GUI simply went to black with a flashing line-cursor (at the upper-left of the login screen) ...and no longer responds to input. Was more expecting that it would kill the user-session and return to the initial login screen?

Comment 17 Ray Strode [halfline] 2020-05-19 14:26:34 UTC
Hi Thomas,

That behavior does sound incorrect.

Can you open a support case at http://access.redhat.com explaining the situation?

Comment 18 Thomas Jones 2020-05-20 20:43:14 UTC
Looks like it may be limited to the "physical" framebuffer: if I'm using a test VM (RHEL 7.8) hosted on Hyper-V and connect to its console, then I get the "GUI simply went to black..." behavior. However, if I'm connected via remote Gnome (via Xrdp), then the session terminates once the timeout has been exceeded (and reconnecting via Xrdp gets me a fresh session). 

I need to see what XDMCP-type connection gets me.

Comment 19 Thomas Jones 2020-05-20 20:43:23 UTC
Looks like it may be limited to the "physical" framebuffer: if I'm using a test VM (RHEL 7.8) hosted on Hyper-V and connect to its console, then I get the "GUI simply went to black..." behavior. However, if I'm connected via remote Gnome (via Xrdp), then the session terminates once the timeout has been exceeded (and reconnecting via Xrdp gets me a fresh session). 

I need to see what XDMCP-type connection gets me.

Comment 21 Benjamin Berg 2020-10-19 09:37:01 UTC
The behaviour in this case should depend on whether the system is detecting that it runs inside a VM (i.e. the machine type we are detecting).

There might be a few other factors though, not sure exactly which ones right now.

Comment 33 errata-xmlrpc 2020-12-15 11:11:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (gnome-settings-daemon bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:5436

Comment 34 Martin Krajnak 2021-07-30 12:52:47 UTC
automatic_logout