unlock delay with blank screen after long time on screen lock

Asked by Eddie B on 2020-02-14

I'm putting this in the question area because I'm not sure if it's a bug or an Nvidia driver issue.

I am having this issue on fresh install of Ubuntu 18.04, Ubuntu 19.10, and UbuntuStudio 19.10. I'm currently using UbuntuStudio 19.10 because the issue isn't as extreme as in Ubuntu.

This bug is reproduceable. Issue only happens when the screen is locked for a long time and user was already logged in. There is slight 1 minute delay after screen is locked for a half hour, but after over 2 hours on lock screen there are delays of 3 to 6 minutes (this is on UbuntuStudio 19.10). I gave up on Ubuntu 18.04 and 19.10 because delays would get worse over time and eventually take over 10 minutes or never get to desktop. During this delay the screen is blank with only the mouse cursor (which is laggy). Num lock works on keyboard, but capslock does not show the change in the light until the desktop is displayed. Also, the delay is longer if I log in as a different user as last login (that is also currently logged in, if the different user was not logged in, then the desktop displays instantly). Another oddity is that if both users are signed in, click switch user so on LightDM Greeter screen, leave it overnight, logging into one user takes 6 minutes, then immediately switch user and log into other user and that will also take 3 or 6 minutes. Another thing is that after clicking unlock on the greeter the mouse cursor jumps to a location near the top right corner (about 1" down and half inch over) and that cursor shows as a window resize cursor if there is a corner of a window at that location (when the screen finally shows up of course).

Ubuntu 18.04 was worse than 19.10, I think because I used Nvidia v440 driver and on 19.10 I'm using the included (and automatically installed) Nvidia v435 driver. Most of the installs I've loaded a lot of software and customized the desktop, but the other partition has a fresh install of UbuntuStudio 19.10 with no modifications at all besides creating a second user.

I forget half of what I tried already, but blacklisting Nouveau and many other things. I don't think this is a LightDM or Gnome issue since both are affected. Tried many Gnome fixes and LightDM fixes. Tried "xfconf-query -c xfwm4 -p /general/vblank_mode -s glx". Nothing I tried had any effect on the issue.

I'm using a brand new NVidia - EVGA GeForce GTX 1650 XC Ultra video card, Gigabyte 990FXA-UD3 Ultra motherboard, 16 GB RAM, 500 GB boot drive with 4 partitions (UEFI, swap, and 2 installs of UbuntuStudio), 6 drives in ZFS raid.

The journal and other log files don't show anything during the blank screen time besides 4 lines of the firewall blocking. Here is a good example of my journal where user Ed clicked Switch User at 10:02, then at 17:09 clicked unlock with blank screen until 17:12 (only 3 minutes because was the last user logged in), then clicked Switch User and changed greeter for user Diane, clicked unlock at 17:20 and had blank screen until 17:28. I'll have to figure out how to attach the log file.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2020-02-19
Last reply:
2020-02-20
Eddie B (fasteddieb216) said : #1

Just one more thing I want to be clear on... In the past I wasn't counting blank screen for less than a minute because that was not a big deal waiting for. I just did some testing and found some interesting timing. BTW, my monitor goes to sleep after 10 minutes of inactivity.

After clicking "Switch User" if I:
wait for a few seconds before clicking unlock, the screen is blank for about 2 seconds.
wait for 9 minutes before clicking unlock, the screen is blank for about 2 seconds.
wait for 12 minutes before clicking unlock, the screen is blank for about 2 seconds.
wait for 30 minutes before clicking unlock, the screen is blank for much less than a minute.
wait for 1.5 hours before clicking unlock, the screen is blank for about a minute.

I'll have to use a stopwatch app tomorrow to get more accurate numbers if that will be helpful. I look forward to getting some advise on how to troubleshoot this issue. I'm now doubting that this is an Nvidia driver issue because the greeter comes up quickly after moving the mouse and the delay is after I click the unlock button. Also issue doesn't happen when logging in (only when I unlock a logged in user).

Eddie B (fasteddieb216) said : #2

Wow, this is even weirder than I originally thought. I should have done more accurate timings before I posted here. Anyway, if I adjust the timings accounting for 10 minutes before screen goes to sleep and 1.6 seconds of the unlock time is normal unlock time, then the timings are all exactly the same ratio. Here are the timings of the # of minutes inactive followed by the # of seconds the screen was blank after clicking unlock:

1, 2
7, 2
27, 13
29, 14
30, 15
47, 26
48, 27
75, 45
102, 62
102, 62
155, 96
205, 127
358, 232
450, 289
495, 327

Another thing is that my wife didn't use the PC yesterday, so I did all of these timings using just my username, but when she logged in this morning it took 689 seconds (11 minutes and 29 seconds), which turns out to be exactly proportional to if all of the time the display was inactive/asleep since the last time she was logged in.

What blows my mind is that something would need to count how long the screen was asleep and then use that in a loop processing something that takes the same amount of time for each iteration. I can't imagine how this could be.

Please give me some guidance on what to try next. Also, I've been trying to change LightDM so that it doesn't put the display to sleep after 10 minutes, but I have been unsuccessful. I even tried the instructions here:
https://askubuntu.com/questions/942366/how-to-disable-sleep-suspend-at-login-screen

Eddie B (fasteddieb216) said : #5

I checked my BIOS and don't see a fast boot option. The Power Settings section only affects when you are logged in and has no affect on the Greeter. I am having this issue only on the Greeter when I click unlock. At one point I was able to disable the DPMS on the Greeter and with the DPMS disabled there was no delay when I clicked unlock. With DPMS disabled I am worried about damage to my monitor. Is it possible to enable screensaver on the Greeter? Or better yet, blank the screen without DPMS? I can't figure out how to do it. I am using LightDM/XFCE on UbuntuStudio 19.10. I am willing to change to Ubuntu if I can get this issue resolved.

bernard stafford (bernard010) said : #6

My bad -- It is called "Quick Boot" the option is in the Startup section of the BIOS. Screen saver may a good option.
I noticed you having 6 HDDs in ZFS Raid. I wonder if they are starting one at a time causing a time delay.

bernard stafford (bernard010) said : #8

Bottom left of screen (All applications) click -> In the search box, Top of screen Type
(Screen Saver) You should find a screen saver snap to install from there, in GNOME.

Start -> Applications -> Software -> Snap Store -> Type - Screen Saver in the search box - install Snap, In XFCE.

Eddie B (fasteddieb216) said : #9

A screen saver was installed from when I installed UbuntuStudio 19.10. I am using LightDM/XFCE, not Gnome, so there are no other screen savers on the Software store (neither snap or non-snap). The screen saver only works when I'm logged in (not on the greeter screen), but from what I've read it sounds like it never did work on the LightDM Greeter screen. I even tried using xset and installed Light Locker with no success.

And the ZFS Raid doesn't seem to have anything to do with it. On my other partition I have UbuntuStudio 19.10 installed without any customization and no ZFS drivers installed. The delays are exactly the same. When I tried Ubuntu (Gnome) the delays were worse, so I can't use that until this issue gets resolved.

I also can login from the Greeter screen without any delays, but only when I click "Unlock" to unlock an already logged in user do I get these delays. It is very frustrating waiting over 5 minutes to unlock an account after 8 hours asleep. But if I log off and sign back in, it only takes a few seconds (but then I have to run all my programs again and find the folders I was working on in the FIle Manager and such).

This doesn't sound like a hardware issue, but the new NVidia card is the only thing new to the system in many years that I was running UbuntuStudio on until 16.04. NVidia stopped support for my old video card starting with 18.04.

If anyone knows what module is causing the issue, please let me know. Since the cursor shows up I think it might be out of the greeter, but don't know the process that well. Can't seem to find decent explanation of how the greeter hands off the unlock to the desktop.

Eddie B (fasteddieb216) said : #10

I don't know if this is related to my login delay, but I see these 6 lines repeated over and over in my .xsession-errors file (only during the time I'm on the greeter screen. It's not very consistent.. sometimes once every 30 seconds and other times up to 50 minutes between messages.

(nm-applet:10143): Gtk-CRITICAL **: 19:54:31.886: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
(nm-applet:10143): Gtk-CRITICAL **: 19:54:31.886: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
(nm-applet:10143): Gtk-WARNING **: 19:54:31.896: Can't set a parent on widget which has a parent

Could this be related to https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/1799213 ? To be more precise on when I get these error messages, this current sample I got these messages in .xsession-errors from 19:54 until 21:05. I had clicked "Switch User" at 19:54 and left PC idle until I woke it up and clicked "unlock" at 21:14 and had a 46 second login delay (blank screen with only mouse cursor) before I could see my desktop. So, the start of these errors was exactly when the greeter was started, but the errors stopped 9 minutes before I left the greeter.

And here is a snippet of /var/log/lightdm/seat0-greeter.log showing when the greeter was started:

(lightdm-gtk-greeter:7291): Gtk-WARNING **: 19:49:51.636: Drawing a gadget with negative dimensions. Did you forget to alloc>
** (lightdm-gtk-greeter:7291): WARNING **: 19:49:51.791: [PIDs] Failed to terminate process #8020: No such process
** Message: 19:54:31.950: Starting lightdm-gtk-greeter 2.0.6 (Sep 18 2018, 01:17:10)
** Message: 19:54:31.951: [Configuration] Reading file: /usr/share/lightdm/lightdm-gtk-greeter.conf.d/01_ubuntu.conf
** Message: 19:54:31.951: [Configuration] Reading file: /usr/share/lightdm/lightdm-gtk-greeter.conf.d/30_ubuntustudio.conf
** Message: 19:54:31.951: [Configuration] Reading file: /etc/lightdm/lightdm-gtk-greeter.conf
** (lightdm-gtk-greeter:16153): WARNING **: 19:54:32.099: [PIDs] Failed to execute command: upstart
(lightdm-gtk-greeter:16153): Gtk-WARNING **: 19:54:32.551: Drawing a gadget with negative dimensions. Did you forget to allo>
(lightdm-gtk-greeter:16153): Gtk-WARNING **: 19:55:00.245: Drawing a gadget with negative dimensions. Did you forget to allo>

bernard stafford (bernard010) said : #11

No Bug 17992113 is for a network manager in gnome 1.8.18..2 different problem.
Go ahead and file a bug report for the Gtk-Warning for your lightdm-gtk-greeter as a separate individual bug.
I searched all of the bug reports for lightdm-gtk-greeter and they are all different.
Please put the OS name and version on the bug report with all of the error messages that you posted here.
Thank You

Eddie B (fasteddieb216) said : #12

Thanks for your help and I will submit a bug report, but I need to gather more info first. The nm-applet errors were just a coincidence that they happened during my one test, but I have not seen those errors since. I did however make a breakthrough that I only get this blank screen when I click "Switch User" to get to greeter screen. Now that I have the screensaver active I noticed that if the screensaver brings me to the greeter, I can let is sit idle for an hour and when I click unlock it immediately brings me to the desktop. When clicking Switch User if I enter password and click unlock immediately I get at least a 2.3 second blank screen before I see the desktop. So, the issue has something to do with how the "Switch User" button interacts with the greeter. I will test on Ubuntu live from usb install stick to see if that is the same as UbuntuStudio before I submit the bug report. I was hoping other people could verify that they also get this delay since I find it hard to believe that only I have this issue since I've done so many fresh installs and have this issue every time.

bernard stafford (bernard010) said : #13

Include this new information to the Bug Report especially the Switch User Icon. After you file the bug report, bookmark it.
You can log-in and add additional information when it happens. Reply what you did that caused it to change or happen again.
Thank You.

Can you help with this problem?

Provide an answer of your own, or ask Eddie B for more information if necessary.

To post a message you must log in.