Automatic logout when resuming from suspend on Xubuntu 18.04

Bug #1772629 reported by Paulo Marcel Coelho Aragão
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When my Xubuntu 18.04 laptop resumes from suspend, systemd-logind automatically logs out of the current session if the laptop has stayed suspended for more than a couple of hours. If the interval between suspend and resume is short, it doesn't log out. I still haven't discovered how long this interval has to be in order to cause the logout.

I enabled debug on the systemd-logind.service, creating file _/etc/systemd/system/systemd-logind.service.d/10-debug.conf_:

[Service]
Environment=SYSTEMD_LOG_LEVEL=debug

which causes systemd-logind to log all D-Bus messages it handles, but couldn't spot anything that might have caused the logout.

I scanned all systemd journal messages (`journalctl`) before systemd-logind starts killing the current session, investigated all that looked suspicious but couldn't find anything that might influence an automatic logout. Here are some of the messages that striked me as suspicious (they are not sequential, but pulled from different occasions):

upowerd[1600]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0
polkitd(authority=local)[840]: Unregistered Authentication Agent for unix-session:c2 (system bus name :1.46, object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
wpa_supplicant[811]: dbus: fill_dict_with_properties dbus_interface=fi.w1.wpa_supplicant1.Interface dbus_property=Stations getter failed
wpa_supplicant[811]: dbus: wpa_dbus_get_object_properties: failed to get object properties: (none) none
at-spi-bus-launcher[7031]: XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
at-spi-bus-launcher[7031]: after 30333 requests (30333 known processed) with 0 events remaining.
systemd-logind[779]: Inhibitor xfce4-power-manager (xfce4-power-manager handles these events) pid=8611 uid=1000 mode=block stopped
systemd-logind[779]: Electing new display for user paulo
systemd-logind[779]: Ignoring session c8

logind config doesn't have anything that might cause this:

paulo:~$ loginctl show-session
EnableWallMessages=no
NAutoVTs=6
KillUserProcesses=no
RebootToFirmwareSetup=no
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
BlockInhibited=handle-power-key:handle-suspend-key:handle-hibernate-key
DelayInhibited=sleep
InhibitDelayMaxUSec=5s
HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchDocked=ignore
HoldoffTimeoutUSec=30s
IdleAction=ignore
IdleActionUSec=30min
PreparingForShutdown=no
PreparingForSleep=no
Docked=no
RemoveIPC=yes
RuntimeDirectorySize=615313408
InhibitorsMax=8192
NCurrentInhibitors=5
SessionsMax=8192
NCurrentSessions=1
UserTasksMax=10813

I can't find any anything that might cause an automatic logout after a time interval. I'm really stumped.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: systemd 237-3ubuntu10
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: XFCE
Date: Tue May 22 07:36:59 2018
InstallationDate: Installed on 2018-04-28 (23 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
MachineType: Dell Inc. Inspiron N5110
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-20-generic root=UUID=c4c2d11a-634c-4105-9991-e2fb5c18e1dc ro net.ifnames=0 quiet splash vt.handoff=1
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/26/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A06
dmi.board.name: 08FDW5
dmi.board.vendor: Dell Inc.
dmi.board.version: A06
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: Not Specified
dmi.modalias: dmi:bvnDellInc.:bvrA06:bd05/26/2011:svnDellInc.:pnInspironN5110:pvrNotSpecified:rvnDellInc.:rn08FDW5:rvrA06:cvnDellInc.:ct8:cvrNotSpecified:
dmi.product.name: Inspiron N5110
dmi.product.version: Not Specified
dmi.sys.vendor: Dell Inc.

Revision history for this message
Paulo Marcel Coelho Aragão (marcelpaulo) wrote :
Revision history for this message
Paulo Marcel Coelho Aragão (marcelpaulo) wrote :

I have discovered that the automatic logout was caused by the Xorg server crashing with SIGBUS. So this bug may and should be closed.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Were you able to identify the cause of the crash?

Changed in systemd (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Paulo Marcel Coelho Aragão (marcelpaulo) wrote :

Bug #1776887 indicated that Xorg crashes because of a problem in blk-core.c. A patch and a workaround were presented, as well as a test from blktests. It took a long for the patch to reach the kernel, and it was finally included with 4.15.0-31-generic. And here the bug hit a snag because:

1. If the workaround is put in place, the problem doesn't happen
2. Without the workaround, with just the patched kernel, the problem still happens

It seems to indicate that either the patch doesn't actually solve the root problem, and that the workaround doesn't seem to be related to the patch.

In any case, it definitely has nothing to do with systemd.

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Thank you for the detailed reply.

Closing this report then.

Changed in systemd (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.