elementary / greeter

Login and Lock Screen greeter for elementary OS and Pantheon, using LightDM
GNU General Public License v3.0
152 stars 39 forks source link

Session often lost after locking screen with multiple displays #324

Open gvansanden opened 4 years ago

gvansanden commented 4 years ago

Often, but not always when the screen is locked I will try to unlock, only to get greeter ask my password twice. It will then take me to an empty desktop, all my open windows are gone.

I disabled sleep, also for lightdm, so that is not the cause.

This is on a Huawei Matebook X Pro laptop With elementary Juno. I'm using an external monitor most of the time and have the lastest 18.04 HWE installed

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/79148817-session-often-lost-after-locking-screen-with-multiple-displays?utm_campaign=plugin&utm_content=tracker%2F60068889&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F60068889&utm_medium=issues&utm_source=github).
mhstoller commented 4 years ago

I have a similar issue, where the desktop doesn't load fully after login sometimes. I can't see any open windows, and the dock does not display. I am able to use a keyboard shortcut to access terminal, but that's about it

gvansanden commented 4 years ago

I disabled lightlocker and installed xscreensaver. Not a single issue anymore. Ugly as hell, but at least it works.

mhstoller commented 4 years ago

I wonder if the new lock screen that was just updated on my machine will fix this issue then!

PhSchmitt commented 4 years ago

Same problem here on hp elitebook notebook

gvansanden commented 4 years ago

Seems to hit many people, but no movement on fixing

gvansanden commented 4 years ago

@PhSchmitt It doesn't fix it

cassidyjames commented 4 years ago

I've not been able to reproduce this on a single-monitor laptop or single-monitor desktop with the new greeter, but we should definitely test with multiple displays to see if we can reliably reproduce it.

gvansanden commented 4 years ago

@cassidyjames I work on dual monitors 95% of the time, it happens 2/3rd of the times I lock on that setup. It does not seem to happen when I don't have a secondary monitor connected. That goes also for my other systems. Single display setups work

gvansanden commented 4 years ago

@cassidyjames And switching to xscreensaver makes the issue go away too.

PhSchmitt commented 4 years ago

a bit more information of my monitor setup: usually, I use 3 Displays: either 2 DP + 1 VGA or 2DP + Notebook. When the screen is locked less than 5min, the session almost always persists. When locked 5-15min, it's around 30% chance that the session gets lost. When locked for more than 30min, the session gets lost almost every time. On single monitor (notebook only), it also happens, but very very rarely

gvansanden commented 4 years ago

@PhSchmitt I also have an Intel NUC with Elementary with a single monitor that is always logged in. It hasn't lost it's session so far. My dual monitor setup is a bit worse then your setup, even locking for a couple of seconds results in most sessions getting lost.

edwinvandeven commented 4 years ago

This also happens to me both at home and at work. I can confirm it doesn't happen on a single monitor. When I keep the laptop closed, it doesn't happen.

Both laptops run Juno with latest HWE.

Home setup: Hp Elitebook 1040 G4 HP Thunderbolt dock G2 Display connected using display port

Work setup: Thinkpad T490s HP USB-C Dock G4 Display connected using display port

So far, I was unable to replicate the issue when directly connecting a display to the laptop using HDMI. Though it happens almost every time (not 100%, but like ~ 90% of the times) when I connect a display through a usb c or thunderbolt dock.

Perhaps others having could confirm a similar observation concerning the docks.

I've attached the lightdm log of a session that got lost, unfortunately I'm not familiar enough with lightdm to see anything meaningful in it.

lightdm.log

edwinvandeven commented 4 years ago

To provide some additional info;

After some Googling I found this post on reddit: https://www.reddit.com/r/elementaryos/comments/atnu4c/ubuntu_18042_hwe_may_cause_issues_on_juno/

I also found that after downgrading the hwe, my session hasn't gotten lost again so far. Currently running 4.15.0-70-generic.

I downgraded using the following steps:

Boot into the original kernel (4.15) by selecting the appropriate option from "Advanced options for elementary OS" in the GRUB menu.

Remove the HWE stack xorg packages by entering this in a Terminal: sudo apt remove xserver-xorg-*-hwe-18.04

Install the regular xorg package and elementary-desktop package (it gets removed when removing xorg-hwe, but I suspect we want it): sudo apt install xorg elementary-desktop

Remove the HWE stack kernel packages: sudo apt remove linux-generic-hwe-18.04 linux-headers-generic-hwe-18.04 linux-image-generic-hwe-18.04 sudo apt remove linux--5.0

Reboot

After downgrading, disconnecting from a docking station was also detected correctly and the session continues on the laptop, instead of showing a black screen.

mhstoller commented 4 years ago

This just happened to me at my home computer (1 monitor). I signed in from the lock screen and was presented with just my desktop wallpaper, all of my previous open applications and windows were not re-opened and the dock did not display. I opened terminal and copied some of the ouput from "journalctl -xar" and pasted it here: https://pastebin.com/wXp5xBae

There are a lot of errors like: AT-SPI: Could not obtain desktop path or name Could not open X display

I'm no sure if those are related to this issue, but maybe this will help

endorama commented 4 years ago

I'm able to reproduce this issue effectively. The behaviour seems to confirm what @edwinvandeven says.

Laptop is a Dell XPS13 9380 (2019 edition).

Laptop is connected to an USB-C Docking Station (Brand: Dell). Docking has ethernet, screen and a couple of USB connected.

To reproduce:

  1. Suspend laptop
  2. Detach from docking station
  3. Wake laptop
  4. Session issues

As @edwinvandeven report it may be reproduced with other models. I still haven't tried the proposed workaround.