elementary / greeter

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

Greeter doesn't appear after resume from suspend or hibernate #482

Open reynoldsbd opened 3 years ago

reynoldsbd commented 3 years ago

What Happened

My laptop is configured to suspend when the lid is closed. But after opening the lid to resume the system, the greeter never appears.

Same issue happens if I disable any "lid close" actions in System Settings and instead use acpid(8) to hibernate after closing the lid: greeter is not visible upon resume, but sounds are audible.

I'm quite sure this is not a dupe of #165. The login prompt never becomes visible, even after waiting many hours.

Expected Behavior

I expect to always see login prompt after resuming from suspend or hibernation.

Steps to Reproduce

  1. Open System Settings, configure to suspend when laptop lid is closed
  2. Close laptop lid, allow system to enter sleep, re-open laptop lid

Obviously, many people are able to perform these steps every day without issue, so this is probably due to some quirk in my hardware.

Logs

Nothing interesting in systemd journal or Xorg logs, just normal suspend/resume spew. Absolutely no indication that there is anything wrong with display hardware

Platform Information

Elementary OS 5.1.7 Hera Fully up-to-date

Laptop is a 1st-generation (2016) Razer Blade Stealth with an i7-6500 and Intel HD Graphics 520

reynoldsbd commented 3 years ago

Alternative hibernate-based repro:

  1. Enable resume from hibernate (see archwiki)
  2. Open System Settings, disable any "lid close" action
  3. Create the file /etc/acpi/events/hibernate with the following contents:
    event=button/lid
    action=/etc/acpi/hibernate.sh %e
  4. Create the file /etc/acpi/hibernate.sh with the following contents:

    #!/bin/sh
    
    if [ $3 = close ]
    then
            AC=$(cat /sys/class/power_supply/AC0/online)
            if [ $AC = 0 ] # AC adapter not connected
            then
                    /bin/systemctl hibernate
            fi
    fi
  5. Set x bit and reload acpid
    sudo chmod +x /etc/acpi/hibernate.sh
    sudo systemctl kill -s HUP acpid
  6. Unplug AC adapter, close lid to trigger hibernate
  7. Open lid, press power to resume from hibernate

As described in original issue, greeter is not visible, although background noises are audible.

Interestingly, if I close and re-open the lid with the AC adapter plugged back in (to avoid triggering hibernate), the greeter appears!!!

Is it possible that the greeter is sitting around waiting for a "lid open" event that for some reason isn't being arriving?

tdias25 commented 3 years ago

did you manage to solve it?

reynoldsbd commented 3 years ago

Sorry, no solution. Now that I know that the issue is related to the way my lid switch operates, my workaround is simply to avoid using it to trigger hibernate. Instead I just make sure to hibernate with the power button before shutting the lid

peteruithoven commented 2 years ago

When you say "the greeter never appears", do you mean you only see a fully black screen? So no top bar with indicators and gray screen?

Or does it look like below, where you're only missing the login card? greeter without login

reynoldsbd commented 2 years ago

Screen was fully black