Laptop docked with lid closed, goes to sleep immediately on login

Bug #1897185 reported by Tim Wetzel
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Confirmed
Undecided
Unassigned
mutter (Ubuntu)
Confirmed
Undecided
Unassigned
xorg-server (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu 20.04's software updater just applied quite a few updates affecting grub and nvidia. The modules should show in the report just submitted. Also, updates to initramfs had just installed a few days ago. Kudos in that these updates fixed two login/startup issues: I'd been affected by the compression change for initramfs and had started getting the spinning ubuntu circle on the logon splash screen, apparently due to an nvidia driver conflict. I'd turned the splash screen to nosplash, and have now been able to set it back to splash. Both of those issues now appear to be fixed.

BUT now when I start Ubuntu with the T570 laptop docked, lid closed, external display and keyboard via the dock: as soon as I enter the login password and press enter, the system goes into suspend. If I then press the dock power button again, the system will resume and proceed normally.

It seems that the new startup modules don't realize that the machine is docked; and/or that it erroneously now "detects" the closed lid as a change in lid state during startup, triggering suspend. Prior to today's updates, this was not an issue.

I would appreciate seeing this corrected. Thank you.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ubuntu-release-upgrader-core 1:20.04.25
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
Uname: Linux 5.4.0-48-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
CrashDB: ubuntu
CurrentDesktop: ubuntu:GNOME
Date: Thu Sep 24 18:15:31 2020
InstallationDate: Installed on 2020-06-22 (94 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-release-upgrader
Symptom: release-upgrade
UpgradeStatus: No upgrade log present (probably fresh install)
VarLogDistupgradeTermlog:

Revision history for this message
Tim Wetzel (twetzel21) wrote :
affects: ubuntu → ubuntu-release-upgrader (Ubuntu)
Revision history for this message
Tim Wetzel (twetzel21) wrote :

Additional observations:
1. This bug is interacting with another: where the "short name" of the user (the Home file name) rather than the full user name is showing up on the login screen. Usually the short name shows up on this machine when it is docked. When the laptop is being used by itself, the full name shows up. ONLY ONCE tonight has the full name shown up at login in the dock... and when it did, the machine did not suspend.
2. This bug is also affecting automatic WiFi connection. When the machine suspends and I press power again to resume it (on the dock), it connects to WiFi as it should. But on that one occasion where the full user name showed up and it did not suspend, it cannot find the WiFi network security credentials even though they are stored. Very strange.
3. In working with this tonight, the spinning ubuntu logo hang came back during login. Since I know that initramfs was updated shortly before the kernel and nvidia updates, I created a new initramfs image. I also had to update that new image explicitly with a second execution of the update-initramfs command. I turned the splash screen back off, and verified that refreshing the ramdrive has once again cleared the initramfs deconding errors.
4. So the changes to initramfs, to the core/kernel, and to the nvidia drivers don't seem to be getting along with each other too well.
I hope this helps.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

This bug continues to recur even after a fresh reinstallation of Ubuntu. After working through the installation crash (bug 1871268) by using the latest daily image; trying unsuccessfully to get rid of the still recurring initramfs errors (bug 1835660); and disabling the splash screen to avoid the dreaded spinning Ubuntu logo hang during boot (bug 1872159); the system, when docked, still went into suspend immediately after entering the login password during startup. This occurred on a T570 with dual boot (Windows 10 and Ubuntu freshly installed from the latest focal daily-live current image). Downgrading the nVidia driver also failed: once I did that, the system wouldn't boot at all. It just stopped at a blinking cursor on an otherwise black screen.

None of these things were issues until the middle of September updates; and after the big 20.04.1 update about a week ago, things got really bad.

Be advised that installing from an earlier version (in this case 20.04 images from May and June of this year) also does not work: these installs fail on the same crash as the current 20.04.1 image (bug 1871268).

This problem of the machine, docked with an external display as primary (laptop lid down), appears to be a recurrence of previous bugs that were thought to be fixed. Please address ASAP. Thank you.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Prior bugs that were similar and may be related to this one include:
1481442
1589593
1626689

Revision history for this message
Tim Wetzel (twetzel21) wrote :

This morning, this bug affected a second machine here. Updater ran on Oct 1. This is the same machine that started having ACPI errors after the boot hanging when docked with an external display (#1872159). These problems seem to be interrelated: #1872159, 1835660, 1897185. And as stability deteriorates and you try to reinstall, you get bug #1871268. Bad and getting worse.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Two additional observations on this bug:
-This bug is becoming more persistent on the second machine (the first one is completely sidelined due to all this; an attempt to reload Ubuntu on it failed due to bug 1871268).
-I looked back: this problem of going into suspend as soon as the login password is entered started on September 24. Immediately before that, Ubuntu Updater installed updates to grub, nvidia drivers (which are needed on the first machine affected), and some other modules. This update came about a week after an earlier one that had updated initramfs modules.

This whole situation started a day or two before September 14: one the 14th, I noted the hang on spinning circle during startup and initramfs errors had just started. At that time, I was able to work around those 2 by disabling the splash screen and re-creating the ram drive with the initramfs tools. But since the subsequent updates, Ubuntu effectively became unusable on my main machine. It is touch and go on my backup machine.And those workarounds no longer work either.

This login triggers suspend problem has no workaround for me. PLEASE fix this!

summary: - login triggers suspend after update
+ [ThinkPad T570] login triggers suspend after update
summary: - [ThinkPad T570] login triggers suspend after update
+ Laptop docked with lid closed, goes to sleep immediately on login
affects: ubuntu-release-upgrader (Ubuntu) → gnome-shell (Ubuntu)
tags: added: multimonitor
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in mutter (Ubuntu):
status: New → Confirmed
Changed in xorg-server (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim Wetzel (twetzel21) wrote :

NOTE that I'm not seeing this since today's fix for 1872159 (the spinning logo splash hang on startup). Are these related? Something has changed; but I'm not sure whether it's truly fixed?
Thanks...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

No fix for bug 1872159 has been released yet, so I think it's just pure luck at the moment.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Daniel, you're right: it just happened again. Suspended as soon as I put in the login password. Uh- oh!

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Posted this detail upstream at Plymouth in hopes it may help:
So I did 3 things yesterday: I applied all Ubuntu Updates; turned the splash screen back on; and reverted from the third-party nVidia drivers back to the open source driver. Then rebooted. This was the first time in a month that I was able to get past these problems. Today, with no further changes, the suspend on login is back. As with the spinning logo, it occurs when laptops are docked and running lid down with external HDMI display as primary along with external keyboard and mouse. I hope that this may help in pinning these down? Thank you.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Looking through the logs...
Seeing "Suspending...." from systemd-logind this morning.
The line immediately before (below) that is
dropbox: load fq extention '/home/tim/.dropbox-dist/dropbox-lnx.x86_64-108.4.453/psutil._psutil_posi....
The lines immediately after (above) the suspending line are (going upward)
NetworkManager-dispatcher.service: Succeeded.
<info> [1603373101.8743] manager: NetworkManager state is now ASLEEP

Is this where it suspended after I put in the login password?

If you can point me to the particular log and what to look for, I'll be glad to see if I can find it or I can upload a log if you tell me what file?

Thanks.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You can see your full log (all components) in:

  journalctl -b0

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Daniel, thanks; looks like there IS something with the Dropbox app going on as one triggers of this. I changed the Dropbox properties so that Dropbox does not automatically start; turned off Dropbox sync; and turned off the Dropbox app. Shut down the system. When I started the system, it did not suspend? Perhaps this will help to reproduce this issue? Again, as best I could see in the logs, the event immediately before the suspend event was loading a dropbox extension (comment 14 above).
Thanks...

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Daniel, this seems consistent: so long as I don't load the Dropbox app, I haven't seen the suspend. I don't know if this is the cause but regardless the Dropbox app may help in reproducing this issue? Thanks...

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Another system failed under 20.04.1: A T480 that hadn't been used for a while, set up dual boot Ubuntu 20.04 and Win 10. Ubuntu had updates waiting including the 20.04.1 updates from several weeks ago. As soon as that installed and the system was restarted, malfunctions began. The system was docked (UltraDock) running lid closed with an external HDMI display as primary and a Lenovo USB external keyboard. The dock also had a Logitech USB dongle for the wireless Logitech mouse.

Immediately upon restarting, the system suspended as soon as the login password was entered. In looking at the logs, it appears that the action immediately preceeding the suspend was loading the Logitech module. This now happens every startup unless the Logitech mouse is turned OFF during startup.

The splash screen is turned off to prevent the spinning logo hang (done on the first restart after the updates -- after resuming from suspend -- to prevent the hang); the initramfs error messages are on full display with every start.

This system includes discrete nVidia graphics on an 8th gen Intel chipset with Sierra Wireless. Ubuntu is using the proprietary nVidia drivers, which were loaded prior to the 20.04.1 updates; those updates did install the most recent nVidia driver. This system does NOT have Dropbox loaded.

Posting this to provide another data point that I hope will help to pin down this problem. FYI, this is now 3 of 3 Ubuntu LTS 20.04 systems here that have been afflicted with the Ubuntu 20.04.1 bugs.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

This may also help:
I'm testing the fix for bug 1872159 (spinning logo hang on startup). It seems to be working.
So, since the rendering of the nVidia driver is superior to the x.org driver, I switched for the generic x.org back to nVidia's latest 450 version for the T570's GeForce 940MX. Well: on startup, the system exhibited this bug and went into suspend as soon as I put in the password. Immediately before suspending, the logs showed:
NVidia: access.
Using input driver 'libinput' for 'Video Bus'
and then suspended.
I then tried nVidia's 435 driver; same result (system suspended at login).
So I've gone back to the generic x.org driver for the discrete graphics again.
This is the same system where loading the Dropbox app on startup will also cause suspend.
Hope this helps.
Thanks.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

This bug is destabilizing the main Ubuntu system here again. Gnome shell has begun to crash. Latest cold start once again went into suspend as soon as the login password was entered. Lines immediately before suspending were:
Stopped target Main User Target
A connection to the bus can't be made
Error while sending AddMatch () message: The connection is closed
Stopping Tracker file system data miner...
OK
systemd-hotnamed.service: Succeeded.
Delay lock is active (UID 1000/tim, PID 1690/gnome-shell) but inhibitor timeout is reached.
Starting Suspend...
Suspending system...
PM: suspend entry (deep)

Please get on this. Thanks.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If you are experiencing any crash then please open a new bug using these instructions:

https://wiki.ubuntu.com/Bugs/Responses#Missing_a_crash_report_or_having_a_.crash_attachment

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Daniel, of course. My point was that I've now seen multiple occurrences where this suspend on login bug, as it continues to occur on a given system, causes Ubuntu to become less and less stable over time. Unfortunately that impact has become predictable at least on the machines here. So to me, this particular bug is of increasing concern and urgency.

I'm new to Ubuntu and appreciate your pointers. If I can see consistency and gather enough information to report a new bug, I will. So far, what I see is that this suspend on login bug can follow various events on a docked laptop: loading the Dropbox app, loading the Logitech module for a USB wireless mouse, loading third party nVidia drivers... and then with continued occurrences it goes deeper into the gnome shell. The affected systems have submitted automated crash reports already. But at this point my concern is this suspend on login bug.

I certainly didn't intend to shift attention from the bug at hand! Quite the opposite. Thanks.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Update: this is still acting up, even after the kernel update and Intel microcode updates of Nov 11 and Nov 12 respectively. Given those updates, I tested to see whether this bug is still there. Unfortunately, it is.

This is a ThinkPad T570, docked, using external HDMI display (via the dock) as primary. Also external Lenovo keyboard and mouse, obviously. By simply re-selecting the proprietary nVidia driver for the discrete graphics, the system goes into suspend as soon as the login password is entered. These drivers worked just fine until the Ubuntu update issues in September.

I tried 2 different versions of the nVidia driver; both continue to cause this bug as has been the case since I opened this bug report.

I have also seen this bug triggered by automatic loading of the Dropbox app (which I am keeping turned off until this is fixed); by a Logitech USB wireless mouse (on a T480 configuration); and after a few occurrences even by just the loading of the gnome shell.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

This bug remains, and exhibits with every startup in the T570's UltraDock. Likewise, this bug has exhibited on every system here (all ThinkPads) when in their respective UltraDocks. This includes a T480, which is a current machine based on the i7-8xxx chipset.

Revision history for this message
Tim Wetzel (twetzel21) wrote :

Another wrinkle since this week's kernel update in 20.04.1 (from 5.4.0.54.57 to 5.4.0.56.59: on every second or third startup in the UltraDock and with the external HDMI display as primary (which is where this suspend on login password problem occurs), the system now goes into never-never land instead of suspending. The external display stays active (doesn't go into power standby) but remains black; if I open the lid of the docked laptop it also usually remains black; the soft reboot (Alt+Prtscrn followed by REISUB) does nothing; so the only option is a hard power down.

Wait 10-15 seconds and restart, and it's back to the usual suspend on entry of the login password.

Please fix.... again, this bug affects every Ubuntu system here. All 20.04 and ThinkPads from T440 through T480 series; so older to practically new.

Thanks.

Revision history for this message
Shadrin Ilya (ishadrin) wrote (last edit ):

This might be FIXED by setting HandleLidSwitchDocked=ignore in

/etc/systemd/logind.conf

Although i would still appreciate if this use case will be better implemented on OS level (performance wise)

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.